O
- the type of the operation that are processed by this navigator processorpublic interface NavigationProcessor<O extends AbstractOperation>
extends java.io.Closeable
NavigationDirectory
.
The instance of NavigationProcessor
is first obtained on a given NavigationDirectory
via getNavigationProcessor
method for a given operation
instance.
The operation then can be processed iteratively by calling processStep()
until there are no more directory items available. This typically means that
the navigation directory provides candidates where the operation
should be processed which are either computed before the processing (i.e. the
list of buckets to visit) or dynamically when the next processing
is requested.Modifier and Type | Method and Description |
---|---|
void |
close()
Method to be called after processing all the steps.
|
O |
getOperation()
Returns the operation for which this navigator was created.
|
int |
getProcessedCount()
Returns the number of processing steps already evaluated by this processor.
|
int |
getRemainingCount()
Returns the number of the remaining processing steps.
|
boolean |
isFinished()
Returns whether this processor is finished.
|
boolean |
processStep()
Processes the encapsulated operation by the next processing step.
|
O getOperation()
boolean processStep() throws java.lang.InterruptedException, AlgorithmMethodException, java.lang.CloneNotSupportedException
java.lang.InterruptedException
- if the thread processing the step is interruptedAlgorithmMethodException
- if an error occurred during the evaluation of the processing stepjava.lang.CloneNotSupportedException
- if there was a need for cloning (due to asynchronous access) but cloning was not supportedvoid close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
boolean isFinished()
processStep()
returns false.processStep()
is possible or
true if this processor has finishedint getProcessedCount()
int getRemainingCount()