public interface MapView<K,V> extends ConcurrentMap<K,V>, Assetted<Object>, Updatable<MapView<K,V>>, KeyedVisitable<K,V>, Function<K,V>, KeyedView
Modifier and Type | Method and Description |
---|---|
default V |
apply(K k) |
@NotNull EntrySetView<K,V> |
entrySet() |
V |
getAndPut(K key,
V value)
Explicitly get the old value before putting a new one.
|
V |
getAndRemove(K key)
Explicitly get the old value before removing.
|
V |
getUsing(K key,
Object using)
Obtain a value using a mutable buffer provided.
|
@NotNull KeySetView<K> |
keySet() |
Class<K> |
keyType() |
long |
longSize() |
Reference<V> |
referenceFor(K key)
Obtain a reference the value for a key
|
void |
registerKeySubscriber(@NotNull Subscriber<? super K> subscriber)
Add a Subscription for the keys changed on this Map
|
void |
registerKeySubscriber(@NotNull Subscriber<? super K> subscriber,
@NotNull Filter filter,
@NotNull Set<RequestContext.Operation> contextOperations)
Add a Subscription for the keys changed on this Map
|
void |
registerSubscriber(@NotNull Subscriber<? extends MapEvent<? super K,? super V>> subscriber)
Add a Subscription for the MapEvents triggered by changes on this Map.
|
void |
registerSubscriber(@NotNull Subscriber<? extends MapEvent<? super K,? super V>> subscriber,
@NotNull Filter<? extends MapEvent<? super K,? super V>> filter,
@NotNull Set<RequestContext.Operation> contextOperations)
Add a Subscription for the MapEvents triggered by changes on this Map.
|
void |
registerTopicSubscriber(@NotNull TopicSubscriber<? super K,? super V> topicSubscriber)
Add a TopicSubscriber to this Map.
|
default int |
size() |
Class<V> |
valueType() |
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, values
asset, underlying
applyTo, applyTo, asyncUpdate, asyncUpdate, syncUpdate, syncUpdate
applyToKey, applyToKey, asyncUpdateKey, asyncUpdateKey, get, set, syncUpdateKey, syncUpdateKey
@NotNull @NotNull EntrySetView<K,V> entrySet()
@Nullable V getUsing(K key, Object using)
key
- to lookup.using
- a mutable buffervoid registerTopicSubscriber(@NotNull @NotNull TopicSubscriber<? super K,? super V> topicSubscriber)
Any given instance of a subscriber must at most be registered once with a DataGrid instance at any given time.
This method is asynchronous and the provided subscriber will be eligible for receiving events as some later unspecified time.
topicSubscriber
- to addvoid registerKeySubscriber(@NotNull @NotNull Subscriber<? super K> subscriber)
Any given instance of a subscriber must at most be registered once with a DataGrid instance at any given time.
This method is asynchronous and the provided subscriber will be eligible for receiving events as some later unspecified time.
subscriber
- to addvoid registerKeySubscriber(@NotNull @NotNull Subscriber<? super K> subscriber, @NotNull @NotNull Filter filter, @NotNull @NotNull Set<RequestContext.Operation> contextOperations)
Any given instance of a subscriber must at most be registered once with a DataGrid instance at any given time.
This method is asynchronous and the provided subscriber will be eligible for receiving events as some later unspecified time.
subscriber
- to addfilter
- a list of filter operationscontextOperations
- which optional operations to consider (e.g. bootstrap and ending after bootstrap)void registerSubscriber(@NotNull @NotNull Subscriber<? extends MapEvent<? super K,? super V>> subscriber)
Any given instance of a subscriber must at most be registered once with a DataGrid instance at any given time.
This method is asynchronous and the provided subscriber will be eligible for receiving events as some later unspecified time.
subscriber
- the subscriber to the subscriptionvoid registerSubscriber(@NotNull @NotNull Subscriber<? extends MapEvent<? super K,? super V>> subscriber, @NotNull @NotNull Filter<? extends MapEvent<? super K,? super V>> filter, @NotNull @NotNull Set<RequestContext.Operation> contextOperations)
Any given instance of a subscriber must at most be registered once with a DataGrid instance at any given time.
This method is asynchronous and the provided subscriber will be eligible for receiving events as some later unspecified time.
subscriber
- the subscriber to the subscriptionfilter
- to apply on keys and valuescontextOperations
- which optional operations to consider (e.g. bootstrap and ending after bootstrap)Reference<V> referenceFor(K key)
key
- to bind the reference tolong longSize()
@Nullable V getAndPut(K key, V value)
key
- to lookupvalue
- to setCopyright © 2021. All rights reserved.