K
- keyV
- valuepublic class RedissonMap<K,V> extends Object implements RMap<K,V>
ConcurrentMap
and Map
Modifier | Constructor and Description |
---|---|
protected |
RedissonMap(ConnectionManager connectionManager,
String name) |
Modifier and Type | Method and Description |
---|---|
V |
addAndGet(K key,
V value)
Atomically adds the given
delta to the current value
by mapped key . |
void |
clear() |
boolean |
clearExpire()
Remove the existing timeout of Redisson object
|
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
void |
delete()
Deletes the object
|
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
expire(long timeToLive,
TimeUnit timeUnit) |
boolean |
expireAt(Date timestamp) |
boolean |
expireAt(long timestamp) |
boolean |
fastPut(K key,
V value)
Associates the specified
value with the specified key . |
io.netty.util.concurrent.Future<Boolean> |
fastPutAsync(K key,
V value)
Associates the specified
value with the specified key
in async manner. |
long |
fastRemove(K... keys)
Removes
keys from map by one operation
Works faster than RMap.remove but not returning
the value associated with key |
io.netty.util.concurrent.Future<Long> |
fastRemoveAsync(K... keys)
Removes
keys from map by one operation in async manner
Works faster than RMap.removeAsync but not returning
the value associated with key |
Map<K,V> |
filterEntries(Predicate<Map.Entry<K,V>> predicate)
Returns a map slice containing the mappings in whose
Map.Entry<K, V> entries
satisfy a predicate. |
Map<K,V> |
filterKeys(Predicate<K> predicate)
Returns a map slice containing the mappings in whose
keys
satisfy a predicate. |
Map<K,V> |
filterValues(Predicate<V> predicate)
Returns a map slice containing the mappings in whose
values
satisfy a predicate. |
V |
get(Object key) |
Map<K,V> |
getAll(Set<K> keys)
Gets a map slice contains the mappings with defined
keys
by one operation. |
io.netty.util.concurrent.Future<V> |
getAsync(K key) |
String |
getName()
Returns name of object
|
boolean |
isEmpty() |
Set<K> |
keySet() |
protected <V> io.netty.util.concurrent.Promise<V> |
newPromise() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> map) |
io.netty.util.concurrent.Future<V> |
putAsync(K key,
V value) |
V |
putIfAbsent(K key,
V value) |
long |
remainTimeToLive()
Remaining time to live of Redisson object that has a timeout
|
V |
remove(Object key) |
boolean |
remove(Object key,
Object value) |
io.netty.util.concurrent.Future<V> |
removeAsync(K key) |
V |
replace(K key,
V value) |
boolean |
replace(K key,
V oldValue,
V newValue) |
int |
size() |
Collection<V> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearExpire, expire, expireAt, expireAt, remainTimeToLive
protected RedissonMap(ConnectionManager connectionManager, String name)
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
public Map<K,V> getAll(Set<K> keys)
RMap
keys
by one operation. This operation NOT traverses all map entries
like any other filter*
method, so works faster.
The returned map is NOT backed by the original map.public V putIfAbsent(K key, V value)
putIfAbsent
in interface ConcurrentMap<K,V>
public boolean remove(Object key, Object value)
remove
in interface ConcurrentMap<K,V>
public boolean replace(K key, V oldValue, V newValue)
replace
in interface ConcurrentMap<K,V>
public io.netty.util.concurrent.Future<V> removeAsync(K key)
removeAsync
in interface RMap<K,V>
public io.netty.util.concurrent.Future<Boolean> fastPutAsync(K key, V value)
RMap
value
with the specified key
in async manner.
Works faster than RMap.putAsync
but not returning
the previous value associated with key
fastPutAsync
in interface RMap<K,V>
true
if key is a new key in the hash and value was set.
false
if key already exists in the hash and the value was updated.public boolean fastPut(K key, V value)
RMap
value
with the specified key
.
Works faster than RMap.put
but not returning
the previous value associated with key
public io.netty.util.concurrent.Future<Long> fastRemoveAsync(K... keys)
RMap
keys
from map by one operation in async manner
Works faster than RMap.removeAsync
but not returning
the value associated with key
fastRemoveAsync
in interface RMap<K,V>
public long fastRemove(K... keys)
RMap
keys
from map by one operation
Works faster than RMap.remove
but not returning
the value associated with key
fastRemove
in interface RMap<K,V>
public Map<K,V> filterKeys(Predicate<K> predicate)
RMap
keys
satisfy a predicate. Traverses all map entries.
The returned map is NOT backed by the original map.filterKeys
in interface RMap<K,V>
public Map<K,V> filterValues(Predicate<V> predicate)
RMap
values
satisfy a predicate. Traverses all map entries.
The returned map is NOT backed by the original map.filterValues
in interface RMap<K,V>
public Map<K,V> filterEntries(Predicate<Map.Entry<K,V>> predicate)
RMap
Map.Entry<K, V> entries
satisfy a predicate. This operation traverses all map entries.
The returned map is NOT backed by the original map.filterEntries
in interface RMap<K,V>
public V addAndGet(K key, V value)
RMap
delta
to the current value
by mapped key
.
Works only for numeric values!public boolean expire(long timeToLive, TimeUnit timeUnit)
expire
in interface RExpirable
public boolean expireAt(long timestamp)
expireAt
in interface RExpirable
public boolean expireAt(Date timestamp)
expireAt
in interface RExpirable
public boolean clearExpire()
RExpirable
clearExpire
in interface RExpirable
true
if timeout was removed
false
if object does not exist or does not have an associated timeoutpublic long remainTimeToLive()
RExpirable
remainTimeToLive
in interface RExpirable
protected <V> io.netty.util.concurrent.Promise<V> newPromise()
Copyright © 2014. All rights reserved.