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 |
protected <T> org.reactivestreams.Publisher<T> |
fastRemove(List<Object> mapKeys,
List<Object> listKeys,
RedisCommand<T> evalCommandType) |
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() |
protected String |
hash(io.netty.buffer.ByteBuf objectState) |
protected String |
hashAndRelease(io.netty.buffer.ByteBuf objectState) |
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)
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, wait
containsEntry, containsKey, containsValue, fastRemove, keySize, put, putAll, readAllKeySet, remove, size
public RedissonListMultimapReactive(UUID id, CommandReactiveExecutor commandExecutor, String name)
public RedissonListMultimapReactive(UUID id, Codec codec, CommandReactiveExecutor commandExecutor, String name)
public RListReactive<V> get(K key)
RListMultimapReactive
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 RListMultimapReactive<K,V>
key
- - map keypublic org.reactivestreams.Publisher<List<V>> getAll(K key)
RListMultimapReactive
getAll
in interface RListMultimapReactive<K,V>
key
- - map keypublic org.reactivestreams.Publisher<List<V>> removeAll(Object key)
RListMultimapReactive
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 RListMultimapReactive<K,V>
key
- - map keypublic org.reactivestreams.Publisher<List<V>> replaceValues(K key, Iterable<? extends V> values)
RListMultimapReactive
If 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()
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>
protected String hash(io.netty.buffer.ByteBuf objectState)
protected String hashAndRelease(io.netty.buffer.ByteBuf objectState)
protected <T> org.reactivestreams.Publisher<T> fastRemove(List<Object> mapKeys, List<Object> listKeys, RedisCommand<T> evalCommandType)
public 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> expireAt(Date timestamp)
RExpirableReactive
expireAt
in interface RExpirableReactive
timestamp
- - expire datetrue
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<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)
RObjectReactive
migrate
in interface RObjectReactive
host
- - destination hostport
- - destination portdatabase
- - destination databasepublic 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> delete()
RObjectReactive
delete
in interface RObjectReactive
true
if object was deleted false
if notpublic org.reactivestreams.Publisher<Boolean> isExists()
RObjectReactive
isExists
in interface RObjectReactive
true
if object exists and false
otherwiseCopyright © 2014–2017 The Redisson Project. All rights reserved.