Package io.trino.operator
Interface Work<T>
-
- All Known Implementing Classes:
CompletedWork,TransformWork
public interface Work<T>The interface is used when a function call needs to yield/pause during the process. Users need to callprocess()until it returns True before getting the result.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TgetResult()Get the result once the work is done.booleanprocess()Call the method to do the work.
-
-
-
Method Detail
-
process
boolean process()
Call the method to do the work. The caller can keep calling this method until it returns true (i.e., the work is done).- Returns:
- boolean to indicate if the work has finished.
-
getResult
T getResult()
Get the result once the work is done.
-
-