Package nz.org.riskscape.engine.pipeline
Interface TupleInput
- All Superinterfaces:
AutoCloseable
,Realized
A re-mix of TupleIterator that should work better in the scheduler
-
Method Summary
Modifier and TypeMethodDescriptionstatic TupleInput
fromIterator
(Struct type, TupleIterator iterator, Optional<Long> size) boolean
isAsync()
boolean
poll()
size()
The number of tuples expected to be in the sourceMethods inherited from interface nz.org.riskscape.engine.pipeline.Realized
close, getProducedType
-
Method Details
-
fromIterator
- Returns:
- a TupleInput built from the given arguments
-
poll
Tuple poll()- Returns:
- the next tuple, or null if none are ready (or if the source of tuples has been exhausted).
-
isComplete
boolean isComplete()- Returns:
- true if the source of tuples has been exhausted
-
isAsync
boolean isAsync()- Returns:
- false if poll should never return null (e.g. it blocks)
-
size
The number of tuples expected to be in the source
-