|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jnetpcap.util.BlockingQueuePump<T>
T - the generic typepublic abstract class BlockingQueuePump<T>
The Class BlockingQueuePump.
| Field Summary | |
|---|---|
java.lang.Runnable |
dispatchQueue
The dispatch queue. |
| Constructor Summary | |
|---|---|
BlockingQueuePump(java.lang.String name)
Unlimited capacity queue. |
|
BlockingQueuePump(java.lang.String name,
int capacity)
A limited in capacity queue. |
|
| Method Summary | ||
|---|---|---|
boolean |
add(T o)
Adds the. |
|
boolean |
addAll(java.util.Collection<? extends T> c)
Adds the all. |
|
void |
clear()
Clear. |
|
boolean |
contains(java.lang.Object o)
Contains. |
|
boolean |
containsAll(java.util.Collection<?> c)
Contains all. |
|
protected abstract void |
dispatch(T data)
Dispatch. |
|
int |
drainTo(java.util.Collection<? super T> c)
Drain to. |
|
int |
drainTo(java.util.Collection<? super T> c,
int maxElements)
Drain to. |
|
T |
element()
Element. |
|
boolean |
equals(java.lang.Object o)
Equals. |
|
int |
hashCode()
Hash code. |
|
boolean |
isAlive()
Checks if is alive. |
|
boolean |
isEmpty()
Checks if is empty. |
|
java.util.Iterator<T> |
iterator()
Iterator. |
|
boolean |
offer(T o)
Offer. |
|
boolean |
offer(T o,
long timeout,
java.util.concurrent.TimeUnit unit)
Offer. |
|
T |
peek()
Peek. |
|
T |
poll()
Poll. |
|
T |
poll(long timeout,
java.util.concurrent.TimeUnit unit)
Poll. |
|
void |
put(T o)
Put. |
|
int |
remainingCapacity()
Remaining capacity. |
|
T |
remove()
Removes the. |
|
boolean |
remove(java.lang.Object o)
Removes the. |
|
boolean |
removeAll(java.util.Collection<?> c)
Removes the all. |
|
boolean |
retainAll(java.util.Collection<?> c)
Retain all. |
|
int |
size()
Size. |
|
void |
start()
Start. |
|
void |
stop()
Stop. |
|
T |
take()
Take. |
|
java.lang.Object[] |
toArray()
To array. |
|
|
toArray(Q[] a)
To array. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.lang.Runnable dispatchQueue
| Constructor Detail |
|---|
public BlockingQueuePump(java.lang.String name)
name - name to use for the worker thread
public BlockingQueuePump(java.lang.String name,
int capacity)
name - name to use for the workder threadcapacity - maximum capacity of the queue| Method Detail |
|---|
public boolean add(T o)
add in interface java.util.Collection<T>add in interface java.util.concurrent.BlockingQueue<T>add in interface java.util.Queue<T>o - the o
BlockingQueue.add(java.lang.Object)public boolean addAll(java.util.Collection<? extends T> c)
addAll in interface java.util.Collection<T>c - the c
Collection.addAll(java.util.Collection)public void clear()
clear in interface java.util.Collection<T>Collection.clear()public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<T>contains in interface java.util.concurrent.BlockingQueue<T>o - the o
Collection.contains(java.lang.Object)public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<T>c - the c
Collection.containsAll(java.util.Collection)protected abstract void dispatch(T data)
data - the datapublic int drainTo(java.util.Collection<? super T> c)
drainTo in interface java.util.concurrent.BlockingQueue<T>c - the c
BlockingQueue.drainTo(java.util.Collection)
public int drainTo(java.util.Collection<? super T> c,
int maxElements)
drainTo in interface java.util.concurrent.BlockingQueue<T>c - the cmaxElements - the max elements
BlockingQueue.drainTo(java.util.Collection, int)public T element()
element in interface java.util.Queue<T>Queue.element()public boolean equals(java.lang.Object o)
equals in interface java.util.Collection<T>equals in class java.lang.Objecto - the o
Object.equals(java.lang.Object)public int hashCode()
hashCode in interface java.util.Collection<T>hashCode in class java.lang.ObjectObject.hashCode()public boolean isAlive()
public boolean isEmpty()
isEmpty in interface java.util.Collection<T>Collection.isEmpty()public java.util.Iterator<T> iterator()
iterator in interface java.lang.Iterable<T>iterator in interface java.util.Collection<T>Collection.iterator()public boolean offer(T o)
offer in interface java.util.concurrent.BlockingQueue<T>offer in interface java.util.Queue<T>o - the o
BlockingQueue.offer(java.lang.Object)
public boolean offer(T o,
long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
offer in interface java.util.concurrent.BlockingQueue<T>o - the otimeout - the timeoutunit - the unit
java.lang.InterruptedException - the interrupted exceptionBlockingQueue.offer(java.lang.Object, long,
java.util.concurrent.TimeUnit)public T peek()
peek in interface java.util.Queue<T>Queue.peek()public T poll()
poll in interface java.util.Queue<T>Queue.poll()
public T poll(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
poll in interface java.util.concurrent.BlockingQueue<T>timeout - the timeoutunit - the unit
java.lang.InterruptedException - the interrupted exceptionBlockingQueue.poll(long,
java.util.concurrent.TimeUnit)
public void put(T o)
throws java.lang.InterruptedException
put in interface java.util.concurrent.BlockingQueue<T>o - the o
java.lang.InterruptedException - the interrupted exceptionBlockingQueue.put(java.lang.Object)public int remainingCapacity()
remainingCapacity in interface java.util.concurrent.BlockingQueue<T>BlockingQueue.remainingCapacity()public T remove()
remove in interface java.util.Queue<T>Queue.remove()public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<T>remove in interface java.util.concurrent.BlockingQueue<T>o - the o
Collection.remove(java.lang.Object)public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<T>c - the c
Collection.removeAll(java.util.Collection)public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<T>c - the c
Collection.retainAll(java.util.Collection)public int size()
size in interface java.util.Collection<T>Collection.size()public void start()
public void stop()
public T take()
throws java.lang.InterruptedException
take in interface java.util.concurrent.BlockingQueue<T>java.lang.InterruptedException - the interrupted exceptionBlockingQueue.take()public java.lang.Object[] toArray()
toArray in interface java.util.Collection<T>Collection.toArray()public <Q> Q[] toArray(Q[] a)
toArray in interface java.util.Collection<T>Q - the generic typea - the a
Collection.toArray(Object[])
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||