public final class VanillaAuthorisedMapView<K,V> extends VanillaMapView<K,V> implements MapView<K,V>
asset, context, keyClass, putReturnsNull, removeReturnsNull, valueType
Constructor and Description |
---|
VanillaAuthorisedMapView(@NotNull RequestContext context,
@NotNull Asset asset,
@NotNull KeyValueStore<K,V> kvStore) |
Modifier and Type | Method and Description |
---|---|
<V1> @NotNull Function<K,V1> |
andThen(@NotNull Function<? super V,? extends V1> after) |
V |
apply(K k) |
<A,R> R |
applyTo(@NotNull net.openhft.chronicle.core.util.SerializableBiFunction<MapView<K,V>,A,R> function,
A arg)
Apply a function to an Updatable which is assumed to not change the visited in any significant way.
|
<R> R |
applyTo(@NotNull net.openhft.chronicle.core.util.SerializableFunction<MapView<K,V>,R> function)
Apply a function to an Updatable which is assumed to not change the visited in any significant way.
|
<T,R> R |
applyToKey(K key,
@NotNull net.openhft.chronicle.core.util.SerializableBiFunction<V,T,R> function,
T argument)
Apply a function which takes an argument.
|
<R> R |
applyToKey(K key,
@NotNull net.openhft.chronicle.core.util.SerializableFunction<V,R> function)
Apply a function to the visitable and return the result.
|
@NotNull Asset |
asset() |
void |
asyncUpdate(@NotNull net.openhft.chronicle.core.util.SerializableUpdater<MapView<K,V>> updateFunction)
Update an Updatable potentially asynchronously.
|
<A> void |
asyncUpdate(@NotNull net.openhft.chronicle.core.util.SerializableUpdaterWithArg<MapView<K,V>,A> updateFunction,
A arg)
Update an Updatable potentially asynchronously.
|
<T> void |
asyncUpdateKey(K key,
@NotNull net.openhft.chronicle.core.util.SerializableBiFunction<V,T,V> updateFunction,
T argument)
Apply a function to visitable potentially asynchronously.
|
void |
asyncUpdateKey(K key,
@NotNull net.openhft.chronicle.core.util.SerializableFunction<V,V> updateFunction)
Apply a function to visitable potentially asynchronously.
|
void |
clear() |
<V1> @NotNull Function<V1,V> |
compose(@NotNull Function<? super V1,? extends K> before) |
V |
compute(K key,
BiFunction<? super K,? super V,? extends V> remappingFunction) |
V |
computeIfAbsent(K key,
Function<? super K,? extends V> mappingFunction) |
V |
computeIfPresent(K key,
BiFunction<? super K,? super V,? extends V> remappingFunction) |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
@NotNull EntrySetView<K,V> |
entrySet() |
void |
forEach(BiConsumer<? super K,? super V> action) |
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 |
getOrDefault(Object key,
V defaultValue) |
V |
getUsing(K key,
Object value)
Obtain a value using a mutable buffer provided.
|
boolean |
isEmpty() |
@NotNull KeySetView<K> |
keySet() |
long |
longSize() |
V |
merge(K key,
V value,
BiFunction<? super V,? super V,? extends V> remappingFunction) |
V |
put(K key,
V value) |
void |
putAll(@NotNull Map<? extends K,? extends V> m) |
V |
putIfAbsent(K key,
V value) |
@NotNull Reference<V> |
referenceFor(K key)
Obtain a reference the value for a key
|
V |
remove(Object key) |
boolean |
remove(@NotNull Object key,
Object value) |
V |
replace(K key,
V value) |
boolean |
replace(K key,
V oldValue,
V newValue) |
void |
replaceAll(BiFunction<? super K,? super V,? extends V> function) |
void |
set(K key,
V value) |
int |
size() |
<R> R |
syncUpdate(@NotNull net.openhft.chronicle.core.util.SerializableUpdater<MapView<K,V>> updateFunction,
@NotNull net.openhft.chronicle.core.util.SerializableFunction<MapView<K,V>,R> returnFunction)
Apply a function to update an Updatable and apply a second function to derive some information from it.
|
<UA,RA,R> R |
syncUpdate(@NotNull net.openhft.chronicle.core.util.SerializableUpdaterWithArg<MapView<K,V>,UA> updateFunction,
UA ua,
@NotNull net.openhft.chronicle.core.util.SerializableBiFunction<MapView<K,V>,RA,R> returnFunction,
RA returnArgument)
Apply a function to update an Updatable and apply a second function to derive some information from it.
|
<T,A,R> R |
syncUpdateKey(K key,
@NotNull net.openhft.chronicle.core.util.SerializableBiFunction<V,T,V> updateFunction,
T updateArgument,
@NotNull net.openhft.chronicle.core.util.SerializableBiFunction<V,A,R> returnFunction,
A returnArgument)
Apply a function to update the state of a visible, and apply a function to return a result object synchronously.
|
<R> R |
syncUpdateKey(K key,
@NotNull net.openhft.chronicle.core.util.SerializableFunction<V,V> updateFunction,
@NotNull net.openhft.chronicle.core.util.SerializableFunction<V,R> returnFunction)
Apply a function to update the state of a visible, and apply a function to return a result object synchronously.
|
@NotNull String |
toString() |
@Nullable KeyValueStore<K,V> |
underlying() |
@NotNull Collection<V> |
values() |
checkKey, checkValue, equals, hashCode, keyType, registerKeySubscriber, registerKeySubscriber, registerSubscriber, registerSubscriber, registerTopicSubscriber, valueType
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
keyType, registerKeySubscriber, registerKeySubscriber, registerSubscriber, registerSubscriber, registerTopicSubscriber, valueType
public VanillaAuthorisedMapView(@NotNull @NotNull RequestContext context, @NotNull @NotNull Asset asset, @NotNull @NotNull KeyValueStore<K,V> kvStore)
public V getOrDefault(Object key, V defaultValue)
getOrDefault
in interface ConcurrentMap<K,V>
getOrDefault
in interface Map<K,V>
@Nullable public V getAndPut(K key, V value)
MapView
@Nullable public V getAndRemove(K key)
MapView
getAndRemove
in interface MapView<K,V>
getAndRemove
in class VanillaMapView<K,V>
key
- to remove@Nullable public V getUsing(K key, Object value)
MapView
public long longSize()
public void clear()
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
containsValue
in class VanillaMapView<K,V>
@NotNull public @NotNull Asset asset()
@Nullable public @Nullable KeyValueStore<K,V> underlying()
underlying
in interface Assetted<Object>
underlying
in class VanillaMapView<K,V>
@NotNull public @NotNull KeySetView<K> keySet()
@NotNull public @NotNull Collection<V> values()
public boolean isEmpty()
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
containsKey
in class VanillaMapView<K,V>
public void set(K key, V value)
set
in interface KeyedVisitable<K,V>
set
in class VanillaMapView<K,V>
key
- to set within this collection.value
- replace the current state of the visitable Asset@NotNull public @NotNull EntrySetView<K,V> entrySet()
@Nullable public V putIfAbsent(@NotNull K key, V value)
putIfAbsent
in interface ConcurrentMap<K,V>
putIfAbsent
in interface Map<K,V>
putIfAbsent
in class VanillaMapView<K,V>
@NotNull public @NotNull Reference<V> referenceFor(K key)
MapView
referenceFor
in interface MapView<K,V>
referenceFor
in class VanillaMapView<K,V>
key
- to bind the reference to@NotNull public @NotNull String toString()
toString
in class VanillaMapView<K,V>
public int size()
public void forEach(BiConsumer<? super K,? super V> action)
public void replaceAll(BiFunction<? super K,? super V,? extends V> function)
replaceAll
in interface ConcurrentMap<K,V>
replaceAll
in interface Map<K,V>
public V computeIfAbsent(K key, Function<? super K,? extends V> mappingFunction)
computeIfAbsent
in interface ConcurrentMap<K,V>
computeIfAbsent
in interface Map<K,V>
public V computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)
computeIfPresent
in interface ConcurrentMap<K,V>
computeIfPresent
in interface Map<K,V>
@NotNull public <V1> @NotNull Function<V1,V> compose(@NotNull @NotNull Function<? super V1,? extends K> before)
@NotNull public <V1> @NotNull Function<K,V1> andThen(@NotNull @NotNull Function<? super V,? extends V1> after)
@Nullable public <R> R applyToKey(K key, @NotNull @NotNull net.openhft.chronicle.core.util.SerializableFunction<V,R> function)
KeyedVisitable
applyToKey
in interface KeyedVisitable<K,V>
R
- data type to return.key
- to visit within this collection.function
- to apply e.g. call a getterpublic void asyncUpdateKey(K key, @NotNull @NotNull net.openhft.chronicle.core.util.SerializableFunction<V,V> updateFunction)
KeyedVisitable
asyncUpdateKey
in interface KeyedVisitable<K,V>
key
- to visit within this collection.updateFunction
- to update the state of the visibility.@Nullable public <R> R syncUpdateKey(K key, @NotNull @NotNull net.openhft.chronicle.core.util.SerializableFunction<V,V> updateFunction, @NotNull @NotNull net.openhft.chronicle.core.util.SerializableFunction<V,R> returnFunction)
KeyedVisitable
syncUpdateKey
in interface KeyedVisitable<K,V>
R
- data type to return.key
- to update within this collection.updateFunction
- update to apply to the value.returnFunction
- derive an object to return@Nullable public <T,R> R applyToKey(K key, @NotNull @NotNull net.openhft.chronicle.core.util.SerializableBiFunction<V,T,R> function, T argument)
KeyedVisitable
applyToKey
in interface KeyedVisitable<K,V>
T
- type of the argumentR
- type of the return value.key
- to visit within this collection.function
- to applyargument
- for the functions use.public <T> void asyncUpdateKey(K key, @NotNull @NotNull net.openhft.chronicle.core.util.SerializableBiFunction<V,T,V> updateFunction, T argument)
KeyedVisitable
asyncUpdateKey
in interface KeyedVisitable<K,V>
T
- type of the argumentkey
- to update within this collectionupdateFunction
- to update the state of the visitable.argument
- for the functions use.@Nullable public <T,A,R> R syncUpdateKey(K key, @NotNull @NotNull net.openhft.chronicle.core.util.SerializableBiFunction<V,T,V> updateFunction, @Nullable T updateArgument, @NotNull @NotNull net.openhft.chronicle.core.util.SerializableBiFunction<V,A,R> returnFunction, @Nullable A returnArgument)
KeyedVisitable
syncUpdateKey
in interface KeyedVisitable<K,V>
T
- update argument type.A
- return argument type.R
- data type to return.key
- to update within this collectionupdateFunction
- update to apply to the value.updateArgument
- for the update function to use.returnFunction
- derive an object to returnreturnArgument
- for the return value function to use@Nullable public <R> R applyTo(@NotNull @NotNull net.openhft.chronicle.core.util.SerializableFunction<MapView<K,V>,R> function)
Updatable
public void asyncUpdate(@NotNull @NotNull net.openhft.chronicle.core.util.SerializableUpdater<MapView<K,V>> updateFunction)
Updatable
asyncUpdate
in interface Updatable<MapView<K,V>>
updateFunction
- to apply.@Nullable public <R> R syncUpdate(@NotNull @NotNull net.openhft.chronicle.core.util.SerializableUpdater<MapView<K,V>> updateFunction, @NotNull @NotNull net.openhft.chronicle.core.util.SerializableFunction<MapView<K,V>,R> returnFunction)
Updatable
syncUpdate
in interface Updatable<MapView<K,V>>
R
- data type to return.updateFunction
- to apply the update.returnFunction
- to derive some data@Nullable public <A,R> R applyTo(@NotNull @NotNull net.openhft.chronicle.core.util.SerializableBiFunction<MapView<K,V>,A,R> function, A arg)
Updatable
public <A> void asyncUpdate(@NotNull @NotNull net.openhft.chronicle.core.util.SerializableUpdaterWithArg<MapView<K,V>,A> updateFunction, A arg)
Updatable
asyncUpdate
in interface Updatable<MapView<K,V>>
A
- argument type.updateFunction
- to apply.arg
- argument to apply@Nullable public <UA,RA,R> R syncUpdate(@NotNull @NotNull net.openhft.chronicle.core.util.SerializableUpdaterWithArg<MapView<K,V>,UA> updateFunction, UA ua, @NotNull @NotNull net.openhft.chronicle.core.util.SerializableBiFunction<MapView<K,V>,RA,R> returnFunction, RA returnArgument)
Updatable
syncUpdate
in interface Updatable<MapView<K,V>>
UA
- update argument typeRA
- return argument typeR
- return typeupdateFunction
- to apply the update.ua
- update argumentreturnFunction
- to derive some datareturnArgument
- return argumentCopyright © 2021. All rights reserved.