public class RedisBlockingQueue extends NuxeoBlockingQueue
BlockingQueue
.
It has unlimited capacity, so never blocks on NuxeoBlockingQueue.put(java.lang.Runnable)
and
NuxeoBlockingQueue.offer(java.lang.Runnable)
always returns true
.
Constructor and Description |
---|
RedisBlockingQueue(String queueId,
RedisWorkQueuing queuing) |
Modifier and Type | Method and Description |
---|---|
int |
getQueueSize()
Gets the size of the queue.
|
Runnable |
poll(long timeout,
TimeUnit unit) |
Runnable |
pollElement()
Retrieves and removes an element from the queue, or returns null if the
queue is empty.
|
void |
putElement(Runnable r)
Adds an element into this queue, waiting if necessary for space to become
available.
|
Runnable |
take() |
contains, drainTo, drainTo, iterator, offer, offer, peek, poll, put, remainingCapacity, setActive, size
containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, remove
public RedisBlockingQueue(String queueId, RedisWorkQueuing queuing)
public int getQueueSize()
NuxeoBlockingQueue
getQueueSize
in class NuxeoBlockingQueue
public Runnable take() throws InterruptedException
InterruptedException
public Runnable poll(long timeout, TimeUnit unit) throws InterruptedException
InterruptedException
public void putElement(Runnable r)
NuxeoBlockingQueue
putElement
in class NuxeoBlockingQueue
public Runnable pollElement()
NuxeoBlockingQueue
pollElement
in class NuxeoBlockingQueue
Copyright © 2014 Nuxeo SA. All rights reserved.