K
- key typeV
- value typepublic class RedissonSetMultimapReactive<K,V> extends Object implements RSetMultimapReactive<K,V>
Constructor and Description |
---|
RedissonSetMultimapReactive(UUID id,
Codec codec,
CommandReactiveExecutor commandExecutor,
String name) |
RedissonSetMultimapReactive(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 |
RSetReactive<V> |
get(K key)
Returns a view Set of the values associated with
key in this
multimap, if any. |
org.reactivestreams.Publisher<Set<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<Set<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<Set<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, wait
containsEntry, containsKey, containsValue, fastRemove, keySize, put, putAll, readAllKeySet, remove, size
clearExpire, expire, expireAt, expireAt, remainTimeToLive
protected final RMultimap<K,V> instance
public RedissonSetMultimapReactive(UUID id, CommandReactiveExecutor commandExecutor, String name)
public RedissonSetMultimapReactive(UUID id, Codec codec, CommandReactiveExecutor commandExecutor, String name)
public RSetReactive<V> get(K key)
RSetMultimapReactive
key
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 RSetMultimapReactive<K,V>
key
- - map keypublic org.reactivestreams.Publisher<Set<V>> getAll(K key)
RSetMultimapReactive
getAll
in interface RSetMultimapReactive<K,V>
key
- - map keypublic org.reactivestreams.Publisher<Set<V>> removeAll(Object key)
RSetMultimapReactive
key
.
Once this method returns, key
will not be mapped to any values
Use RMultimapReactive.fastRemove(K...)
if values are not needed.
removeAll
in interface RSetMultimapReactive<K,V>
key
- - map keypublic org.reactivestreams.Publisher<Set<V>> replaceValues(K key, Iterable<? extends V> values)
RSetMultimapReactive
If values
is empty, this is equivalent to
RSetMultimapReactive.removeAll(Object)
.
replaceValues
in interface RSetMultimapReactive<K,V>
key
- - map keyvalues
- - map valuespublic org.reactivestreams.Publisher<Integer> size()
RMultimapReactive
size
in interface RMultimapReactive<K,V>
public org.reactivestreams.Publisher<Boolean> containsKey(Object key)
RMultimapReactive
true
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)
RMultimapReactive
true
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)
RMultimapReactive
true
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)
RMultimapReactive
Some 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)
RMultimapReactive
key
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)
RMultimapReactive
values
, 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()
RMultimapReactive
keySize
in interface RMultimapReactive<K,V>
public org.reactivestreams.Publisher<Long> fastRemove(K... keys)
RMultimapReactive
keys
from map by one operation
Works faster than RMultimap.remove
but not returning
the value associated with key
fastRemove
in interface RMultimapReactive<K,V>
keys
- - map keyspublic org.reactivestreams.Publisher<Set<K>> readAllKeySet()
RMultimapReactive
readAllKeySet
in interface RMultimapReactive<K,V>
public org.reactivestreams.Publisher<Boolean> delete()
RObjectReactive
delete
in interface RObjectReactive
true
if object was deleted false
if notpublic org.reactivestreams.Publisher<Boolean> expire(long timeToLive, TimeUnit timeUnit)
RExpirableReactive
expire
in interface RExpirableReactive
timeToLive
- - 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)
RExpirableReactive
expireAt
in interface RExpirableReactive
timestamp
- - expire date in milliseconds (Unix timestamp)true
if the timeout was set and false
if notpublic org.reactivestreams.Publisher<Boolean> clearExpire()
RExpirableReactive
clearExpire
in interface RExpirableReactive
true
if the timeout was cleared and false
if notpublic org.reactivestreams.Publisher<Boolean> expireAt(Date timestamp)
RExpirableReactive
expireAt
in interface RExpirableReactive
timestamp
- - expire datetrue
if the timeout was set and false
if notpublic org.reactivestreams.Publisher<Long> remainTimeToLive()
RExpirableReactive
remainTimeToLive
in interface RExpirableReactive
protected <V> reactor.core.publisher.Mono<V> newSucceeded(V result)
public String getName()
getName
in interface RObjectReactive
public Codec getCodec()
getCodec
in interface RObjectReactive
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)
public org.reactivestreams.Publisher<Void> rename(String newName)
RObjectReactive
newName
in moderename
in interface RObjectReactive
newName
- - new name of objectpublic org.reactivestreams.Publisher<Void> migrate(String host, int port, int database, long timeout)
RObjectReactive
migrate
in interface RObjectReactive
host
- - 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)
RObjectReactive
move
in interface RObjectReactive
database
- - number of Redis databasetrue
if key was moved false
if notpublic org.reactivestreams.Publisher<Boolean> renamenx(String newName)
RObjectReactive
newName
in mode only if new key is not existsrenamenx
in interface RObjectReactive
newName
- - new name of objecttrue
if object has been renamed successfully and false
otherwisepublic org.reactivestreams.Publisher<Boolean> isExists()
RObjectReactive
isExists
in interface RObjectReactive
true
if object exists and false
otherwiseCopyright © 2014–2018 The Redisson Project. All rights reserved.