public class RedissonBlockingQueue<V> extends RedissonQueue<V> implements RBlockingQueue<V>
LinkedBlockingQueue where items are added as soon as
blpop returns. All BlockingQueue methods are actually
delegated to this intermediary queue.| Modifier | Constructor and Description |
|---|---|
protected |
RedissonBlockingQueue(ConnectionManager connection,
String name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
clearExpire()
Remove the existing timeout of Redisson object
|
void |
delete()
Deletes the object
|
int |
drainTo(Collection<? super V> c) |
int |
drainTo(Collection<? super V> c,
int maxElements) |
boolean |
expire(long timeToLive,
TimeUnit timeUnit) |
boolean |
expireAt(Date timestamp) |
boolean |
expireAt(long timestamp) |
String |
getName()
Returns name of object
|
protected <V> io.netty.util.concurrent.Promise<V> |
newPromise() |
boolean |
offer(V e,
long timeout,
TimeUnit unit) |
V |
poll(long timeout,
TimeUnit unit) |
void |
put(V e) |
int |
remainingCapacity() |
long |
remainTimeToLive()
Remaining time to live of Redisson object that has a timeout
|
V |
take() |
element, getFirst, offer, peek, poll, remove, removeFirstadd, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, readAllList, remove, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, contains, offer, removeaddAll, clear, containsAll, equals, hashCode, isEmpty, iterator, removeAll, retainAll, size, toArray, toArrayclearExpire, expire, expireAt, expireAt, remainTimeToLiveprotected RedissonBlockingQueue(ConnectionManager connection, String name)
public void put(V e) throws InterruptedException
put in interface BlockingQueue<V>InterruptedExceptionpublic boolean offer(V e, long timeout, TimeUnit unit) throws InterruptedException
offer in interface BlockingQueue<V>InterruptedExceptionpublic V take() throws InterruptedException
take in interface BlockingQueue<V>InterruptedExceptionpublic V poll(long timeout, TimeUnit unit) throws InterruptedException
poll in interface BlockingQueue<V>InterruptedExceptionpublic int remainingCapacity()
remainingCapacity in interface BlockingQueue<V>public int drainTo(Collection<? super V> c)
drainTo in interface BlockingQueue<V>public int drainTo(Collection<? super V> c, int maxElements)
drainTo in interface BlockingQueue<V>public boolean expire(long timeToLive,
TimeUnit timeUnit)
expire in interface RExpirablepublic boolean expireAt(long timestamp)
expireAt in interface RExpirablepublic boolean expireAt(Date timestamp)
expireAt in interface RExpirablepublic boolean clearExpire()
RExpirableclearExpire in interface RExpirabletrue if timeout was removed
false if object does not exist or does not have an associated timeoutpublic long remainTimeToLive()
RExpirableremainTimeToLive in interface RExpirableprotected <V> io.netty.util.concurrent.Promise<V> newPromise()
Copyright © 2014–2015. All rights reserved.