Package org.infinispan.commands
Interface VisitableCommand
-
- All Superinterfaces:
ReplicableCommand
- All Known Subinterfaces:
DataCommand
,FlagAffectedCommand
- All Known Implementing Classes:
AbstractFlagAffectedCommand
,AbstractTopologyAffectedCommand
public interface VisitableCommand extends ReplicableCommand
A type of command that can acceptVisitor
s, such asDDAsyncInterceptor
.- Since:
- 4.0
- Author:
- Manik Surtani (manik@jboss.org)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
VisitableCommand.LoadType
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description Object
acceptVisitor(InvocationContext ctx, Visitor visitor)
Accept a visitor, and return the result of accepting this visitor.default boolean
ignoreCommandOnStatus(ComponentStatus status)
Deprecated.Since 9.0, no longer used.VisitableCommand.LoadType
loadType()
Object
perform(InvocationContext ctx)
Performs the primary function of the command.default boolean
shouldInvoke(InvocationContext ctx)
Deprecated.Since 9.0, no longer used.-
Methods inherited from interface org.infinispan.commands.ReplicableCommand
canBlock, getCommandId, invoke, invokeAsync, isReturnValueExpected, isSuccessful, readFrom, setOrigin, writeTo
-
-
-
-
Method Detail
-
perform
Object perform(InvocationContext ctx) throws Throwable
Performs the primary function of the command. Please see specific implementation classes for details on what is performed as well as return types. Important: this method will be invoked at the end of interceptors chain. It should never be called directly from a custom interceptor.- Specified by:
perform
in interfaceReplicableCommand
- Parameters:
ctx
- invocation context- Returns:
- arbitrary return value generated by performing this command
- Throws:
Throwable
- in the event of problems.
-
acceptVisitor
Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
Accept a visitor, and return the result of accepting this visitor.- Parameters:
ctx
- invocation contextvisitor
- visitor to accept- Returns:
- arbitrary return value
- Throws:
Throwable
- in the event of problems
-
shouldInvoke
@Deprecated default boolean shouldInvoke(InvocationContext ctx)
Deprecated.Since 9.0, no longer used.Used by the InboundInvocationHandler to determine whether the command should be invoked or not.- Returns:
- true if the command should be invoked, false otherwise.
-
ignoreCommandOnStatus
@Deprecated default boolean ignoreCommandOnStatus(ComponentStatus status)
Deprecated.Since 9.0, no longer used.Used to determine whether the command should be invoked or not. Commands can opt to be discarded in case the cache status is not suited (asInvalidateCommand
)- Returns:
- true if the command should NOT be invoked.
-
loadType
VisitableCommand.LoadType loadType()
- Returns:
- Nodes on which the command needs to read the previous values of the keys it acts on.
- Throws:
UnsupportedOperationException
- if the distinction does not make any sense.
-
-