private static final class WALProcedureTree.Iter extends Object implements ProcedureStore.ProcedureIterator
| Modifier and Type | Field and Description |
|---|---|
private WALProcedureTree.ProtoAndProc |
current |
private Iterator<WALProcedureTree.ProtoAndProc> |
iter |
private List<WALProcedureTree.ProtoAndProc> |
procs |
| Constructor and Description |
|---|
Iter(List<WALProcedureTree.ProtoAndProc> procs) |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkNext() |
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. |
private void |
moveToNext() |
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.
|
private final List<WALProcedureTree.ProtoAndProc> procs
private Iterator<WALProcedureTree.ProtoAndProc> iter
private WALProcedureTree.ProtoAndProc current
public Iter(List<WALProcedureTree.ProtoAndProc> procs)
public void reset()
ProcedureStore.ProcedureIteratorreset in interface ProcedureStore.ProcedureIteratorpublic boolean hasNext()
ProcedureStore.ProcedureIteratorhasNext in interface ProcedureStore.ProcedureIteratorprivate void checkNext()
public boolean isNextFinished()
ProcedureStore.ProcedureIteratorProcedureStore.ProcedureIterator.skipNext() to skip the procedure without
deserializing. This could increase the performance.isNextFinished in interface ProcedureStore.ProcedureIteratorprivate void moveToNext()
public 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–2020 The Apache Software Foundation. All rights reserved.