Package org.redisson.api
Interface RBlockingDeque<V>
-
- Type Parameters:
V
- the type of elements held in this collection
- All Superinterfaces:
BlockingDeque<V>
,BlockingQueue<V>
,Collection<V>
,Deque<V>
,Iterable<V>
,Queue<V>
,RBlockingDequeAsync<V>
,RBlockingQueue<V>
,RBlockingQueueAsync<V>
,RCollectionAsync<V>
,RDeque<V>
,RDequeAsync<V>
,RExpirable
,RExpirableAsync
,RObject
,RObjectAsync
,RQueue<V>
,RQueueAsync<V>
- All Known Subinterfaces:
RPriorityBlockingDeque<V>
- All Known Implementing Classes:
RedissonBlockingDeque
,RedissonPriorityBlockingDeque
public interface RBlockingDeque<V> extends BlockingDeque<V>, RBlockingQueue<V>, RDeque<V>, RBlockingDequeAsync<V>
BlockingDeque
backed by Redis- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description V
pollFirstFromAny(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.V
pollLastFromAny(long timeout, TimeUnit unit, String... queueNames)
Retrieves and removes first available tail 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.-
Methods inherited from interface java.util.concurrent.BlockingDeque
add, addFirst, addLast, contains, element, iterator, offer, offer, offerFirst, offerFirst, offerLast, offerLast, peek, poll, poll, pollFirst, pollLast, push, put, putFirst, putLast, remove, remove, removeFirstOccurrence, removeLastOccurrence, size, take, takeFirst, takeLast
-
Methods inherited from interface java.util.concurrent.BlockingQueue
drainTo, drainTo, remainingCapacity
-
Methods inherited from interface java.util.Collection
clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
-
Methods inherited from interface java.util.Deque
add, addAll, contains, descendingIterator, getFirst, getLast, offer, peekFirst, peekLast, pollFirst, pollLast, pop, remove, removeFirst, removeLast
-
Methods inherited from interface org.redisson.api.RBlockingDequeAsync
pollFirstAsync, pollFirstFromAnyAsync, pollLastAsync, pollLastFromAnyAsync, putFirstAsync, putLastAsync, takeFirstAsync, takeLastAsync
-
Methods inherited from interface org.redisson.api.RBlockingQueue
pollFromAny, pollLastAndOfferFirstTo, takeLastAndOfferFirstTo
-
Methods inherited from interface org.redisson.api.RBlockingQueueAsync
drainToAsync, drainToAsync, pollAsync, pollFromAnyAsync, pollLastAndOfferFirstToAsync, putAsync, takeAsync, takeLastAndOfferFirstToAsync
-
Methods inherited from interface org.redisson.api.RCollectionAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsync
-
Methods inherited from interface org.redisson.api.RDequeAsync
addFirstAsync, addLastAsync, getLastAsync, offerFirstAsync, offerLastAsync, peekFirstAsync, peekLastAsync, pollFirstAsync, pollLastAsync, popAsync, pushAsync, removeFirstAsync, removeFirstOccurrenceAsync, removeLastAsync, removeLastOccurrenceAsync
-
Methods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObject
copy, delete, dump, getCodec, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, touch, unlink
-
Methods inherited from interface org.redisson.api.RObjectAsync
copyAsync, deleteAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsync
-
Methods inherited from interface org.redisson.api.RQueue
pollLastAndOfferFirstTo, readAll
-
Methods inherited from interface org.redisson.api.RQueueAsync
offerAsync, peekAsync, pollAsync, pollLastAndOfferFirstToAsync, readAllAsync
-
-
-
-
Method Detail
-
pollFirstFromAny
V pollFirstFromAny(long timeout, TimeUnit unit, String... queueNames) throws InterruptedException
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.- Parameters:
queueNames
- - names of queuetimeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the head of this queue, or
null
if the specified waiting time elapses before an element is available - Throws:
InterruptedException
- if interrupted while waiting
-
pollLastFromAny
V pollLastFromAny(long timeout, TimeUnit unit, String... queueNames) throws InterruptedException
Retrieves and removes first available tail 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.- Parameters:
queueNames
- - names of queuetimeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the head of this queue, or
null
if the specified waiting time elapses before an element is available - Throws:
InterruptedException
- if interrupted while waiting
-
-