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 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 database.long
Get 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:
getSnapshot
in interfaceObjectPersistentStore
- Returns:
- a snapshot of the database
-
commitTx
Description copied from interface:ObjectPersistentStore
Commit a transaction to the persistent store.- Specified by:
commitTx
in interfaceObjectPersistentStore
- Parameters:
names
- the transaction manifesttxId
- the transaction ID
-
getTotalSpace
public long getTotalSpace()Description copied from interface:ObjectPersistentStore
Get the size of the persistent store.- Specified by:
getTotalSpace
in interfaceObjectPersistentStore
- Returns:
- the size of the persistent store
-
getFreeSpace
public long getFreeSpace()Description copied from interface:ObjectPersistentStore
Get the free space of the persistent store.- Specified by:
getFreeSpace
in interfaceObjectPersistentStore
- Returns:
- the free space of the persistent store
-