Top Inners Fields Constructors Methods
io.vertx.core.shareddata.impl

public Class LocalAsyncMapImpl<K, V>

extends Object
implements AsyncMap<K, V>
Class Inheritance
All Implemented Interfaces
io.vertx.core.shareddata.AsyncMap
Imports
io.vertx.core.Future, io.vertx.core.impl.ContextInternal, .VertxInternal, io.vertx.core.shareddata.AsyncMap, java.util.HashMap, .HashSet, .List, .Map, .Objects, .Set, java.util.concurrent.ConcurrentHashMap, .ConcurrentMap, java.util.concurrent.atomic.AtomicBoolean

Author
Thomas Segismont

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final ConcurrentMap<K, LocalAsyncMapImpl.Holder<V>>
private final VertxInternal

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Future<Void>
clear()

Implements io.vertx.core.shareddata.AsyncMap.clear.

Same as clear(Handler) but returns a Future of the asynchronous result

public Future<Map<K, V>>
entries()

Implements io.vertx.core.shareddata.AsyncMap.entries.

Same as entries(Handler) but returns a Future of the asynchronous result

public Future<V>
get(K k)

Implements io.vertx.core.shareddata.AsyncMap.get.

Same as get(K, Handler) but returns a Future of the asynchronous result

public Future<Set<K>>
keys()

Implements io.vertx.core.shareddata.AsyncMap.keys.

Same as keys(Handler) but returns a Future of the asynchronous result

public Future<Void>
put(K k, V v)

Implements io.vertx.core.shareddata.AsyncMap.put.

Same as put(K, V, Handler) but returns a Future of the asynchronous result

public Future<Void>
put(K k, V v, long ttl)

Implements io.vertx.core.shareddata.AsyncMap.put.

Same as put(K, V, long, Handler) but returns a Future of the asynchronous result

public Future<V>
putIfAbsent(K k, V v)

Implements io.vertx.core.shareddata.AsyncMap.putIfAbsent.

Same as putIfAbsent(K, V, Handler) but returns a Future of the asynchronous result

public Future<V>
putIfAbsent(K k, V v, long ttl)

Implements io.vertx.core.shareddata.AsyncMap.putIfAbsent.

Same as putIfAbsent(K, V, long, Handler) but returns a Future of the asynchronous result

public Future<V>
remove(K k)

Implements io.vertx.core.shareddata.AsyncMap.remove.

Same as remove(K, Handler) but returns a Future of the asynchronous result

private void
public Future<Boolean>
removeIfPresent(K k, V v)

Implements io.vertx.core.shareddata.AsyncMap.removeIfPresent.

Same as removeIfPresent(K, V, Handler) but returns a Future of the asynchronous result

public Future<V>
replace(K k, V v)

Implements io.vertx.core.shareddata.AsyncMap.replace.

Same as replace(K, V, Handler) but returns a Future of the asynchronous result

public Future<V>
replace(K k, V v, long ttl)

Overrides default io.vertx.core.shareddata.AsyncMap.replace.

Same as replace(K, V, long, Handler) but returns a Future of the asynchronous result returns UnsupportedOperationException if the implementation does not support it

public Future<Boolean>
replaceIfPresent(K k, V oldValue, V newValue)

Implements io.vertx.core.shareddata.AsyncMap.replaceIfPresent.

Same as replaceIfPresent(K, V, V, Handler) but returns a Future of the asynchronous result

public Future<Boolean>
replaceIfPresent(K k, V oldValue, V newValue, long ttl)

Overrides default io.vertx.core.shareddata.AsyncMap.replaceIfPresent.

Same as replaceIfPresent(K, V, V, long, Handler) but returns a Future of the asynchronous result returns UnsupportedOperationException if the implementation does not support it

public Future<Integer>
size()

Implements io.vertx.core.shareddata.AsyncMap.size.

Same as size(Handler) but returns a Future of the asynchronous result

public Future<List<V>>
values()

Implements io.vertx.core.shareddata.AsyncMap.values.

Same as values(Handler) but returns a Future of the asynchronous result

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mapback to summary
private final ConcurrentMap<K, LocalAsyncMapImpl.Holder<V>> map
vertxback to summary
private final VertxInternal vertx

Constructor Detail

LocalAsyncMapImplback to summary
public LocalAsyncMapImpl(VertxInternal vertx)

Method Detail

clearback to summary
public Future<Void> clear()

Implements io.vertx.core.shareddata.AsyncMap.clear.

Doc from io.vertx.core.shareddata.AsyncMap.clear.

Same as clear(Handler) but returns a Future of the asynchronous result

Annotations
@Override
entriesback to summary
public Future<Map<K, V>> entries()

Implements io.vertx.core.shareddata.AsyncMap.entries.

Doc from io.vertx.core.shareddata.AsyncMap.entries.

Same as entries(Handler) but returns a Future of the asynchronous result

Annotations
@Override
getback to summary
public Future<V> get(K k)

Implements io.vertx.core.shareddata.AsyncMap.get.

Doc from io.vertx.core.shareddata.AsyncMap.get.

Same as get(K, Handler) but returns a Future of the asynchronous result

Annotations
@Override
keysback to summary
public Future<Set<K>> keys()

Implements io.vertx.core.shareddata.AsyncMap.keys.

Doc from io.vertx.core.shareddata.AsyncMap.keys.

Same as keys(Handler) but returns a Future of the asynchronous result

Annotations
@Override
putback to summary
public Future<Void> put(K k, V v)

Implements io.vertx.core.shareddata.AsyncMap.put.

Doc from io.vertx.core.shareddata.AsyncMap.put.

Same as put(K, V, Handler) but returns a Future of the asynchronous result

Annotations
@Override
putback to summary
public Future<Void> put(K k, V v, long ttl)

Implements io.vertx.core.shareddata.AsyncMap.put.

Doc from io.vertx.core.shareddata.AsyncMap.put.

Same as put(K, V, long, Handler) but returns a Future of the asynchronous result

Annotations
@Override
putIfAbsentback to summary
public Future<V> putIfAbsent(K k, V v)

Implements io.vertx.core.shareddata.AsyncMap.putIfAbsent.

Doc from io.vertx.core.shareddata.AsyncMap.putIfAbsent.

Same as putIfAbsent(K, V, Handler) but returns a Future of the asynchronous result

Annotations
@Override
putIfAbsentback to summary
public Future<V> putIfAbsent(K k, V v, long ttl)

Implements io.vertx.core.shareddata.AsyncMap.putIfAbsent.

Doc from io.vertx.core.shareddata.AsyncMap.putIfAbsent.

Same as putIfAbsent(K, V, long, Handler) but returns a Future of the asynchronous result

Annotations
@Override
removeback to summary
public Future<V> remove(K k)

Implements io.vertx.core.shareddata.AsyncMap.remove.

Doc from io.vertx.core.shareddata.AsyncMap.remove.

Same as remove(K, Handler) but returns a Future of the asynchronous result

Annotations
@Override
removeIfExpiredback to summary
private void removeIfExpired(K k)
removeIfPresentback to summary
public Future<Boolean> removeIfPresent(K k, V v)

Implements io.vertx.core.shareddata.AsyncMap.removeIfPresent.

Doc from io.vertx.core.shareddata.AsyncMap.removeIfPresent.

Same as removeIfPresent(K, V, Handler) but returns a Future of the asynchronous result

Annotations
@Override
replaceback to summary
public Future<V> replace(K k, V v)

Implements io.vertx.core.shareddata.AsyncMap.replace.

Doc from io.vertx.core.shareddata.AsyncMap.replace.

Same as replace(K, V, Handler) but returns a Future of the asynchronous result

Annotations
@Override
replaceback to summary
public Future<V> replace(K k, V v, long ttl)

Overrides default io.vertx.core.shareddata.AsyncMap.replace.

Doc from io.vertx.core.shareddata.AsyncMap.replace.

Same as replace(K, V, long, Handler) but returns a Future of the asynchronous result returns UnsupportedOperationException if the implementation does not support it

Annotations
@Override
replaceIfPresentback to summary
public Future<Boolean> replaceIfPresent(K k, V oldValue, V newValue)

Implements io.vertx.core.shareddata.AsyncMap.replaceIfPresent.

Doc from io.vertx.core.shareddata.AsyncMap.replaceIfPresent.

Same as replaceIfPresent(K, V, V, Handler) but returns a Future of the asynchronous result

Annotations
@Override
replaceIfPresentback to summary
public Future<Boolean> replaceIfPresent(K k, V oldValue, V newValue, long ttl)

Overrides default io.vertx.core.shareddata.AsyncMap.replaceIfPresent.

Doc from io.vertx.core.shareddata.AsyncMap.replaceIfPresent.

Same as replaceIfPresent(K, V, V, long, Handler) but returns a Future of the asynchronous result returns UnsupportedOperationException if the implementation does not support it

Annotations
@Override
sizeback to summary
public Future<Integer> size()

Implements io.vertx.core.shareddata.AsyncMap.size.

Doc from io.vertx.core.shareddata.AsyncMap.size.

Same as size(Handler) but returns a Future of the asynchronous result

Annotations
@Override
valuesback to summary
public Future<List<V>> values()

Implements io.vertx.core.shareddata.AsyncMap.values.

Doc from io.vertx.core.shareddata.AsyncMap.values.

Same as values(Handler) but returns a Future of the asynchronous result

Annotations
@Override
io.vertx.core.shareddata.impl back to summary

private Class LocalAsyncMapImpl.Holder<V>

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final long
pack-priv final long
pack-priv final long
pack-priv final V

Constructor Summary

AccessConstructor and Description
pack-priv
Holder(V value)

pack-priv
Holder(V value, long timerId, long ttl, long timestamp)

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
pack-priv boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

timerIdback to summary
pack-priv final long timerId
timestampback to summary
pack-priv final long timestamp
ttlback to summary
pack-priv final long ttl
valueback to summary
pack-priv final V value

Constructor Detail

Holderback to summary
pack-priv Holder(V value)
Holderback to summary
pack-priv Holder(V value, long timerId, long ttl, long timestamp)

Method Detail

expiresback to summary
pack-priv boolean expires()
hasNotExpiredback to summary
pack-priv boolean hasNotExpired()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override