@Immutable public static final class WorkProcessor.TransformationState<T> extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> WorkProcessor.TransformationState<T> |
blocked(com.google.common.util.concurrent.ListenableFuture<?> blocked)
Signals that transformation is blocked.
|
static <T> WorkProcessor.TransformationState<T> |
finished()
Signals that transformation has finished.
|
static <T> WorkProcessor.TransformationState<T> |
needsMoreData()
Signals that transformation requires more data in order to continue and no result has been produced.
|
static <T> WorkProcessor.TransformationState<T> |
ofResult(T result)
Signals that transformation has produced a result from its input.
|
static <T> WorkProcessor.TransformationState<T> |
ofResult(T result,
boolean needsMoreData)
Signals that transformation has produced a result.
|
static <T> WorkProcessor.TransformationState<T> |
yield()
Signals that transformation has yielded.
|
public static <T> WorkProcessor.TransformationState<T> needsMoreData()
WorkProcessor.process() will be called with a new input element or with Optional.empty() if there
are no more elements.public static <T> WorkProcessor.TransformationState<T> blocked(com.google.common.util.concurrent.ListenableFuture<?> blocked)
WorkProcessor.process() will be called again with the same input
element after blocked future is done.public static <T> WorkProcessor.TransformationState<T> yield()
WorkProcessor.process() will be called again with the same input element.public static <T> WorkProcessor.TransformationState<T> ofResult(T result)
WorkProcessor.process() will be called again with
a new element or with Optional.empty() if there are no more elements.public static <T> WorkProcessor.TransformationState<T> ofResult(T result, boolean needsMoreData)
needsMoreData, WorkProcessor.process() will be called again
with a new element (or with Optional.empty() if there are no more elements). If not @{code needsMoreData},
WorkProcessor.process() will be called again with the same element.public static <T> WorkProcessor.TransformationState<T> finished()
WorkProcessor.process() method will not be called again.Copyright © 2012–2019. All rights reserved.