|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.chukwa.datacollection.agent.MemLimitQueue
public class MemLimitQueue
An event queue that blocks once a fixed upper limit of data is enqueued. For now, uses the size of the data field. Should really use estimatedSerializedSize()?
Constructor Summary | |
---|---|
MemLimitQueue(int limit)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MemLimitQueue(int limit)
Method Detail |
---|
public void add(Chunk chunk) throws InterruptedException
ChunkQueue
add
in interface ChunkQueue
add
in interface ChunkReceiver
InterruptedException
- if thread is interrupted while blockingChunkQueue.add(org.apache.hadoop.chukwa.Chunk)
public void collect(List<Chunk> events, int maxSize) throws InterruptedException
ChunkQueue
collect
in interface ChunkQueue
InterruptedException
ChunkQueue.collect(java.util.List,
int)
public int size()
ChunkQueue
size
in interface ChunkQueue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |