public final class ObjectObjectKeyValueStore<K,V> extends net.openhft.chronicle.core.io.SimpleCloseable implements KeyValueStore<K,V>
KeyValueStore.Entry<K,V>
Constructor and Description |
---|
ObjectObjectKeyValueStore(@NotNull RequestContext context,
Asset asset,
Assetted assetted) |
Modifier and Type | Method and Description |
---|---|
Asset |
asset() |
void |
clear() |
boolean |
containsValue(V value) |
void |
entriesFor(int segment,
@NotNull SubscriptionConsumer<MapEvent<K,V>> kvConsumer) |
@NotNull Iterator<Map.Entry<K,V>> |
entrySetIterator() |
V |
getAndPut(K key,
V value) |
V |
getAndRemove(K key) |
V |
getUsing(K key,
Object value) |
void |
keysFor(int segment,
@NotNull SubscriptionConsumer<K> kConsumer) |
long |
longSize() |
protected void |
performClose() |
boolean |
put(K key,
V value)
put an entry
|
boolean |
remove(K key)
remove a key
|
V |
replace(K key,
V value) |
KeyValueStore |
underlying() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
containsKey, get, isKeyType, isReadOnly, keySetIterator, putIfAbsent, removeIfEqual, replaceIfEqual, segmentFor, segments, valuesIterator
close, closeQuietly, closeQuietly, notifyClosing, warnAndCloseIfNotClosed
public ObjectObjectKeyValueStore(@NotNull @NotNull RequestContext context, Asset asset, Assetted assetted)
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, @NotNull @NotNull SubscriptionConsumer<K> kConsumer) throws InvalidSubscriberException
keysFor
in interface KeyValueStore<K,V>
InvalidSubscriberException
public void entriesFor(int segment, @NotNull @NotNull SubscriptionConsumer<MapEvent<K,V>> kvConsumer) throws InvalidSubscriberException
entriesFor
in interface KeyValueStore<K,V>
InvalidSubscriberException
@NotNull public @NotNull Iterator<Map.Entry<K,V>> entrySetIterator()
entrySetIterator
in interface KeyValueStore<K,V>
public void clear()
clear
in interface KeyValueStore<K,V>
@NotNull public V replace(K key, V value)
replace
in interface KeyValueStore<K,V>
public boolean containsValue(V value)
containsValue
in interface KeyValueStore<K,V>
public Asset asset()
asset
in interface Assetted<KeyValueStore<K,V>>
public KeyValueStore 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.