Package com.usatiuk.objects.stores
Interface ObjectPersistentStore
- All Known Implementing Classes:
LmdbObjectPersistentStore
,MemoryObjectPersistentStore
public interface ObjectPersistentStore
Interface for a persistent store of objects.
Does not have to be thread-safe! (yet), it is expected that all commits are done by the same thread.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
commitTx
(TxManifestRaw names, long txId) Commit a transaction to the persistent store.long
Get the free space of the persistent store.Get a snapshot of the persistent store.long
Get the size of the persistent store.
-
Method Details
-
getSnapshot
Snapshot<JObjectKey,ByteBuffer> getSnapshot()Get a snapshot of the persistent store.- Returns:
- a snapshot of the persistent store
-
commitTx
Commit a transaction to the persistent store.- Parameters:
names
- the transaction manifesttxId
- the transaction ID
-
getTotalSpace
long getTotalSpace()Get the size of the persistent store.- Returns:
- the size of the persistent store
-
getFreeSpace
long getFreeSpace()Get the free space of the persistent store.- Returns:
- the free space of the persistent store
-