public class WaitingQueue extends Object implements ChunkQueue
Constructor and Description |
---|
WaitingQueue() |
Modifier and Type | Method and Description |
---|---|
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.
|
public void add(Chunk event)
ChunkQueue
add
in interface ChunkQueue
add
in interface ChunkReceiver
event
- A binary blobpublic void collect(List<Chunk> events, int maxCount)
ChunkQueue
collect
in interface ChunkQueue
events
- List of binary blobsmaxCount
- maximum number of chunk to returnpublic int size()
ChunkQueue
size
in interface ChunkQueue
Copyright © 2016 Apache Software Foundation. All Rights Reserved.