public final class KVStore extends Object implements StoreOps, KindManagement
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
compact(String kindName) |
void |
compactAll() |
Batch |
createBatch() |
void |
delete(Kind kind,
byte[] key) |
byte[] |
deleteIfPresent(Kind kind,
byte[] key) |
byte[] |
findMaxKey(Kind kind) |
byte[] |
findMaxKeyByPrefix(Kind kind,
byte[] keyPrefix) |
byte[] |
findMaxKeyByUpperBound(Kind kind,
byte[] upperBound) |
byte[] |
findMaxKeyLessThan(Kind kind,
byte[] keyPrefix,
byte[] upperBound) |
byte[] |
findMinKey(Kind kind) |
byte[] |
findMinKeyByLowerBound(Kind kind,
byte[] lowerBound) |
byte[] |
findMinKeyByPrefix(Kind kind,
byte[] keyPrefix) |
byte[] |
findMinKeyGreaterThan(Kind kind,
byte[] keyPrefix,
byte[] lowerBound) |
void |
flush() |
void |
flushNoWait() |
byte[] |
get(Kind kind,
byte[] key) |
Kind |
getDefaultKind() |
Kind |
getKind(String kindName) |
KindManagement |
getKindManagement() |
Set<Kind> |
getKinds() |
Kind |
getOrCreateKind(String kindName) |
Stats |
getStats() |
boolean |
isOpen() |
void |
put(Kind kind,
byte[] key,
byte[] value) |
void |
putIfAbsent(Kind kind,
byte[] key,
byte[] value) |
ForEachKeyValue |
scanAll(Kind kind) |
ForEachKeyValue |
scanAll(Kind kind,
byte[] beginKey) |
ForEachKeyValue |
scanRange(Kind kind,
byte[] beginKey,
byte[] endKey) |
void |
singleDelete(Kind kind,
byte[] key) |
byte[] |
singleDeleteIfPresent(Kind kind,
byte[] key) |
Tx |
startTx() |
void |
syncWAL() |
byte[] |
updateIfPresent(Kind kind,
byte[] key,
byte[] value) |
void |
writeBatch(Batch batch) |
public KVStore(Path dir)
public void close()
close in interface AutoCloseableclose in interface StoreOpspublic KindManagement getKindManagement()
getKindManagement in interface StoreOpspublic Set<Kind> getKinds()
getKinds in interface KindManagementpublic Kind getKind(String kindName)
getKind in interface KindManagementpublic Kind getOrCreateKind(String kindName)
getOrCreateKind in interface KindManagementpublic Kind getDefaultKind()
getDefaultKind in interface KindManagementpublic void compact(String kindName)
compact in interface KindManagementpublic void compactAll()
compactAll in interface KindManagementpublic void put(Kind kind, byte[] key, byte[] value)
public void putIfAbsent(Kind kind, byte[] key, byte[] value)
putIfAbsent in interface StoreOpspublic byte[] deleteIfPresent(Kind kind, byte[] key)
deleteIfPresent in interface StoreOpspublic byte[] singleDeleteIfPresent(Kind kind, byte[] key)
singleDeleteIfPresent in interface StoreOpspublic byte[] updateIfPresent(Kind kind, byte[] key, byte[] value)
updateIfPresent in interface BasicOpsupdateIfPresent in interface StoreOpspublic byte[] get(Kind kind, byte[] key)
public void delete(Kind kind, byte[] key)
public void singleDelete(Kind kind, byte[] key)
singleDelete in interface StoreOpspublic void writeBatch(Batch batch)
writeBatch in interface StoreOpspublic void flushNoWait()
flushNoWait in interface StoreOpspublic ForEachKeyValue scanAll(Kind kind)
public ForEachKeyValue scanAll(Kind kind, byte[] beginKey)
public ForEachKeyValue scanRange(Kind kind, byte[] beginKey, byte[] endKey)
public byte[] findMinKey(Kind kind)
findMinKey in interface StoreOpspublic byte[] findMinKeyByPrefix(Kind kind, byte[] keyPrefix)
findMinKeyByPrefix in interface StoreOpspublic byte[] findMaxKey(Kind kind)
findMaxKey in interface StoreOpspublic byte[] findMaxKeyByPrefix(Kind kind, byte[] keyPrefix)
findMaxKeyByPrefix in interface StoreOpspublic byte[] findMinKeyByLowerBound(Kind kind, byte[] lowerBound)
findMinKeyByLowerBound in interface StoreOpspublic byte[] findMaxKeyByUpperBound(Kind kind, byte[] upperBound)
findMaxKeyByUpperBound in interface StoreOpspublic byte[] findMaxKeyLessThan(Kind kind, byte[] keyPrefix, byte[] upperBound)
findMaxKeyLessThan in interface StoreOpspublic byte[] findMinKeyGreaterThan(Kind kind, byte[] keyPrefix, byte[] lowerBound)
findMinKeyGreaterThan in interface StoreOpspublic Batch createBatch()
createBatch in interface StoreOpsCopyright © 2022. All rights reserved.