@InterfaceAudience.Private public class InMemoryProcedureIterator extends Object implements ProcedureStore.ProcedureIterator
| Constructor and Description |
|---|
InMemoryProcedureIterator(List<ProtoAndProcedure> procs) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns true if the iterator has more elements.
|
boolean |
isNextFinished()
Calling this method does not need to convert the protobuf message to the Procedure class, so
if it returns true we can call
ProcedureStore.ProcedureIterator.skipNext() to skip the procedure without
deserializing. |
Procedure<?> |
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
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.
|
public InMemoryProcedureIterator(List<ProtoAndProcedure> procs)
public void reset()
ProcedureStore.ProcedureIteratorreset in interface ProcedureStore.ProcedureIteratorpublic boolean hasNext()
ProcedureStore.ProcedureIteratorhasNext in interface ProcedureStore.ProcedureIteratorpublic boolean isNextFinished()
ProcedureStore.ProcedureIteratorProcedureStore.ProcedureIterator.skipNext() to skip the procedure without
deserializing. This could increase the performance.isNextFinished in interface ProcedureStore.ProcedureIteratorpublic void skipNext()
ProcedureStore.ProcedureIteratorskipNext in interface ProcedureStore.ProcedureIteratorpublic Procedure<?> next() throws IOException
ProcedureStore.ProcedureIteratornext in interface ProcedureStore.ProcedureIteratorIOException - if there was an error fetching/deserializing the procedureCopyright © 2007–2022 The Apache Software Foundation. All rights reserved.