Package com._1c.g5.v8.bm.store
Interface IBmPersistentLongStore
- All Superinterfaces:
- AutoCloseable,- Closeable
Long to byte array persistent key-value store.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Closes the store.longGets the size of the store, in bytes.Gets iterator over all the keys in the store.<T> Tread(long key, IBmPersistentStoreReaderCallback<T> callback) Reads data associated with the specified key.booleanremove(long key) Removes data assoicated with the specified key.booleanChecks if the store requires compacting.voidstart()Starts the store.voidwrite(long key, byte[] data) Writes the specified data to store and associates with the specified key.voidwriteData(long key, byte[] data, int offset, int length) Writes the specified piece of binary data and associates it with the specified ID.
- 
Method Details- 
startStarts the store.- Throws:
- IOException- if any I/O error occurs.
 
- 
closeCloses the store. Once store closed, it cannot be started again.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IOException- if any I/O error occurs.
 
- 
readReads data associated with the specified key. If the data exist the callback is invoked.- Parameters:
- key- The key.
- callback- The callback. May not be- null.
- Returns:
- the result returned by callback or nullif there are no data associated with the specified key.
- Throws:
- IOException- if any I/O error occurs.
 
- 
writeWrites the specified data to store and associates with the specified key.- Parameters:
- key- The key.
- data- The byte array containing the data. May not be- null.
- Throws:
- IOException- if any I/O error occurs.
 
- 
writeDataWrites the specified piece of binary data and associates it with the specified ID.- Parameters:
- key- The key.
- data- The byte array containing the data. May not be- null.
- offset- The offset of the data within the array.
- length- The length of the data.
- Throws:
- IOException- if any I/O error occurs.
 
- 
removeRemoves data assoicated with the specified key.- Parameters:
- key- The key.
- Returns:
- trueif there were data associated with the specified key,- falseotherwise.
- Throws:
- IOException- if any I/O error occurs.
 
- 
keysIteratorIBmLongIterator keysIterator()Gets iterator over all the keys in the store.- Returns:
- an instance of IBmLongIterator, nevernull.
 
- 
getStoreSizeGets the size of the store, in bytes.- Returns:
- The size of the store, in bytes. Cannot be negative.
- Throws:
- IOException- if any I/O error occurs.
 
- 
requiresCompactingChecks if the store requires compacting.- Returns:
- trueif the store requires compacting,- falseotherwise.
- Throws:
- IOException- if any I/O error occurs.
 
 
-