|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.cache.commands.AbstractVisitor
org.jboss.cache.interceptors.base.CommandInterceptor
org.jboss.cache.interceptors.base.PrePostProcessingCommandInterceptor
public abstract class PrePostProcessingCommandInterceptor
This interceptor adds pre and post processing to each visitXXX() method.
For each visitXXX() method invoked, it will first calldoBeforeCall(org.jboss.cache.InvocationContext, org.jboss.cache.commands.VisitableCommand)
and if this method returns true, it will proceed to invoking a handleXXX() method and lastly, doAfterCall(org.jboss.cache.InvocationContext, org.jboss.cache.commands.VisitableCommand)
in a finally block. Note that the doAfterCall() method is still invoked even if doBeforeCall() returns false.
Instead of overriding visitXXX() methods, implementations should override their handleXXX() counterparts defined in this class
instead, as well as the doAfterCall(org.jboss.cache.InvocationContext ,org.jboss.cache.commands.VisitableCommand) method and
optionally doBeforeCall(org.jboss.cache.InvocationContext, org.jboss.cache.commands.VisitableCommand).
| Field Summary |
|---|
| Fields inherited from class org.jboss.cache.interceptors.base.CommandInterceptor |
|---|
configuration, log, trace |
| Constructor Summary | |
|---|---|
PrePostProcessingCommandInterceptor()
|
|
| Method Summary | |
|---|---|
protected abstract void |
doAfterCall(InvocationContext ctx,
VisitableCommand command)
Callback that is invoked after every handleXXX() method defined above. |
protected boolean |
doBeforeCall(InvocationContext ctx,
VisitableCommand command)
|
protected java.lang.Object |
handleClearDataCommand(InvocationContext ctx,
ClearDataCommand command)
|
protected java.lang.Object |
handleCommitCommand(InvocationContext ctx,
CommitCommand command)
|
protected java.lang.Object |
handleCreateNodeCommand(InvocationContext ctx,
CreateNodeCommand command)
Deprecated. in 3.0. Will be removed when Optimistic and Pessimistic locking is removed. |
protected java.lang.Object |
handleEvictFqnCommand(InvocationContext ctx,
EvictCommand command)
|
protected java.lang.Object |
handleExistsNodeCommand(InvocationContext ctx,
ExistsCommand command)
|
protected java.lang.Object |
handleGetDataMapCommand(InvocationContext ctx,
GetDataMapCommand command)
|
protected java.lang.Object |
handleGetChildrenNamesCommand(InvocationContext ctx,
GetChildrenNamesCommand command)
|
protected java.lang.Object |
handleGetKeysCommand(InvocationContext ctx,
GetKeysCommand command)
|
protected java.lang.Object |
handleGetKeyValueCommand(InvocationContext ctx,
GetKeyValueCommand command)
|
protected java.lang.Object |
handleGetNodeCommand(InvocationContext ctx,
GetNodeCommand command)
|
protected java.lang.Object |
handleGravitateDataCommand(InvocationContext ctx,
GravitateDataCommand command)
|
protected java.lang.Object |
handleInvalidateCommand(InvocationContext ctx,
InvalidateCommand command)
|
protected java.lang.Object |
handleMoveCommand(InvocationContext ctx,
MoveCommand command)
|
protected java.lang.Object |
handleOptimisticPrepareCommand(InvocationContext ctx,
OptimisticPrepareCommand command)
|
protected java.lang.Object |
handlePrepareCommand(InvocationContext ctx,
PrepareCommand command)
|
protected java.lang.Object |
handlePutDataMapCommand(InvocationContext ctx,
PutDataMapCommand command)
|
protected java.lang.Object |
handlePutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command)
|
protected java.lang.Object |
handlePutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
|
protected java.lang.Object |
handleRemoveKeyCommand(InvocationContext ctx,
RemoveKeyCommand command)
|
protected java.lang.Object |
handleRemoveNodeCommand(InvocationContext ctx,
RemoveNodeCommand command)
|
protected java.lang.Object |
handleRollbackCommand(InvocationContext ctx,
RollbackCommand command)
|
java.lang.Object |
visitClearDataCommand(InvocationContext ctx,
ClearDataCommand command)
Visits a RemoveDataCommand. |
java.lang.Object |
visitCommitCommand(InvocationContext ctx,
CommitCommand command)
Visits a CommitCommand. |
java.lang.Object |
visitCreateNodeCommand(InvocationContext ctx,
CreateNodeCommand command)
Visits a CreateNodeCommand. |
java.lang.Object |
visitEvictFqnCommand(InvocationContext ctx,
EvictCommand command)
Visits a EvictCommand. |
java.lang.Object |
visitExistsNodeCommand(InvocationContext ctx,
ExistsCommand command)
Visits a RemoteExistsCommand. |
java.lang.Object |
visitGetDataMapCommand(InvocationContext ctx,
GetDataMapCommand command)
Visits a GetDataMapCommand. |
java.lang.Object |
visitGetChildrenNamesCommand(InvocationContext ctx,
GetChildrenNamesCommand command)
Visits a GetChildrenNamesCommand. |
java.lang.Object |
visitGetKeysCommand(InvocationContext ctx,
GetKeysCommand command)
Visits a GetKeysCommand. |
java.lang.Object |
visitGetKeyValueCommand(InvocationContext ctx,
GetKeyValueCommand command)
Visits a GetKeyValueCommand. |
java.lang.Object |
visitGetNodeCommand(InvocationContext ctx,
GetNodeCommand command)
Visits a GetNodeCommand. |
java.lang.Object |
visitGravitateDataCommand(InvocationContext ctx,
GravitateDataCommand command)
Visits a GravitateDataCommand. |
java.lang.Object |
visitInvalidateCommand(InvocationContext ctx,
InvalidateCommand command)
Visits a InvalidateCommand. |
java.lang.Object |
visitMoveCommand(InvocationContext ctx,
MoveCommand command)
Visits a MoveCommand. |
java.lang.Object |
visitOptimisticPrepareCommand(InvocationContext ctx,
OptimisticPrepareCommand command)
Visits a OptimisticPrepareCommand. |
java.lang.Object |
visitPrepareCommand(InvocationContext ctx,
PrepareCommand command)
Visits a PrepareCommand. |
java.lang.Object |
visitPutDataMapCommand(InvocationContext ctx,
PutDataMapCommand command)
Visits a PutDataMapCommand. |
java.lang.Object |
visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command)
Visits a PutForExternalReadCommand. |
java.lang.Object |
visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
Visits a PutKeyValueCommand. |
java.lang.Object |
visitRemoveKeyCommand(InvocationContext ctx,
RemoveKeyCommand command)
Visits a RemoveKeyCommand. |
java.lang.Object |
visitRemoveNodeCommand(InvocationContext ctx,
RemoveNodeCommand command)
Visits a RemoveNodeCommand. |
java.lang.Object |
visitRollbackCommand(InvocationContext ctx,
RollbackCommand command)
Visits a RollbackCommand. |
| Methods inherited from class org.jboss.cache.interceptors.base.CommandInterceptor |
|---|
getNext, handleDefault, hasNext, invokeNextInterceptor, setNext |
| Methods inherited from class org.jboss.cache.commands.AbstractVisitor |
|---|
visitCollection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PrePostProcessingCommandInterceptor()
| Method Detail |
|---|
public final java.lang.Object visitPutDataMapCommand(InvocationContext ctx,
PutDataMapCommand command)
throws java.lang.Throwable
Visitor
visitPutDataMapCommand in interface VisitorvisitPutDataMapCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handlePutDataMapCommand(InvocationContext ctx,
PutDataMapCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
throws java.lang.Throwable
Visitor
visitPutKeyValueCommand in interface VisitorvisitPutKeyValueCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
public final java.lang.Object visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command)
throws java.lang.Throwable
Visitor
visitPutForExternalReadCommand in interface VisitorvisitPutForExternalReadCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handlePutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
throws java.lang.Throwable
java.lang.Throwable
protected java.lang.Object handlePutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitRemoveNodeCommand(InvocationContext ctx,
RemoveNodeCommand command)
throws java.lang.Throwable
Visitor
visitRemoveNodeCommand in interface VisitorvisitRemoveNodeCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleRemoveNodeCommand(InvocationContext ctx,
RemoveNodeCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitCreateNodeCommand(InvocationContext ctx,
CreateNodeCommand command)
throws java.lang.Throwable
Visitor
visitCreateNodeCommand in interface VisitorvisitCreateNodeCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
@Deprecated
protected java.lang.Object handleCreateNodeCommand(InvocationContext ctx,
CreateNodeCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitClearDataCommand(InvocationContext ctx,
ClearDataCommand command)
throws java.lang.Throwable
Visitor
visitClearDataCommand in interface VisitorvisitClearDataCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleClearDataCommand(InvocationContext ctx,
ClearDataCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitEvictFqnCommand(InvocationContext ctx,
EvictCommand command)
throws java.lang.Throwable
Visitor
visitEvictFqnCommand in interface VisitorvisitEvictFqnCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleEvictFqnCommand(InvocationContext ctx,
EvictCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitInvalidateCommand(InvocationContext ctx,
InvalidateCommand command)
throws java.lang.Throwable
Visitor
visitInvalidateCommand in interface VisitorvisitInvalidateCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleInvalidateCommand(InvocationContext ctx,
InvalidateCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitRemoveKeyCommand(InvocationContext ctx,
RemoveKeyCommand command)
throws java.lang.Throwable
Visitor
visitRemoveKeyCommand in interface VisitorvisitRemoveKeyCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleRemoveKeyCommand(InvocationContext ctx,
RemoveKeyCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitGetDataMapCommand(InvocationContext ctx,
GetDataMapCommand command)
throws java.lang.Throwable
Visitor
visitGetDataMapCommand in interface VisitorvisitGetDataMapCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleGetDataMapCommand(InvocationContext ctx,
GetDataMapCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitExistsNodeCommand(InvocationContext ctx,
ExistsCommand command)
throws java.lang.Throwable
Visitor
visitExistsNodeCommand in interface VisitorvisitExistsNodeCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleExistsNodeCommand(InvocationContext ctx,
ExistsCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitGetKeyValueCommand(InvocationContext ctx,
GetKeyValueCommand command)
throws java.lang.Throwable
Visitor
visitGetKeyValueCommand in interface VisitorvisitGetKeyValueCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleGetKeyValueCommand(InvocationContext ctx,
GetKeyValueCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitGetNodeCommand(InvocationContext ctx,
GetNodeCommand command)
throws java.lang.Throwable
Visitor
visitGetNodeCommand in interface VisitorvisitGetNodeCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleGetNodeCommand(InvocationContext ctx,
GetNodeCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitGetKeysCommand(InvocationContext ctx,
GetKeysCommand command)
throws java.lang.Throwable
Visitor
visitGetKeysCommand in interface VisitorvisitGetKeysCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleGetKeysCommand(InvocationContext ctx,
GetKeysCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitGetChildrenNamesCommand(InvocationContext ctx,
GetChildrenNamesCommand command)
throws java.lang.Throwable
Visitor
visitGetChildrenNamesCommand in interface VisitorvisitGetChildrenNamesCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleGetChildrenNamesCommand(InvocationContext ctx,
GetChildrenNamesCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitMoveCommand(InvocationContext ctx,
MoveCommand command)
throws java.lang.Throwable
Visitor
visitMoveCommand in interface VisitorvisitMoveCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleMoveCommand(InvocationContext ctx,
MoveCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitGravitateDataCommand(InvocationContext ctx,
GravitateDataCommand command)
throws java.lang.Throwable
Visitor
visitGravitateDataCommand in interface VisitorvisitGravitateDataCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleGravitateDataCommand(InvocationContext ctx,
GravitateDataCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitPrepareCommand(InvocationContext ctx,
PrepareCommand command)
throws java.lang.Throwable
Visitor
visitPrepareCommand in interface VisitorvisitPrepareCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handlePrepareCommand(InvocationContext ctx,
PrepareCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitRollbackCommand(InvocationContext ctx,
RollbackCommand command)
throws java.lang.Throwable
Visitor
visitRollbackCommand in interface VisitorvisitRollbackCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleRollbackCommand(InvocationContext ctx,
RollbackCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitCommitCommand(InvocationContext ctx,
CommitCommand command)
throws java.lang.Throwable
Visitor
visitCommitCommand in interface VisitorvisitCommitCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleCommitCommand(InvocationContext ctx,
CommitCommand command)
throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object visitOptimisticPrepareCommand(InvocationContext ctx,
OptimisticPrepareCommand command)
throws java.lang.Throwable
Visitor
visitOptimisticPrepareCommand in interface VisitorvisitOptimisticPrepareCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
java.lang.Throwable - in the event of problems.
protected java.lang.Object handleOptimisticPrepareCommand(InvocationContext ctx,
OptimisticPrepareCommand command)
throws java.lang.Throwable
java.lang.Throwable
protected abstract void doAfterCall(InvocationContext ctx,
VisitableCommand command)
ctx - invocation contextcommand - command which was invoked
protected boolean doBeforeCall(InvocationContext ctx,
VisitableCommand command)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||