K
- key typeV
- value typeRExpirableReactive
, RListMultimapReactive<K,V>
, RMultimapReactive<K,V>
, RObjectReactive
public class RedissonListMultimapReactive<K,V> extends Object implements RListMultimapReactive<K,V>
Constructor | Description |
---|---|
RedissonListMultimapReactive(Codec codec,
CommandReactiveExecutor commandExecutor,
String name) |
|
RedissonListMultimapReactive(CommandReactiveExecutor commandExecutor,
String name) |
Modifier and Type | Method | 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<Void> |
copy(String host,
int port,
int database,
long timeout) |
Copy object from source Redis instance to destination Redis instance
|
org.reactivestreams.Publisher<Boolean> |
delete() |
Delete object in mode
|
org.reactivestreams.Publisher<byte[]> |
dump() |
Returns dump of object
|
protected io.netty.buffer.ByteBuf |
encode(Object value) |
|
protected void |
encode(Collection<Object> params,
Collection<?> values) |
|
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(long timestamp) |
Set an expire date for object in mode.
|
org.reactivestreams.Publisher<Boolean> |
expireAt(Date 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.rx.Stream<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(reactor.fn.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<Void> |
restore(byte[] state) |
Restores object using its state returned by
RObjectReactive.dump() method. |
org.reactivestreams.Publisher<Void> |
restore(byte[] state,
long timeToLive,
TimeUnit timeUnit) |
Restores object using its state returned by
RObjectReactive.dump() method and set time to live for it. |
org.reactivestreams.Publisher<Void> |
restoreAndReplace(byte[] state) |
Restores and replaces object if it already exists.
|
org.reactivestreams.Publisher<Void> |
restoreAndReplace(byte[] state,
long timeToLive,
TimeUnit timeUnit) |
Restores and replaces object if it already exists and set time to live for it.
|
org.reactivestreams.Publisher<Integer> |
size() |
Returns the number of key-value pairs in this multimap.
|
org.reactivestreams.Publisher<Boolean> |
touch() |
Update the last access time of an object.
|
org.reactivestreams.Publisher<Boolean> |
unlink() |
Delete the objects.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearExpire, expire, expireAt, expireAt, remainTimeToLive
containsEntry, containsKey, containsValue, fastRemove, keySize, put, putAll, readAllKeySet, remove, size
protected final RMultimap<K,V> instance
public RedissonListMultimapReactive(CommandReactiveExecutor commandExecutor, String name)
public RedissonListMultimapReactive(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>
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
public <R> org.reactivestreams.Publisher<R> reactive(reactor.fn.Supplier<RFuture<R>> supplier)
protected <V> reactor.rx.Stream<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> restore(byte[] state)
RObjectReactive
RObjectReactive.dump()
method.restore
in interface RObjectReactive
state
- - state of objectpublic org.reactivestreams.Publisher<Void> restore(byte[] state, long timeToLive, TimeUnit timeUnit)
RObjectReactive
RObjectReactive.dump()
method and set time to live for it.restore
in interface RObjectReactive
state
- - state of objecttimeToLive
- - time to live of the objecttimeUnit
- - time unitpublic org.reactivestreams.Publisher<Void> restoreAndReplace(byte[] state)
RObjectReactive
restoreAndReplace
in interface RObjectReactive
state
- - state of the objectpublic org.reactivestreams.Publisher<Void> restoreAndReplace(byte[] state, long timeToLive, TimeUnit timeUnit)
RObjectReactive
restoreAndReplace
in interface RObjectReactive
state
- - state of the objecttimeToLive
- - time to live of the objecttimeUnit
- - time unitpublic org.reactivestreams.Publisher<byte[]> dump()
RObjectReactive
dump
in interface RObjectReactive
public org.reactivestreams.Publisher<Boolean> touch()
RObjectReactive
touch
in interface RObjectReactive
true
if object was touched else false
public org.reactivestreams.Publisher<Boolean> unlink()
RObjectReactive
Requires Redis 4.0+
unlink
in interface RObjectReactive
true
if it was exist and deleted else false
public org.reactivestreams.Publisher<Void> copy(String host, int port, int database, long timeout)
RObjectReactive
copy
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<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.