T- The type of result produced / accepted
public abstract class FlowControlledProcessor<T> extends java.lang.Object
This object is one time use. Once
false it should be
considered done forever. If more work needs to be processed then this object needs to be
reconstructed with a new instance.
|Constructor and Description|
Construct a new processor.
public FlowControlledProcessor(int maxRunningTasks, boolean provideResultsInOrder)
start()once constructed to start processing.
maxRunningTasks- Maximum number of concurrent running tasks
truecompleted results will be provided in the order they are submitted
public ListenableFuture<?> start()
falseindicating an error is not able to be handled.
In the case of an unhandled error the returned future will finish with the error condition.
Because of that, it's important the returned futures state is checked to verify an unhandled
error did not occur. This can be done easily with