K - key typeV - value typepublic class RedissonListMultimapReactive<K,V> extends Object implements RListMultimapReactive<K,V>
| Constructor and Description |
|---|
RedissonListMultimapReactive(UUID id,
Codec codec,
CommandReactiveExecutor commandExecutor,
String name) |
RedissonListMultimapReactive(UUID id,
CommandReactiveExecutor commandExecutor,
String name) |
| Modifier and Type | Method and Description |
|---|---|
org.reactivestreams.Publisher<Boolean> |
clearExpire()
Clear an expire timeout or expire date for object in mode.
|
org.reactivestreams.Publisher<Boolean> |
containsEntry(Object key,
Object value)
Returns
true if this multimap contains at least one key-value pair
with the key key and the value value. |
org.reactivestreams.Publisher<Boolean> |
containsKey(Object key)
Returns
true if this multimap contains at least one key-value pair
with the key key. |
org.reactivestreams.Publisher<Boolean> |
containsValue(Object value)
Returns
true if this multimap contains at least one key-value pair
with the value value. |
org.reactivestreams.Publisher<Boolean> |
delete()
Delete object in mode
|
protected void |
encode(Collection<Object> params,
Collection<?> values) |
protected io.netty.buffer.ByteBuf |
encode(Object value) |
protected io.netty.buffer.ByteBuf |
encodeMapKey(Object value) |
protected io.netty.buffer.ByteBuf |
encodeMapValue(Object value) |
org.reactivestreams.Publisher<Boolean> |
expire(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object in mode.
|
org.reactivestreams.Publisher<Boolean> |
expireAt(Date timestamp)
Set an expire date for object in mode.
|
org.reactivestreams.Publisher<Boolean> |
expireAt(long timestamp)
Set an expire date for object in mode.
|
org.reactivestreams.Publisher<Long> |
fastRemove(K... keys)
Removes
keys from map by one operation
Works faster than RMultimap.remove but not returning
the value associated with key |
RListReactive<V> |
get(K key)
Returns a view List of the values associated with
key in this
multimap, if any. |
org.reactivestreams.Publisher<List<V>> |
getAll(K key)
Returns all elements at once.
|
Codec |
getCodec() |
String |
getName() |
org.reactivestreams.Publisher<Boolean> |
isExists()
Check object existence
|
org.reactivestreams.Publisher<Integer> |
keySize()
Returns the number of key-value pairs in this multimap.
|
org.reactivestreams.Publisher<Void> |
migrate(String host,
int port,
int database,
long timeout)
Transfer a object from a source Redis instance to a destination Redis instance
in mode
|
org.reactivestreams.Publisher<Boolean> |
move(int database)
Move object to another database in mode
|
protected <V> reactor.core.publisher.Mono<V> |
newSucceeded(V result) |
org.reactivestreams.Publisher<Boolean> |
put(K key,
V value)
Stores a key-value pair in this multimap.
|
org.reactivestreams.Publisher<Boolean> |
putAll(K key,
Iterable<? extends V> values)
Stores a key-value pair in this multimap for each of
values, all
using the same key, key. |
<R> org.reactivestreams.Publisher<R> |
reactive(Supplier<RFuture<R>> supplier) |
org.reactivestreams.Publisher<Set<K>> |
readAllKeySet()
Read all keys at once
|
org.reactivestreams.Publisher<Long> |
remainTimeToLive()
Get remaining time to live of object in milliseconds.
|
org.reactivestreams.Publisher<Boolean> |
remove(Object key,
Object value)
Removes a single key-value pair with the key
key and the value
value from this multimap, if such exists. |
org.reactivestreams.Publisher<List<V>> |
removeAll(Object key)
Removes all values associated with the key
key. |
org.reactivestreams.Publisher<Void> |
rename(String newName)
Rename current object key to
newName
in mode |
org.reactivestreams.Publisher<Boolean> |
renamenx(String newName)
Rename current object key to
newName
in mode only if new key is not exists |
org.reactivestreams.Publisher<List<V>> |
replaceValues(K key,
Iterable<? extends V> values)
Stores a collection of values with the same key, replacing any existing
values for that key.
|
org.reactivestreams.Publisher<Integer> |
size()
Returns the number of key-value pairs in this multimap.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontainsEntry, containsKey, containsValue, fastRemove, keySize, put, putAll, readAllKeySet, remove, sizeclearExpire, expire, expireAt, expireAt, remainTimeToLiveprotected final RMultimap<K,V> instance
public RedissonListMultimapReactive(UUID id, CommandReactiveExecutor commandExecutor, String name)
public RedissonListMultimapReactive(UUID id, Codec codec, CommandReactiveExecutor commandExecutor, String name)
public RListReactive<V> get(K key)
RListMultimapReactivekey in this
multimap, if any. Note that when containsKey(key) is false, this
returns an empty collection, not null.
Changes to the returned collection will update the underlying multimap, and vice versa.
get in interface RListMultimapReactive<K,V>key - - map keypublic org.reactivestreams.Publisher<List<V>> getAll(K key)
RListMultimapReactivegetAll in interface RListMultimapReactive<K,V>key - - map keypublic org.reactivestreams.Publisher<List<V>> removeAll(Object key)
RListMultimapReactivekey.
Once this method returns, key will not be mapped to any values
Use RMultimapReactive.fastRemove(K...) if values are not needed.
removeAll in interface RListMultimapReactive<K,V>key - - map keypublic org.reactivestreams.Publisher<List<V>> replaceValues(K key, Iterable<? extends V> values)
RListMultimapReactiveIf values is empty, this is equivalent to
RListMultimapReactive.removeAll(Object).
replaceValues in interface RListMultimapReactive<K,V>key - - map keyvalues - - map valuespublic org.reactivestreams.Publisher<Integer> size()
RMultimapReactivesize in interface RMultimapReactive<K,V>public org.reactivestreams.Publisher<Boolean> containsKey(Object key)
RMultimapReactivetrue if this multimap contains at least one key-value pair
with the key key.containsKey in interface RMultimapReactive<K,V>key - - map keytrue if contains a keypublic org.reactivestreams.Publisher<Boolean> containsValue(Object value)
RMultimapReactivetrue if this multimap contains at least one key-value pair
with the value value.containsValue in interface RMultimapReactive<K,V>value - - map valuetrue if contains a valuepublic org.reactivestreams.Publisher<Boolean> containsEntry(Object key, Object value)
RMultimapReactivetrue if this multimap contains at least one key-value pair
with the key key and the value value.containsEntry in interface RMultimapReactive<K,V>key - - map keyvalue - - map valuetrue if contains an entrypublic org.reactivestreams.Publisher<Boolean> put(K key, V value)
RMultimapReactiveSome multimap implementations allow duplicate key-value pairs, in which
case put always adds a new key-value pair and increases the
multimap size by 1. Other implementations prohibit duplicates, and storing
a key-value pair that's already in the multimap has no effect.
put in interface RMultimapReactive<K,V>key - - map keyvalue - - map valuetrue if the method increased the size of the multimap, or
false if the multimap already contained the key-value pair and
doesn't allow duplicatespublic org.reactivestreams.Publisher<Boolean> remove(Object key, Object value)
RMultimapReactivekey and the value
value from this multimap, if such exists. If multiple key-value
pairs in the multimap fit this description, which one is removed is
unspecified.remove in interface RMultimapReactive<K,V>key - - map keyvalue - - map valuetrue if the multimap changedpublic org.reactivestreams.Publisher<Boolean> putAll(K key, Iterable<? extends V> values)
RMultimapReactivevalues, all
using the same key, key. Equivalent to (but expected to be more
efficient than):
for (V value : values) {
put(key, value);
}
In particular, this is a no-op if values is empty.
putAll in interface RMultimapReactive<K,V>key - - map keyvalues - - map valuestrue if the multimap changedpublic org.reactivestreams.Publisher<Integer> keySize()
RMultimapReactivekeySize in interface RMultimapReactive<K,V>public org.reactivestreams.Publisher<Long> fastRemove(K... keys)
RMultimapReactivekeys from map by one operation
Works faster than RMultimap.remove but not returning
the value associated with keyfastRemove in interface RMultimapReactive<K,V>keys - - map keyspublic org.reactivestreams.Publisher<Set<K>> readAllKeySet()
RMultimapReactivereadAllKeySet in interface RMultimapReactive<K,V>public org.reactivestreams.Publisher<Boolean> delete()
RObjectReactivedelete in interface RObjectReactivetrue if object was deleted false if notpublic org.reactivestreams.Publisher<Boolean> expire(long timeToLive, TimeUnit timeUnit)
RExpirableReactiveexpire in interface RExpirableReactivetimeToLive - - timeout before object will be deletedtimeUnit - - timeout time unittrue if the timeout was set and false if notpublic org.reactivestreams.Publisher<Boolean> expireAt(long timestamp)
RExpirableReactiveexpireAt in interface RExpirableReactivetimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic org.reactivestreams.Publisher<Boolean> clearExpire()
RExpirableReactiveclearExpire in interface RExpirableReactivetrue if the timeout was cleared and false if notpublic org.reactivestreams.Publisher<Boolean> expireAt(Date timestamp)
RExpirableReactiveexpireAt in interface RExpirableReactivetimestamp - - expire datetrue if the timeout was set and false if notpublic org.reactivestreams.Publisher<Long> remainTimeToLive()
RExpirableReactiveremainTimeToLive in interface RExpirableReactiveprotected <V> reactor.core.publisher.Mono<V> newSucceeded(V result)
public String getName()
getName in interface RObjectReactivepublic Codec getCodec()
getCodec in interface RObjectReactiveprotected void encode(Collection<Object> params, Collection<?> values)
protected io.netty.buffer.ByteBuf encode(Object value)
protected io.netty.buffer.ByteBuf encodeMapKey(Object value)
protected io.netty.buffer.ByteBuf encodeMapValue(Object value)
public org.reactivestreams.Publisher<Void> rename(String newName)
RObjectReactivenewName
in moderename in interface RObjectReactivenewName - - new name of objectpublic org.reactivestreams.Publisher<Void> migrate(String host, int port, int database, long timeout)
RObjectReactivemigrate in interface RObjectReactivehost - - destination hostport - - destination portdatabase - - destination databasetimeout - - maximum idle time in any moment of the communication with the destination instance in millisecondspublic org.reactivestreams.Publisher<Boolean> move(int database)
RObjectReactivemove in interface RObjectReactivedatabase - - number of Redis databasetrue if key was moved false if notpublic org.reactivestreams.Publisher<Boolean> renamenx(String newName)
RObjectReactivenewName
in mode only if new key is not existsrenamenx in interface RObjectReactivenewName - - new name of objecttrue if object has been renamed successfully and false otherwisepublic org.reactivestreams.Publisher<Boolean> isExists()
RObjectReactiveisExists in interface RObjectReactivetrue if object exists and false otherwiseCopyright © 2014–2018 The Redisson Project. All rights reserved.