Interface Action
- All Known Implementing Classes:
TriangleOrderAction
public interface Action
An action represents a step in
PerCacheInboundInvocationHandler
.- Since:
- 8.0
- Author:
- Pedro Ruivo
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
addListener
(ActionListener listener) Adds a listener to be invoked when this action is ready or canceled.check
(ActionState state) It checks this action.default void
onException
(ActionState state) Invoked when an exception occurs while processing the command.default void
onFinally
(ActionState state) Invoked always after the command is executed.
-
Method Details
-
check
It checks this action. WhenActionStatus.READY
orActionStatus.CANCELED
are final states. This method should be thread safe and idempotent since it can be invoked multiple times by multiples threads.- Parameters:
state
- the current state.- Returns:
- the status of this action.
-
addListener
Adds a listener to be invoked when this action is ready or canceled.- Parameters:
listener
- theActionListener
to add.
-
onException
Invoked when an exception occurs while processing the command.- Parameters:
state
- the current state.
-
onFinally
Invoked always after the command is executed.- Parameters:
state
- the current state.\
-