Class LLDatabaseMVStore
java.lang.Object
com.io7m.looseleaf.database.mvstore.LLDatabaseMVStore
- All Implemented Interfaces:
LLDatabaseType,Closeable,AutoCloseable
A database implementation based on the H2 MVStore.
-
Constructor Summary
ConstructorsConstructorDescriptionLLDatabaseMVStore(org.h2.mvstore.MVStore inStore, org.h2.mvstore.tx.TransactionStore inTXStore) A database based on the H2 MVStore class. -
Method Summary
-
Constructor Details
-
LLDatabaseMVStore
public LLDatabaseMVStore(org.h2.mvstore.MVStore inStore, org.h2.mvstore.tx.TransactionStore inTXStore) A database based on the H2 MVStore class.- Parameters:
inStore- The MV storeinTXStore- The transaction store
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
dataSizeApproximate
public long dataSizeApproximate()- Specified by:
dataSizeApproximatein interfaceLLDatabaseType- Returns:
- The approximate size of the database in bytes
-
keyCountApproximate
public long keyCountApproximate()- Specified by:
keyCountApproximatein interfaceLLDatabaseType- Returns:
- The approximate number of keys in the database
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceLLDatabaseType- Returns:
trueif the store has been closed
-
readUpdateDelete
Description copied from interface:LLDatabaseTypeAtomically read, update, and delete values in the database.- Specified by:
readUpdateDeletein interfaceLLDatabaseType- Parameters:
rud- The RUD operation- Returns:
- The read keys
-
get
Description copied from interface:LLDatabaseTypeGet the value associated with the given key, if any.- Specified by:
getin interfaceLLDatabaseType- Parameters:
key- The key- Returns:
- The value, if any
-
getAll
- Specified by:
getAllin interfaceLLDatabaseType- Returns:
- The entire database
-