public class ByteArrayLMDBKVStore extends LMDBKVStore<byte[]>
KVStore
view of a LMDB transaction using byte[]
array buffers.
Instances must be LMDBKVStore.close()
'd when no longer needed to avoid leaking resources.
log
Constructor and Description |
---|
ByteArrayLMDBKVStore(org.lmdbjava.Dbi<byte[]> db,
org.lmdbjava.Txn<byte[]> tx)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected byte[] |
unwrap(byte[] data,
boolean copy)
Unwrap the given buffer, returning its contents as a
byte[] array. |
protected byte[] |
wrap(byte[] data,
boolean copy)
Wrap the given
byte[] array in a buffer appropriate for this instance. |
close, finalize, get, getDatabase, getKeyRange, getRange, getTransaction, isClosed, put, remove, removeRange, toString
adjustCounter, decodeCounter, encodeCounter, getAtLeast, getAtMost
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
adjustCounter, apply, decodeCounter, encodeCounter, getAtLeast, getAtMost, getRange, getRange, removeRange
public ByteArrayLMDBKVStore(org.lmdbjava.Dbi<byte[]> db, org.lmdbjava.Txn<byte[]> tx)
Closing this instance does not close the underlying transaction.
db
- LMDB databasetx
- LMDB transactionIllegalArgumentException
- if db
or tx
is nullprotected byte[] wrap(byte[] data, boolean copy)
LMDBKVStore
byte[]
array in a buffer appropriate for this instance.wrap
in class LMDBKVStore<byte[]>
data
- byte array data, or possibly nullcopy
- if true, then changes to the data in either buf
or the returned buffer must not affect the otherbuf
is null, otherwise a buffer containing the data in buf
protected byte[] unwrap(byte[] data, boolean copy)
LMDBKVStore
byte[]
array.unwrap
in class LMDBKVStore<byte[]>
data
- a buffer containing byte[]
array data, or possibly nullcopy
- if true, then changes to the data in either buf
or the returned array must not affect the otherbuf
, or null if buf
is nullCopyright © 2022. All rights reserved.