Interface IDriver
-
- All Known Implementing Classes:
DataDriver,Driver,SchemaDriver
public interface IDriverIDriver encapsulates some methods which are necessary for FragmentInstanceTaskExecutor to run a fragment instance
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()clear resource used by this fragment instancevoidfailed(java.lang.Throwable t)fail current driverFragmentInstanceIdgetInfo()the id information about this IDriver.ISinkHandlegetSinkHandle()booleanisFinished()Used to judge whether this IDriver should be scheduled for execution anymorecom.google.common.util.concurrent.ListenableFuture<?>processFor(io.airlift.units.Duration duration)run the IDriver for {@param duration} time slice, the time of this run is likely not to be equal to {@param duration}, the actual run time should be calculated by the caller
-
-
-
Method Detail
-
isFinished
boolean isFinished()
Used to judge whether this IDriver should be scheduled for execution anymore- Returns:
- true if the IDriver is done or terminated due to failure, otherwise false.
-
processFor
com.google.common.util.concurrent.ListenableFuture<?> processFor(io.airlift.units.Duration duration)
run the IDriver for {@param duration} time slice, the time of this run is likely not to be equal to {@param duration}, the actual run time should be calculated by the caller- Parameters:
duration- how long should this IDriver run- Returns:
- the returned ListenableFuture
is used to represent status of this processing if isDone() return true, meaning that this IDriver is not blocked and is ready for next processing. Otherwise, meaning that this IDriver is blocked and not ready for next processing.
-
getInfo
FragmentInstanceId getInfo()
the id information about this IDriver.- Returns:
- a
FragmentInstanceIdinstance.
-
close
void close()
clear resource used by this fragment instance
-
failed
void failed(java.lang.Throwable t)
fail current driver- Parameters:
t- reason cause this failure
-
getSinkHandle
ISinkHandle getSinkHandle()
- Returns:
- get SinkHandle of current IDriver
-
-