Package com.usatiuk.objects.stores
Class LmdbObjectPersistentStore
java.lang.Object
com.usatiuk.objects.stores.LmdbObjectPersistentStore
- All Implemented Interfaces:
ObjectPersistentStore
@ApplicationScoped
public class LmdbObjectPersistentStore
extends Object
implements ObjectPersistentStore
Persistent object storage using LMDB
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcommitTx(TxManifestRaw names, long txId) Commit a transaction to the persistent store.longGet the free space of the persistent store.Get a snapshot of the database.longGet the size of the persistent store.
-
Constructor Details
-
LmdbObjectPersistentStore
-
-
Method Details
-
getSnapshot
Get a snapshot of the database. Note that the ByteBuffers are invalid after the snapshot is closed.- Specified by:
getSnapshotin interfaceObjectPersistentStore- Returns:
- a snapshot of the database
-
commitTx
Description copied from interface:ObjectPersistentStoreCommit a transaction to the persistent store.- Specified by:
commitTxin interfaceObjectPersistentStore- Parameters:
names- the transaction manifesttxId- the transaction ID
-
getTotalSpace
public long getTotalSpace()Description copied from interface:ObjectPersistentStoreGet the size of the persistent store.- Specified by:
getTotalSpacein interfaceObjectPersistentStore- Returns:
- the size of the persistent store
-
getFreeSpace
public long getFreeSpace()Description copied from interface:ObjectPersistentStoreGet the free space of the persistent store.- Specified by:
getFreeSpacein interfaceObjectPersistentStore- Returns:
- the free space of the persistent store
-