Interface StateTransitionManager.Context
-
- Enclosing interface:
- StateTransitionManager
public static interface StateTransitionManager.Context
The interface that can be used by theStateTransitionManager
to communicate with the underlying system.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasDesiredResources()
Returnstrue
if the available resources meet the desired resources for the job; otherwisefalse
.boolean
hasSufficientResources()
Returnstrue
if the available resources are sufficient enough for a state transition; otherwisefalse
.ScheduledFuture<?>
scheduleOperation(Runnable callback, Duration delay)
Runs operation with a given delay in the underlying main thread.void
transitionToSubsequentState()
Triggers the transition to the subsequent state of theAdaptiveScheduler
.
-
-
-
Method Detail
-
hasSufficientResources
boolean hasSufficientResources()
Returnstrue
if the available resources are sufficient enough for a state transition; otherwisefalse
.
-
hasDesiredResources
boolean hasDesiredResources()
Returnstrue
if the available resources meet the desired resources for the job; otherwisefalse
.
-
transitionToSubsequentState
void transitionToSubsequentState()
Triggers the transition to the subsequent state of theAdaptiveScheduler
.
-
scheduleOperation
ScheduledFuture<?> scheduleOperation(Runnable callback, Duration delay)
Runs operation with a given delay in the underlying main thread.- Returns:
- a ScheduledFuture representing pending completion of the operation.
-
-