public class RedisBlockingQueue extends AbstractQueue<Runnable> implements BlockingQueue<Runnable>
BlockingQueue
.
It has unlimited capacity, so never blocks on put(java.lang.Runnable)
and offer(java.lang.Runnable)
always returns true
.
Constructor and Description |
---|
RedisBlockingQueue(String queueId,
RedisWorkQueuing queuing) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Object o) |
int |
drainTo(Collection<? super Runnable> c) |
int |
drainTo(Collection<? super Runnable> c,
int maxElements) |
Iterator<Runnable> |
iterator() |
boolean |
offer(Runnable r) |
boolean |
offer(Runnable r,
long timeout,
TimeUnit unit) |
Runnable |
peek() |
Runnable |
poll() |
Runnable |
poll(long timeout,
TimeUnit unit) |
void |
put(Runnable r) |
int |
remainingCapacity() |
int |
size() |
Runnable |
take() |
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 boolean offer(Runnable r)
public boolean offer(Runnable r, long timeout, TimeUnit unit) throws InterruptedException
offer
in interface BlockingQueue<Runnable>
InterruptedException
public void put(Runnable r) throws InterruptedException
put
in interface BlockingQueue<Runnable>
InterruptedException
public Runnable take() throws InterruptedException
take
in interface BlockingQueue<Runnable>
InterruptedException
public Runnable poll(long timeout, TimeUnit unit) throws InterruptedException
poll
in interface BlockingQueue<Runnable>
InterruptedException
public boolean contains(Object o)
contains
in interface Collection<Runnable>
contains
in interface BlockingQueue<Runnable>
contains
in class AbstractCollection<Runnable>
public int size()
size
in interface Collection<Runnable>
size
in class AbstractCollection<Runnable>
public int remainingCapacity()
remainingCapacity
in interface BlockingQueue<Runnable>
public Iterator<Runnable> iterator()
iterator
in interface Iterable<Runnable>
iterator
in interface Collection<Runnable>
iterator
in class AbstractCollection<Runnable>
public int drainTo(Collection<? super Runnable> c)
drainTo
in interface BlockingQueue<Runnable>
public int drainTo(Collection<? super Runnable> c, int maxElements)
drainTo
in interface BlockingQueue<Runnable>
Copyright © 2013 Nuxeo SA. All Rights Reserved.