Package com.tangosol.util.fsm
Class NonBlockingFiniteStateMachine.ProcessEventLater<S extends Enum<S>>
- java.lang.Object
-
- com.tangosol.util.fsm.NonBlockingFiniteStateMachine.ProcessEventLater<S>
-
- All Implemented Interfaces:
Instruction
- Enclosing class:
- NonBlockingFiniteStateMachine<S extends Enum<S>>
public static class NonBlockingFiniteStateMachine.ProcessEventLater<S extends Enum<S>> extends Object implements Instruction
A specializedInstruction
forNonBlockingFiniteStateMachine
s that enables aStateEntryAction
to request anEvent
to be processed at some point in the future.This is the same as calling
NonBlockingFiniteStateMachine.processLater(Event, long, TimeUnit)
- See Also:
Instruction.ProcessEvent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.tangosol.util.fsm.Instruction
Instruction.ProcessEvent<S extends Enum<S>>, Instruction.TransitionTo<S extends Enum<S>>
-
-
Field Summary
-
Fields inherited from interface com.tangosol.util.fsm.Instruction
NOTHING, STOP
-
-
Constructor Summary
Constructors Constructor Description ProcessEventLater(Event<S> event)
Constructs aNonBlockingFiniteStateMachine.ProcessEventLater
without a specified time (to be schedule as soon as possible).ProcessEventLater(Event<S> event, long duration, TimeUnit timeUnit)
Constructs aNonBlockingFiniteStateMachine.ProcessEventLater
with the specified delay time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getDuration()
Obtains the amount of time to wait before the transition to the desired state should occur.Event<S>
getEvent()
Obtain theEvent
to process later.TimeUnit
getTimeUnit()
Obtains theTimeUnit
for thegetDuration()
.
-
-
-
Constructor Detail
-
ProcessEventLater
public ProcessEventLater(Event<S> event)
Constructs aNonBlockingFiniteStateMachine.ProcessEventLater
without a specified time (to be schedule as soon as possible).- Parameters:
event
- theEvent
to process later
-
ProcessEventLater
public ProcessEventLater(Event<S> event, long duration, TimeUnit timeUnit)
Constructs aNonBlockingFiniteStateMachine.ProcessEventLater
with the specified delay time.
-
-
Method Detail
-
getEvent
public Event<S> getEvent()
Obtain theEvent
to process later.- Returns:
- the
Event
to process
-
getDuration
public long getDuration()
Obtains the amount of time to wait before the transition to the desired state should occur.- Returns:
- the amount of time in the
getTimeUnit()
-
getTimeUnit
public TimeUnit getTimeUnit()
Obtains theTimeUnit
for thegetDuration()
.- Returns:
- the
TimeUnit
-
-