public class MemLimitQueue extends Object implements ChunkQueue
Constructor and Description |
---|
MemLimitQueue(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 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
Copyright © 2015 Apache Software Foundation. All Rights Reserved.