org.infinispan.commands
Interface VisitableCommand

All Superinterfaces:
ReplicableCommand
All Known Subinterfaces:
DataCommand, DataWriteCommand, TransactionBoundaryCommand, WriteCommand
All Known Implementing Classes:
AbstractDataCommand, AbstractDataWriteCommand, AbstractTransactionBoundaryCommand, ApplyDeltaCommand, ClearCommand, CommitCommand, DistributedExecuteCommand, EntrySetCommand, EvictCommand, GetKeyValueCommand, InvalidateCommand, InvalidateL1Command, KeySetCommand, LockControlCommand, PrepareCommand, PutKeyValueCommand, PutMapCommand, RemoveCommand, ReplaceCommand, RollbackCommand, SizeCommand, ValuesCommand, VersionedCommitCommand, VersionedPrepareCommand, VersionedPutKeyValueCommand

public interface VisitableCommand
extends ReplicableCommand

A type of command that can accept Visitors, such as CommandInterceptors.

Since:
4.0
Author:
Manik Surtani (manik@jboss.org)

Method Summary
 Object acceptVisitor(InvocationContext ctx, Visitor visitor)
          Accept a visitor, and return the result of accepting this visitor.
 boolean ignoreCommandOnStatus(ComponentStatus status)
          Similar to shouldInvoke(InvocationContext) but evaluated by InvocationContextInterceptor.
 boolean shouldInvoke(InvocationContext ctx)
          Used by the InboundInvocationHandler to determine whether the command should be invoked or not.
 
Methods inherited from interface org.infinispan.commands.ReplicableCommand
getCommandId, getParameters, isReturnValueExpected, perform, setParameters
 

Method Detail

acceptVisitor

Object acceptVisitor(InvocationContext ctx,
                     Visitor visitor)
                     throws Throwable
Accept a visitor, and return the result of accepting this visitor.

Parameters:
ctx - invocation context
visitor - visitor to accept
Returns:
arbitrary return value
Throws:
Throwable - in the event of problems

shouldInvoke

boolean shouldInvoke(InvocationContext ctx)
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

boolean ignoreCommandOnStatus(ComponentStatus status)
Similar to shouldInvoke(InvocationContext) but evaluated by InvocationContextInterceptor. Commands can opt to be discarded in case the cache status is not suited (as InvalidateCommand)

Returns:
true if the command should NOT be invoked.

-->

Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.