org.infinispan.commands
Class AbstractVisitor
java.lang.Object
org.infinispan.commands.AbstractVisitor
- All Implemented Interfaces:
- Visitor
- Direct Known Subclasses:
- CacheStoreInterceptor.StoreModificationsBuilder, CommandInterceptor, InvalidationInterceptor.InvalidationFilterVisitor
public abstract class AbstractVisitor
- extends Object
- implements Visitor
An abstract implementation of a Visitor that delegates all visit calls to a default handler which can be overridden.
- Since:
- 4.0
- Author:
- Mircea.Markus@jboss.com, Manik Surtani, Galder ZamarreƱo
Method Summary |
protected Object |
handleDefault(InvocationContext ctx,
VisitableCommand command)
A default handler for all commands visited. |
Object |
visitClearCommand(InvocationContext ctx,
ClearCommand command)
|
void |
visitCollection(InvocationContext ctx,
Collection<? extends VisitableCommand> toVisit)
Helper method to visit a collection of VisitableCommands. |
Object |
visitCommitCommand(TxInvocationContext ctx,
CommitCommand command)
|
Object |
visitEntrySetCommand(InvocationContext ctx,
EntrySetCommand command)
|
Object |
visitEvictCommand(InvocationContext ctx,
EvictCommand command)
|
Object |
visitGetKeyValueCommand(InvocationContext ctx,
GetKeyValueCommand command)
|
Object |
visitInvalidateCommand(InvocationContext ctx,
InvalidateCommand invalidateCommand)
|
Object |
visitKeySetCommand(InvocationContext ctx,
KeySetCommand command)
|
Object |
visitLockControlCommand(TxInvocationContext ctx,
LockControlCommand command)
|
Object |
visitPrepareCommand(TxInvocationContext ctx,
PrepareCommand command)
|
Object |
visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
|
Object |
visitPutMapCommand(InvocationContext ctx,
PutMapCommand command)
|
Object |
visitRemoveCommand(InvocationContext ctx,
RemoveCommand command)
|
Object |
visitReplaceCommand(InvocationContext ctx,
ReplaceCommand command)
|
Object |
visitRollbackCommand(TxInvocationContext ctx,
RollbackCommand command)
|
Object |
visitSizeCommand(InvocationContext ctx,
SizeCommand command)
|
Object |
visitValuesCommand(InvocationContext ctx,
ValuesCommand command)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractVisitor
public AbstractVisitor()
visitPutKeyValueCommand
public Object visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
throws Throwable
- Specified by:
visitPutKeyValueCommand
in interface Visitor
- Throws:
Throwable
visitRemoveCommand
public Object visitRemoveCommand(InvocationContext ctx,
RemoveCommand command)
throws Throwable
- Specified by:
visitRemoveCommand
in interface Visitor
- Throws:
Throwable
visitReplaceCommand
public Object visitReplaceCommand(InvocationContext ctx,
ReplaceCommand command)
throws Throwable
- Specified by:
visitReplaceCommand
in interface Visitor
- Throws:
Throwable
visitClearCommand
public Object visitClearCommand(InvocationContext ctx,
ClearCommand command)
throws Throwable
- Specified by:
visitClearCommand
in interface Visitor
- Throws:
Throwable
visitPutMapCommand
public Object visitPutMapCommand(InvocationContext ctx,
PutMapCommand command)
throws Throwable
- Specified by:
visitPutMapCommand
in interface Visitor
- Throws:
Throwable
visitEvictCommand
public Object visitEvictCommand(InvocationContext ctx,
EvictCommand command)
throws Throwable
- Specified by:
visitEvictCommand
in interface Visitor
- Throws:
Throwable
visitSizeCommand
public Object visitSizeCommand(InvocationContext ctx,
SizeCommand command)
throws Throwable
- Specified by:
visitSizeCommand
in interface Visitor
- Throws:
Throwable
visitGetKeyValueCommand
public Object visitGetKeyValueCommand(InvocationContext ctx,
GetKeyValueCommand command)
throws Throwable
- Specified by:
visitGetKeyValueCommand
in interface Visitor
- Throws:
Throwable
visitKeySetCommand
public Object visitKeySetCommand(InvocationContext ctx,
KeySetCommand command)
throws Throwable
- Specified by:
visitKeySetCommand
in interface Visitor
- Throws:
Throwable
visitValuesCommand
public Object visitValuesCommand(InvocationContext ctx,
ValuesCommand command)
throws Throwable
- Specified by:
visitValuesCommand
in interface Visitor
- Throws:
Throwable
visitEntrySetCommand
public Object visitEntrySetCommand(InvocationContext ctx,
EntrySetCommand command)
throws Throwable
- Specified by:
visitEntrySetCommand
in interface Visitor
- Throws:
Throwable
visitPrepareCommand
public Object visitPrepareCommand(TxInvocationContext ctx,
PrepareCommand command)
throws Throwable
- Specified by:
visitPrepareCommand
in interface Visitor
- Throws:
Throwable
visitRollbackCommand
public Object visitRollbackCommand(TxInvocationContext ctx,
RollbackCommand command)
throws Throwable
- Specified by:
visitRollbackCommand
in interface Visitor
- Throws:
Throwable
visitCommitCommand
public Object visitCommitCommand(TxInvocationContext ctx,
CommitCommand command)
throws Throwable
- Specified by:
visitCommitCommand
in interface Visitor
- Throws:
Throwable
visitInvalidateCommand
public Object visitInvalidateCommand(InvocationContext ctx,
InvalidateCommand invalidateCommand)
throws Throwable
- Specified by:
visitInvalidateCommand
in interface Visitor
- Throws:
Throwable
handleDefault
protected Object handleDefault(InvocationContext ctx,
VisitableCommand command)
throws Throwable
- A default handler for all commands visited. This is called for any visit method called, unless a visit command is
appropriately overridden.
- Parameters:
ctx
- invocation contextcommand
- command to handle
- Returns:
- return value
- Throws:
Throwable
- in the case of a problem
visitCollection
public void visitCollection(InvocationContext ctx,
Collection<? extends VisitableCommand> toVisit)
throws Throwable
- Helper method to visit a collection of VisitableCommands.
- Parameters:
ctx
- Invocation contexttoVisit
- collection of commands to visit
- Throws:
Throwable
- in the event of problems
visitLockControlCommand
public Object visitLockControlCommand(TxInvocationContext ctx,
LockControlCommand command)
throws Throwable
- Specified by:
visitLockControlCommand
in interface Visitor
- Throws:
Throwable
Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.