Interface ProcedureStore.ProcedureIterator
- All Known Implementing Classes:
InMemoryProcedureIterator
- Enclosing interface:
- ProcedureStore
public static interface ProcedureStore.ProcedureIterator
An Iterator over a collection of Procedure
-
Method Summary
Modifier and TypeMethodDescriptionboolean
hasNext()
Returns true if the iterator has more elements.boolean
Calling this method does not need to convert the protobuf message to the Procedure class, so if it returns true we can callskipNext()
to skip the procedure without deserializing.next()
Returns the next procedure in the iteration.void
reset()
Reset the Iterator by seeking to the beginning of the list.void
skipNext()
Skip the next procedure
-
Method Details
-
reset
void reset()Reset the Iterator by seeking to the beginning of the list. -
hasNext
boolean hasNext()Returns true if the iterator has more elements. (In other words, returns true if next() would return a Procedure rather than throwing an exception.)- Returns:
- true if the iterator has more procedures
-
isNextFinished
boolean isNextFinished()Calling this method does not need to convert the protobuf message to the Procedure class, so if it returns true we can callskipNext()
to skip the procedure without deserializing. This could increase the performance.- Returns:
- true if the iterator next element is a completed procedure.
-
skipNext
void skipNext()Skip the next procedure This method is used to skip the deserializing of the procedure to increase performance, as when calling next we need to convert the protobuf message to the Procedure class. -
next
Returns the next procedure in the iteration.- Returns:
- the next procedure in the iteration.
- Throws:
IOException
- if there was an error fetching/deserializing the procedure
-