Package io.trino.operator
Class WorkProcessor.TransformationState<T>
- java.lang.Object
-
- io.trino.operator.WorkProcessor.TransformationState<T>
-
- Enclosing interface:
- WorkProcessor<T>
@Immutable public static final class WorkProcessor.TransformationState<T> extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
needsMoreData
public static <T> WorkProcessor.TransformationState<T> needsMoreData()
Signals that transformation requires more data in order to continue and no result has been produced.WorkProcessor.process()will be called with a new input element or withOptional.empty()if there are no more elements.
-
blocked
public static <T> WorkProcessor.TransformationState<T> blocked(com.google.common.util.concurrent.ListenableFuture<?> blocked)
Signals that transformation is blocked.WorkProcessor.process()will be called again with the same input element afterblockedfuture is done.
-
yield
public static <T> WorkProcessor.TransformationState<T> yield()
Signals that transformation has yielded.WorkProcessor.process()will be called again with the same input element.
-
ofResult
public static <T> WorkProcessor.TransformationState<T> ofResult(T result)
Signals that transformation has produced a result from its input.WorkProcessor.process()will be called again with a new element or withOptional.empty()if there are no more elements.
-
ofResult
public static <T> WorkProcessor.TransformationState<T> ofResult(T result, boolean needsMoreData)
Signals that transformation has produced a result. IfneedsMoreData,WorkProcessor.process()will be called again with a new element (or withOptional.empty()if there are no more elements). If not @{code needsMoreData},WorkProcessor.process()will be called again with the same element.
-
finished
public static <T> WorkProcessor.TransformationState<T> finished()
Signals that transformation has finished.WorkProcessor.process()method will not be called again.
-
-