public final class RemoteKeyValueStore<K,V> extends net.openhft.chronicle.network.connection.AbstractStatelessClient<MapWireHandler.EventId> implements Cloneable, ObjectKeyValueStore<K,V>
KeyValueStore.Entry<K,V>
Constructor and Description |
---|
RemoteKeyValueStore(@NotNull RequestContext requestContext,
@NotNull Asset asset) |
RemoteKeyValueStore(@NotNull RequestContext context,
@NotNull Asset asset,
@NotNull net.openhft.chronicle.network.connection.TcpChannelHub hub) |
Modifier and Type | Method and Description |
---|---|
<A,R> R |
applyTo(@NotNull net.openhft.chronicle.core.util.SerializableBiFunction<MapView<K,V>,A,R> function,
A arg) |
@NotNull Asset |
asset() |
<A> void |
asyncUpdate(net.openhft.chronicle.core.util.SerializableUpdaterWithArg updateFunction,
A arg) |
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(V value) |
void |
entriesFor(int segment,
@NotNull SubscriptionConsumer<MapEvent<K,V>> kvConsumer) |
@NotNull Set<Map.Entry<K,V>> |
entrySet() |
@NotNull Iterator<Map.Entry<K,V>> |
entrySetIterator() |
boolean |
equals(@Nullable Object object)
calling this method should be avoided at all cost, as the entire
object is
serialized. |
@NotNull File |
file() |
V |
get(Object key) |
V |
getAndPut(Object key,
Object value) |
V |
getAndRemove(Object key) |
V |
getUsing(K key,
Object usingValue) |
int |
hashCode() |
boolean |
isEmpty() |
boolean |
isKeyType(Object key) |
@NotNull Set<K> |
keySet() |
void |
keysFor(int segment,
@NotNull SubscriptionConsumer<K> kConsumer) |
Class<K> |
keyType() |
long |
longSize() |
boolean |
put(K key,
V value)
put an entry
|
V |
putIfAbsent(K key,
V value) |
boolean |
remove(Object key)
remove a key
|
boolean |
remove(@Nullable Object key,
Object value) |
V |
replace(K key,
V value) |
boolean |
replace(K key,
V oldValue,
V newValue) |
@NotNull ObjectSubscription<K,V> |
subscription(boolean createIfAbsent) |
<R,UA,RA> R |
syncUpdate(net.openhft.chronicle.core.util.SerializableUpdaterWithArg updateFunction,
UA ua,
net.openhft.chronicle.core.util.SerializableBiFunction returnFunction,
RA ra) |
@NotNull String |
toString() |
@NotNull KeyValueStore<K,V> |
underlying() |
@NotNull Collection<V> |
values() |
Class<V> |
valueType() |
attempt, performClose, proxyReturnBoolean, proxyReturnBooleanWithArgs, proxyReturnBooleanWithSequence, proxyReturnByte, proxyReturnByte, proxyReturnInt, proxyReturnInt, proxyReturnLong, proxyReturnLongWithArgs, proxyReturnTypedObject, proxyReturnTypedObject, proxyReturnTypedObject, proxyReturnUint16, proxyReturnVoid, proxyReturnVoid, proxyReturnWireConsumer, proxyReturnWireConsumerInOut, proxyReturnWireTypedObject, readBoolean, readInt, sendBytes, sendEvent, sendEventAsync, toParameters, toParameters, writeMetaDataForKnownTID
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isReadOnly, keySetIterator, removeIfEqual, replaceIfEqual, segmentFor, segments, valuesIterator
close, closeQuietly, closeQuietly, notifyClosing, warnAndCloseIfNotClosed
isClosed, isClosing, throwExceptionIfClosed
public RemoteKeyValueStore(@NotNull @NotNull RequestContext context, @NotNull @NotNull Asset asset, @NotNull @NotNull net.openhft.chronicle.network.connection.TcpChannelHub hub)
public RemoteKeyValueStore(@NotNull @NotNull RequestContext requestContext, @NotNull @NotNull Asset asset)
public boolean isKeyType(Object key)
isKeyType
in interface KeyValueStore<K,V>
@NotNull public @NotNull File file()
@Nullable public V putIfAbsent(K key, V value)
putIfAbsent
in interface KeyValueStore<K,V>
public boolean containsValue(V value)
containsValue
in interface KeyValueStore<K,V>
@Nullable public V replace(K key, V value)
replace
in interface KeyValueStore<K,V>
@Nullable public <A,R> R applyTo(@NotNull @NotNull net.openhft.chronicle.core.util.SerializableBiFunction<MapView<K,V>,A,R> function, A arg)
@Nullable public <R,UA,RA> R syncUpdate(net.openhft.chronicle.core.util.SerializableUpdaterWithArg updateFunction, UA ua, net.openhft.chronicle.core.util.SerializableBiFunction returnFunction, RA ra)
public <A> void asyncUpdate(net.openhft.chronicle.core.util.SerializableUpdaterWithArg updateFunction, A arg)
public void keysFor(int segment, @NotNull @NotNull SubscriptionConsumer<K> kConsumer)
keysFor
in interface KeyValueStore<K,V>
public void entriesFor(int segment, @NotNull @NotNull SubscriptionConsumer<MapEvent<K,V>> kvConsumer)
entriesFor
in interface KeyValueStore<K,V>
public boolean equals(@Nullable @Nullable Object object)
object
is
serialized. This equals can be used to compare map that extends ChronicleMap. So two
Chronicle Maps that contain the same data are considered equal, even if the instances of the
chronicle maps were of different typespublic boolean isEmpty()
public boolean containsKey(Object key)
containsKey
in interface KeyValueStore<K,V>
@Nullable public V getUsing(K key, Object usingValue)
getUsing
in interface KeyValueStore<K,V>
public long longSize()
longSize
in interface KeyValueStore<K,V>
public boolean remove(Object key)
KeyValueStore
remove
in interface KeyValueStore<K,V>
key
- to remove@Nullable public V getAndRemove(Object key)
getAndRemove
in interface KeyValueStore<K,V>
public boolean put(K key, V value)
KeyValueStore
put
in interface KeyValueStore<K,V>
key
- to setvalue
- to set@Nullable public V getAndPut(Object key, Object value)
getAndPut
in interface KeyValueStore<K,V>
public void clear()
clear
in interface KeyValueStore<K,V>
@NotNull public @NotNull Collection<V> values()
@NotNull public @NotNull Iterator<Map.Entry<K,V>> entrySetIterator()
entrySetIterator
in interface KeyValueStore<K,V>
@NotNull public @NotNull Asset asset()
asset
in interface Assetted<KeyValueStore<K,V>>
@NotNull public @NotNull KeyValueStore<K,V> underlying()
underlying
in interface Assetted<KeyValueStore<K,V>>
@NotNull public @NotNull ObjectSubscription<K,V> subscription(boolean createIfAbsent)
subscription
in interface SubscriptionKeyValueStore<K,V>
Copyright © 2021. All rights reserved.