RBlockingDequeReactive<V>
, RBlockingQueueReactive<V>
, RCollectionReactive<V>
, RDequeReactive<V>
, RExpirableReactive
, RListReactive<V>
, RObjectReactive
, RQueueReactive<V>
, RSortableReactive<List<V>>
public class RedissonBlockingDequeReactive<V> extends RedissonDequeReactive<V> implements RBlockingDequeReactive<V>
BlockingQueue
.Constructor | Description |
---|---|
RedissonBlockingDequeReactive(Codec codec,
CommandReactiveExecutor commandExecutor,
String name) |
|
RedissonBlockingDequeReactive(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<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<Integer> |
drainTo(Collection<? super V> c) |
Removes all available elements from this queue and adds them
to the given collection in async mode.
|
org.reactivestreams.Publisher<Integer> |
drainTo(Collection<? super V> c,
int maxElements) |
Removes at most the given number of available elements from
this queue and adds them to the given collection in async 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.
|
Codec |
getCodec() |
|
String |
getName() |
|
org.reactivestreams.Publisher<Boolean> |
isExists() |
Check object existence
|
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<V> |
poll(long timeout,
TimeUnit unit) |
Retrieves and removes the head of this queue in async mode, waiting up to the
specified wait time if necessary for an element to become available.
|
org.reactivestreams.Publisher<V> |
pollFirst(long timeout,
TimeUnit unit) |
Retrieves and removes value at the head of queue.
|
org.reactivestreams.Publisher<V> |
pollFirstFromAny(long timeout,
TimeUnit unit,
String... queueNames) |
Retrieves and removes first available head element of any queue in reactive mode,
waiting up to the specified wait time if necessary for an element to become available
in any of defined queues including queue own.
|
org.reactivestreams.Publisher<V> |
pollFromAny(long timeout,
TimeUnit unit,
String... queueNames) |
Retrieves and removes first available head element of any queue,
waiting up to the specified wait time if necessary for an element to become available
in any of defined queues including queue own.
|
org.reactivestreams.Publisher<V> |
pollLast(long timeout,
TimeUnit unit) |
Retrieves and removes value at the tail of queue.
|
org.reactivestreams.Publisher<V> |
pollLastAndOfferFirstTo(String queueName,
long timeout,
TimeUnit unit) |
Retrieves and removes last available tail element of any queue and adds it at the head of
queueName ,
waiting up to the specified wait time if necessary for an element to become available
in any of defined queues including queue itself. |
org.reactivestreams.Publisher<V> |
pollLastFromAny(long timeout,
TimeUnit unit,
String... queueNames) |
Retrieves and removes first available tail element of any queue in reactive mode,
waiting up to the specified wait time if necessary for an element to become available
in any of defined queues including queue own.
|
org.reactivestreams.Publisher<Integer> |
put(V e) |
Inserts the specified element into this queue in async mode, waiting if necessary
for space to become available.
|
org.reactivestreams.Publisher<Void> |
putFirst(V e) |
Adds value to the head of queue.
|
org.reactivestreams.Publisher<Void> |
putLast(V e) |
Adds value to the tail of queue.
|
<R> org.reactivestreams.Publisher<R> |
reactive(Supplier<RFuture<R>> supplier) |
|
org.reactivestreams.Publisher<Long> |
remainTimeToLive() |
Get remaining time to live of object in milliseconds.
|
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<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<V> |
take() |
Retrieves and removes the head of this queue in async mode, waiting if necessary
until an element becomes available.
|
org.reactivestreams.Publisher<V> |
takeFirst() |
Retrieves and removes value at the head of queue.
|
org.reactivestreams.Publisher<V> |
takeLast() |
Retrieves and removes value at the tail of queue.
|
org.reactivestreams.Publisher<Boolean> |
touch() |
Update the last access time of an object.
|
org.reactivestreams.Publisher<Boolean> |
unlink() |
Delete the objects.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
add, addAll, addAll, contains, containsAll, iterator, remove, removeAll, retainAll, size
addFirst, addLast, descendingIterator, getLast, offerFirst, offerLast, peekFirst, peekLast, pollFirst, pollLast, pop, push, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence
addFirst, addLast, getLast, offerFirst, offerLast, peekFirst, peekLast, pollFirst, pollLast, pop, push, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence
add, add, addAfter, addAll, addAll, addAll, addBefore, contains, containsAll, descendingIterator, descendingIterator, equals, fastRemove, fastSet, get, get, hashCode, indexOf, iterator, iterator, lastIndexOf, readAll, readSorted, readSorted, readSorted, readSorted, readSorted, readSorted, remove, remove, remove, removeAll, retainAll, set, size, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo, trim
offer, peek, poll, pollLastAndOfferFirstTo
clearExpire, expire, expireAt, expireAt, remainTimeToLive
copy, delete, dump, getCodec, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, touch, unlink
offer, peek, poll, pollLastAndOfferFirstTo
public RedissonBlockingDequeReactive(CommandReactiveExecutor commandExecutor, String name)
public RedissonBlockingDequeReactive(Codec codec, CommandReactiveExecutor commandExecutor, String name)
public org.reactivestreams.Publisher<Integer> put(V e)
RBlockingQueueReactive
put
in interface RBlockingQueueReactive<V>
e
- the element to addpublic org.reactivestreams.Publisher<V> take()
RBlockingQueueReactive
take
in interface RBlockingQueueReactive<V>
public org.reactivestreams.Publisher<V> poll(long timeout, TimeUnit unit)
RBlockingQueueReactive
poll
in interface RBlockingQueueReactive<V>
timeout
- how long to wait before giving up, in units of
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameternull
if the
specified waiting time elapses before an element is availablepublic org.reactivestreams.Publisher<V> pollFromAny(long timeout, TimeUnit unit, String... queueNames)
RBlockingQueueReactive
pollFromAny
in interface RBlockingQueueReactive<V>
timeout
- how long to wait before giving up, in units of
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameterqueueNames
- - names of queuenull
if the
specified waiting time elapses before an element is availablepublic org.reactivestreams.Publisher<V> pollLastAndOfferFirstTo(String queueName, long timeout, TimeUnit unit)
RBlockingQueueReactive
queueName
,
waiting up to the specified wait time if necessary for an element to become available
in any of defined queues including queue itself.pollLastAndOfferFirstTo
in interface RBlockingQueueReactive<V>
queueName
- - names of destination queuetimeout
- how long to wait before giving up, in units of
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameternull
if the
specified waiting time elapses before an element is availablepublic org.reactivestreams.Publisher<Integer> drainTo(Collection<? super V> c)
RBlockingQueueReactive
c
may result in elements being in neither,
either or both collections when the associated exception is
thrown. Attempts to drain a queue to itself result in
IllegalArgumentException
. Further, the behavior of
this operation is undefined if the specified collection is
modified while the operation is in progress.drainTo
in interface RBlockingQueueReactive<V>
c
- the collection to transfer elements intopublic org.reactivestreams.Publisher<Integer> drainTo(Collection<? super V> c, int maxElements)
RBlockingQueueReactive
c
may result in elements being in neither,
either or both collections when the associated exception is
thrown. Attempts to drain a queue to itself result in
IllegalArgumentException
. Further, the behavior of
this operation is undefined if the specified collection is
modified while the operation is in progress.drainTo
in interface RBlockingQueueReactive<V>
c
- the collection to transfer elements intomaxElements
- the maximum number of elements to transferpublic org.reactivestreams.Publisher<V> pollFirstFromAny(long timeout, TimeUnit unit, String... queueNames)
RBlockingDequeReactive
pollFirstFromAny
in interface RBlockingDequeReactive<V>
timeout
- how long to wait before giving up, in units of
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameterqueueNames
- - names of queuenull
if the
specified waiting time elapses before an element is availablepublic org.reactivestreams.Publisher<V> pollLastFromAny(long timeout, TimeUnit unit, String... queueNames)
RBlockingDequeReactive
pollLastFromAny
in interface RBlockingDequeReactive<V>
timeout
- how long to wait before giving up, in units of
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameterqueueNames
- - names of queuenull
if the
specified waiting time elapses before an element is availablepublic org.reactivestreams.Publisher<Void> putFirst(V e)
RBlockingDequeReactive
putFirst
in interface RBlockingDequeReactive<V>
e
- valuepublic org.reactivestreams.Publisher<Void> putLast(V e)
RBlockingDequeReactive
putLast
in interface RBlockingDequeReactive<V>
e
- valuepublic org.reactivestreams.Publisher<V> pollLast(long timeout, TimeUnit unit)
RBlockingDequeReactive
timeout
for an element become available.pollLast
in interface RBlockingDequeReactive<V>
timeout
- how long to wait before giving up, in units of
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameternull
if the
specified waiting time elapses before an element is availablepublic org.reactivestreams.Publisher<V> takeLast()
RBlockingDequeReactive
takeLast
in interface RBlockingDequeReactive<V>
public org.reactivestreams.Publisher<V> pollFirst(long timeout, TimeUnit unit)
RBlockingDequeReactive
timeout
for an element become available.pollFirst
in interface RBlockingDequeReactive<V>
timeout
- how long to wait before giving up, in units of
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameternull
if the
specified waiting time elapses before an element is availablepublic org.reactivestreams.Publisher<V> takeFirst()
RBlockingDequeReactive
takeFirst
in interface RBlockingDequeReactive<V>
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> 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> 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–2018 The Redisson Project. All rights reserved.