public class ProcessingQueue<T> extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ProcessingQueue.Handler<T> |
Modifier and Type | Field and Description |
---|---|
protected ReentrantLock |
consumer_lock |
protected int |
count |
protected ProcessingQueue.Handler<T> |
handler |
protected ReentrantLock |
producer_lock |
protected Queue<T> |
queue |
Constructor and Description |
---|
ProcessingQueue() |
Modifier and Type | Method and Description |
---|---|
void |
add(T element) |
Queue<T> |
getQueue() |
protected void |
process() |
boolean |
retainAll(Collection<T> elements) |
ProcessingQueue<T> |
setHandler(ProcessingQueue.Handler<T> handler) |
int |
size() |
String |
toString() |
protected final ReentrantLock producer_lock
protected final ReentrantLock consumer_lock
protected int count
protected ProcessingQueue.Handler<T> handler
public int size()
public ProcessingQueue<T> setHandler(ProcessingQueue.Handler<T> handler)
public void add(T element)
public boolean retainAll(Collection<T> elements)
protected void process()
Copyright © 2016 JBoss, a division of Red Hat. All rights reserved.