org.apache.hadoop.chukwa.datacollection.agent
Class WaitingQueue
java.lang.Object
org.apache.hadoop.chukwa.datacollection.agent.WaitingQueue
- All Implemented Interfaces:
- ChunkQueue, ChunkReceiver
public class WaitingQueue
- extends Object
- implements ChunkQueue
Method Summary |
void |
add(Chunk event)
Add a chunk to the queue, blocking if queue is full. |
void |
add(List<Chunk> events)
|
void |
collect(List<Chunk> events,
int maxCount)
Return at least one, and no more than count, Chunks into chunks. |
int |
size()
Return an approximation of the number of chunks in the queue currently. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WaitingQueue
public WaitingQueue()
add
public void add(Chunk event)
- Description copied from interface:
ChunkQueue
- Add a chunk to the queue, blocking if queue is full.
- Specified by:
add
in interface ChunkQueue
- Specified by:
add
in interface ChunkReceiver
add
public void add(List<Chunk> events)
collect
public void collect(List<Chunk> events,
int maxCount)
- Description copied from interface:
ChunkQueue
- Return at least one, and no more than count, Chunks into chunks. Blocks if
queue is empty.
- Specified by:
collect
in interface ChunkQueue
size
public int size()
- Description copied from interface:
ChunkQueue
- Return an approximation of the number of chunks in the queue currently. No
guarantees are made about the accuracy of this number.
- Specified by:
size
in interface ChunkQueue
Copyright © ${year} The Apache Software Foundation