public final class FilePerKeyValueStoreBackedKeyValueStore<K,V> extends net.openhft.chronicle.core.io.SimpleCloseable implements KeyValueStore<K,V>
KeyValueStore.Entry<K,V>
Constructor and Description |
---|
FilePerKeyValueStoreBackedKeyValueStore(FilePerKeyValueStore filePerKeyValueStore,
Function<K,String> keyToString,
Function<V,net.openhft.chronicle.bytes.BytesStore> valueToBytesStore,
Function<net.openhft.chronicle.bytes.BytesStore,V> bytesStoreToValue) |
Modifier and Type | Method and Description |
---|---|
@NotNull Asset |
asset() |
void |
clear() |
boolean |
containsValue(V value) |
void |
entriesFor(int segment,
SubscriptionConsumer<MapEvent<K,V>> kvConsumer) |
V |
getAndPut(K key,
V value) |
V |
getAndRemove(K key) |
V |
getUsing(K key,
Object value) |
void |
keysFor(int segment,
SubscriptionConsumer<K> kConsumer) |
long |
longSize() |
protected void |
performClose() |
boolean |
put(K key,
V value)
put an entry
|
boolean |
remove(K key)
remove a key
|
@Nullable KeyValueStore<K,V> |
underlying() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
containsKey, entrySetIterator, get, isKeyType, isReadOnly, keySetIterator, putIfAbsent, removeIfEqual, replace, replaceIfEqual, segmentFor, segments, valuesIterator
close, closeQuietly, closeQuietly
public FilePerKeyValueStoreBackedKeyValueStore(FilePerKeyValueStore filePerKeyValueStore, Function<K,String> keyToString, Function<V,net.openhft.chronicle.bytes.BytesStore> valueToBytesStore, Function<net.openhft.chronicle.bytes.BytesStore,V> bytesStoreToValue)
public boolean put(K key, V value)
KeyValueStore
put
in interface KeyValueStore<K,V>
key
- to setvalue
- to set@Nullable public V getAndPut(K key, V value)
getAndPut
in interface KeyValueStore<K,V>
public boolean remove(K key)
KeyValueStore
remove
in interface KeyValueStore<K,V>
key
- to remove@Nullable public V getAndRemove(K key)
getAndRemove
in interface KeyValueStore<K,V>
@Nullable public V getUsing(K key, Object value)
getUsing
in interface KeyValueStore<K,V>
public long longSize()
longSize
in interface KeyValueStore<K,V>
public void keysFor(int segment, SubscriptionConsumer<K> kConsumer)
keysFor
in interface KeyValueStore<K,V>
public void entriesFor(int segment, SubscriptionConsumer<MapEvent<K,V>> kvConsumer)
entriesFor
in interface KeyValueStore<K,V>
public void clear()
clear
in interface KeyValueStore<K,V>
public boolean containsValue(V value)
containsValue
in interface KeyValueStore<K,V>
@NotNull public @NotNull Asset asset()
asset
in interface Assetted<KeyValueStore<K,V>>
@Nullable public @Nullable KeyValueStore<K,V> underlying()
underlying
in interface Assetted<KeyValueStore<K,V>>
protected void performClose()
performClose
in class net.openhft.chronicle.core.io.SimpleCloseable
Copyright © 2021. All rights reserved.