public class NonBlockingMemLimitQueue extends Object implements ChunkQueue
| Constructor and Description |
|---|
NonBlockingMemLimitQueue(org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Chunk chunk)
Add a chunk to the queue, blocking if queue is full.
|
void |
collect(List<Chunk> events,
int maxSize)
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.
|
public NonBlockingMemLimitQueue(org.apache.hadoop.conf.Configuration conf)
public void add(Chunk chunk) throws InterruptedException
ChunkQueueadd in interface ChunkQueueadd in interface ChunkReceiverInterruptedException - if thread is interrupted while blockingChunkQueue.add(org.apache.hadoop.chukwa.Chunk)public void collect(List<Chunk> events, int maxSize) throws InterruptedException
ChunkQueuecollect in interface ChunkQueueInterruptedExceptionChunkQueue.collect(java.util.List,
int)public int size()
ChunkQueuesize in interface ChunkQueueCopyright © 2015 Apache Software Foundation. All Rights Reserved.