Interface OExecutionStream
- All Known Implementing Classes:
OCostMeasureExecutionStream,OEdgeTraverserExcutionStream,OEmptyExecutionStream,OFilterExecutionStream,OFlatMapExecutionStream,OInterruptExecutionStream,OIteratorExecutionStream,OLimitedExecutionStream,OLoaderExecutionStream,OMapExecutionStream,OMultipleExecutionStream,OnCloseExecutionStream,OProduceExecutionStream,OResultCollectionExecutionStream,OResultIteratorExecutionStream,OSingletonExecutionStream,OTerminationExecutionStream,OTimeoutExecutionStream
public interface OExecutionStream
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(OCommandContext ctx) static OExecutionStreamcollectAll(OExecutionStream from, OCommandContext ctx) static voidconsume(OExecutionStream toConsume, OCommandContext ctx) static OExecutionStreamempty()default OExecutionStreamfilter(OFilterResult filter) default OExecutionStreamflatMap(OFlatMapResult map) booleanhasNext(OCommandContext ctx) default OExecutionStreamdefault booleanCheck if the current stream has all the data in memory, without much computation need to get the final result.booleanFlag used to terminate scripts early in the execution, used by the return statement via the terminate execution stream The only implementation that tour true isOTerminationExecutionStreamcreated withterminate()the other implementation return false if they provide content themselves, or delegate the method if are wrapper (independently of the modifications) of another stream.static OExecutionStreamdefault OExecutionStreamlimit(long limit) static OExecutionStreamloadIterator(Iterator<OIdentifiable> iterator) default OExecutionStreammap(OMapResult mapper) static OExecutionStreammultipleStreams(OExecutionStreamProducer producer) next(OCommandContext ctx) default OExecutionStreamonClose(OExecutionStream.OnClose onClose) static OExecutionStreamproduce(OProduceResult producer) default OCostMeasureExecutionStreamstatic OExecutionStreamresultCollection(Collection<OResult> iterator) static OExecutionStreamresultIterator(Iterator<OResult> iterator) static OExecutionStreamstream(OCommandContext ctx) static <T> OExecutionStreamstreamsFromIterator(Iterator<T> producer, OExecutionStreamProducerValueMap<T> map) default OExecutionStreamdefault OExecutionStreamtimeout(long timeInMills, OTimeoutExecutionStream.TimedOut timedout)
-
Method Details
-
hasNext
-
next
-
close
-
isTermination
Flag used to terminate scripts early in the execution, used by the return statement via the terminate execution stream The only implementation that tour true isOTerminationExecutionStreamcreated withterminate()the other implementation return false if they provide content themselves, or delegate the method if are wrapper (independently of the modifications) of another stream.- Parameters:
ctx- context of the query- Returns:
- true if this is last execution stream, false if there are more
-
produce
-
multipleStreams
-
streamsFromIterator
static <T> OExecutionStream streamsFromIterator(Iterator<T> producer, OExecutionStreamProducerValueMap<T> map) -
map
-
filter
-
flatMap
-
interruptable
-
timeout
-
limit
-
terminate
-
iterator
-
resultIterator
-
resultCollection
-
profile
-
loadIterator
-
empty
-
singleton
-
isFullInMemory
Check if the current stream has all the data in memory, without much computation need to get the final result. Only implementation with all the content inside can return true, wrappers with no computation can just delegate, if the wrapper do a logic computation should return false.- Parameters:
ctx- the current query context- Returns:
- true if the data is all in memory
-
onClose
-
collectAll
-
consume
-
stream
-