public class VanillaMapView<K,MV,V> extends Object implements MapView<K,MV,V>
| Constructor and Description |
|---|
VanillaMapView(Class keyClass,
Class valueType,
Asset asset,
KeyValueStore<K,MV,V> kvStore,
boolean putReturnsNull,
boolean removeReturnsNull) |
VanillaMapView(RequestContext context,
Asset asset,
KeyValueStore<K,MV,V> kvStore) |
| Modifier and Type | Method and Description |
|---|---|
Asset |
asset() |
protected void |
checkKey(Object key) |
protected void |
checkValue(Object value) |
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object obj) |
V |
get(Object key) |
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,
MV usingValue)
Obtain a value using a mutable buffer privided.
|
int |
hashCode() |
boolean |
isEmpty() |
Set<K> |
keySet() |
Class<K> |
keyType() |
long |
longSize() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
putIfAbsent(K key,
V value) |
Reference<V> |
referenceFor(K key)
Obtain a reference the value for a key
|
void |
registerKeySubscriber(Subscriber<K> subscriber)
Add a Subscription for the keys changed on this Map
|
void |
registerSubscriber(Subscriber<MapEvent<K,V>> subscriber)
Add a Subscription for the MapEvents triggered by changes on this Map.
|
void |
registerTopicSubscriber(TopicSubscriber<K,V> topicSubscriber)
Add a TopicSubscriber to this Map.
|
V |
remove(Object key) |
boolean |
remove(Object key,
Object value) |
V |
replace(K key,
V value) |
boolean |
replace(K key,
V oldValue,
V newValue) |
void |
set(K key,
V value) |
String |
toString() |
KeyValueStore<K,MV,V> |
underlying() |
Collection<V> |
values() |
Class<V> |
valueType() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitapply, keyedView, sizecompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAllapplyTo, applyTo, asyncUpdate, asyncUpdate, syncUpdate, syncUpdateapplyToKey, applyToKey, asyncUpdateKey, asyncUpdateKey, syncUpdateKey, syncUpdateKeyandThen, compose, identitypublic VanillaMapView(@NotNull
RequestContext context,
Asset asset,
KeyValueStore<K,MV,V> kvStore)
public V getUsing(K key, MV usingValue)
MapViewpublic boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>protected void checkKey(@Nullable
Object key)
protected void checkValue(@Nullable
Object value)
public Asset asset()
public KeyValueStore<K,MV,V> underlying()
underlying in interface Assetted<KeyValueStore<K,MV,V>>public void set(K key, V value)
set in interface KeyedVisitable<K,V>key - to set within this collection.value - replace the current state of the visitable Assetpublic long longSize()
public V getAndPut(K key, V value)
MapViewpublic V getAndRemove(K key)
MapViewgetAndRemove in interface MapView<K,MV,V>key - to remove@Nullable public V putIfAbsent(@NotNull K key, V value)
putIfAbsent in interface ConcurrentMap<K,V>putIfAbsent in interface Map<K,V>public void registerTopicSubscriber(TopicSubscriber<K,V> topicSubscriber)
MapViewregisterTopicSubscriber in interface MapView<K,MV,V>topicSubscriber - to addpublic void registerKeySubscriber(Subscriber<K> subscriber)
MapViewregisterKeySubscriber in interface MapView<K,MV,V>subscriber - to addpublic void registerSubscriber(Subscriber<MapEvent<K,V>> subscriber)
MapViewregisterSubscriber in interface MapView<K,MV,V>public Reference<V> referenceFor(K key)
MapViewreferenceFor in interface MapView<K,MV,V>key - to bind the reference topublic int hashCode()
public boolean equals(Object obj)
Copyright © 2015. All rights reserved.