public interface ChunkQueue extends ChunkReceiver
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> chunks,
int count)
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.
|
void add(Chunk chunk) throws InterruptedException
add
in interface ChunkReceiver
chunk
- A binary blobInterruptedException
- if thread is interrupted while blockingvoid collect(List<Chunk> chunks, int count) throws InterruptedException
chunks
- List of binary blobscount
- maximum number of chunk to returnInterruptedException
- if thread is interrupted while collectingint size()
Copyright © 2016 Apache Software Foundation. All Rights Reserved.