K
- the type of keys maintained by this mapV
- the type of mapped valuespublic interface DistributedMap<K,V> extends ConcurrentMap<K,V>, Observable<EntryListener<K,V>>
NOTE: events
delivery is not guaranteed; events can
get lost because of network issues.
Modifier and Type | Method and Description |
---|---|
void |
lock(K key)
Acquires the lock for the specified key.
|
void |
lock(K key,
long leaseTime,
TimeUnit timeUnit)
Acquires the lock for the specified key for the specified lease time.
|
V |
put(K key,
V value,
long ttl,
TimeUnit timeUnit)
Puts an entry into this map with a given ttl (time to live) value.
|
void |
unlock(K key)
Releases the lock for the specified key.
|
Collection<V> |
values(DistributedPredicate predicate)
Queries the distributed map on the specified predicate and returns
matched values.
|
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
register, unregister
Collection<V> values(DistributedPredicate predicate)
predicate
- specifies query criteriavoid lock(K key)
key
- void lock(K key, long leaseTime, TimeUnit timeUnit)
key
- leaseTime
- timeUnit
- void unlock(K key)
key
- Copyright © 2016. All Rights Reserved.