Package nz.org.riskscape.engine.sched
Class CombinedPageBuffer
java.lang.Object
nz.org.riskscape.engine.sched.CombinedPageBuffer
- All Implemented Interfaces:
ReadPageBuffer
Combines multiple ReadPageBuffers into one, for convenience
-
Constructor Summary
ConstructorDescriptionCombinedPageBuffer
(List<ReadPageBuffer> buffers) CombinedPageBuffer
(ReadPageBuffer... toRead) -
Method Summary
-
Constructor Details
-
CombinedPageBuffer
-
CombinedPageBuffer
-
-
Method Details
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceReadPageBuffer
- Returns:
- true if there are no more pages in the buffer to read (because we're waiting for the upstream worker task to write more).
-
isComplete
public boolean isComplete()- Specified by:
isComplete
in interfaceReadPageBuffer
- Returns:
- true if there are no more pages in the buffer to read (because the upstream worker task has finished writing all its output).
-
read
- Specified by:
read
in interfaceReadPageBuffer
- Returns:
- a page of Tuples to read, or null if there's no Tuples to read
-
numTuplesRead
public long numTuplesRead()- Specified by:
numTuplesRead
in interfaceReadPageBuffer
- Returns:
- the total number of Tuples read from the buffer (for diagnostics).
-
size
public int size()- Specified by:
size
in interfaceReadPageBuffer
- Returns:
- the number of unread tuples in unallocated pages in this buffer. It doesn't include the number of tuples that are in pages currently being read.
-