Package org.infinispan.interceptors.base
Class PrePostProcessingCommandInterceptor
- java.lang.Object
-
- org.infinispan.commands.AbstractVisitor
-
- org.infinispan.interceptors.base.CommandInterceptor
-
- org.infinispan.interceptors.base.PrePostProcessingCommandInterceptor
-
- All Implemented Interfaces:
org.infinispan.commands.Visitor
,AsyncInterceptor
@Deprecated public abstract class PrePostProcessingCommandInterceptor extends CommandInterceptor
Deprecated.Since 9.0, please extendAsyncInterceptor
instead.This interceptor adds pre and post processing to each visitXXX() method. For each visitXXX() method invoked, it will first calldoBeforeCall(InvocationContext, VisitableCommand)
and if this method returns true, it will proceed to invoking a handleXXX() method and lastly,doAfterCall(InvocationContext, 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 thedoAfterCall(InvocationContext ,VisitableCommand)
method and optionallydoBeforeCall(InvocationContext, VisitableCommand)
.- Author:
- Mircea.Markus@jboss.com
-
-
Field Summary
-
Fields inherited from class org.infinispan.interceptors.base.CommandInterceptor
cacheConfiguration
-
-
Constructor Summary
Constructors Constructor Description PrePostProcessingCommandInterceptor()
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract void
doAfterCall(InvocationContext ctx, org.infinispan.commands.VisitableCommand command)
Deprecated.Callback that is invoked after every handleXXX() method defined above.protected boolean
doBeforeCall(InvocationContext ctx, org.infinispan.commands.VisitableCommand command)
Deprecated.protected Object
handleClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command)
Deprecated.protected Object
handleCommitCommand(InvocationContext ctx, org.infinispan.commands.tx.CommitCommand command)
Deprecated.protected Object
handleEvictCommand(InvocationContext ctx, org.infinispan.commands.write.EvictCommand command)
Deprecated.protected Object
handleGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command)
Deprecated.protected Object
handlePrepareCommand(InvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command)
Deprecated.protected Object
handlePutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command)
Deprecated.protected Object
handlePutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command)
Deprecated.protected Object
handleRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command)
Deprecated.protected Object
handleReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command)
Deprecated.protected Object
handleRollbackCommand(InvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command)
Deprecated.protected Object
handleSizeCommand(InvocationContext ctx, org.infinispan.commands.read.SizeCommand command)
Deprecated.Object
visitClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command)
Deprecated.Object
visitCommitCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.CommitCommand command)
Deprecated.Object
visitComputeCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeCommand command)
Deprecated.Object
visitComputeIfAbsentCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command)
Deprecated.Object
visitEvictCommand(InvocationContext ctx, org.infinispan.commands.write.EvictCommand command)
Deprecated.Object
visitGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command)
Deprecated.Object
visitPrepareCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command)
Deprecated.Object
visitPutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command)
Deprecated.Object
visitPutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command)
Deprecated.Object
visitRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command)
Deprecated.Object
visitReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command)
Deprecated.Object
visitRollbackCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command)
Deprecated.Object
visitSizeCommand(InvocationContext ctx, org.infinispan.commands.read.SizeCommand command)
Deprecated.-
Methods inherited from class org.infinispan.interceptors.base.CommandInterceptor
getCacheWithFlags, getLockAcquisitionTimeout, getLog, getNext, handleDefault, hasNext, hasSkipLocking, invokeNextInterceptor, setNext, setNextInterceptor, visitCommand
-
Methods inherited from class org.infinispan.commands.AbstractVisitor
visitCollection, visitDistributedExecuteCommand, visitEntrySetCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeysInGroupCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, visitReadWriteKeyCommand, visitReadWriteKeyValueCommand, visitReadWriteManyCommand, visitReadWriteManyEntriesCommand, visitUnknownCommand, visitWriteOnlyKeyCommand, visitWriteOnlyKeyValueCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommand
-
-
-
-
Method Detail
-
visitPutKeyValueCommand
public Object visitPutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command) throws Throwable
Deprecated.- Specified by:
visitPutKeyValueCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitPutKeyValueCommand
in classorg.infinispan.commands.AbstractVisitor
- Throws:
Throwable
-
handlePutKeyValueCommand
protected Object handlePutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command) throws Throwable
Deprecated.- Throws:
Throwable
-
visitRemoveCommand
public Object visitRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command) throws Throwable
Deprecated.- Specified by:
visitRemoveCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitRemoveCommand
in classorg.infinispan.commands.AbstractVisitor
- Throws:
Throwable
-
handleRemoveCommand
protected Object handleRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command) throws Throwable
Deprecated.- Throws:
Throwable
-
visitReplaceCommand
public Object visitReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command) throws Throwable
Deprecated.- Specified by:
visitReplaceCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitReplaceCommand
in classorg.infinispan.commands.AbstractVisitor
- Throws:
Throwable
-
handleReplaceCommand
protected Object handleReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command) throws Throwable
Deprecated.- Throws:
Throwable
-
visitComputeCommand
public Object visitComputeCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeCommand command) throws Throwable
Deprecated.- Specified by:
visitComputeCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitComputeCommand
in classorg.infinispan.commands.AbstractVisitor
- Throws:
Throwable
-
visitComputeIfAbsentCommand
public Object visitComputeIfAbsentCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command) throws Throwable
Deprecated.- Specified by:
visitComputeIfAbsentCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitComputeIfAbsentCommand
in classorg.infinispan.commands.AbstractVisitor
- Throws:
Throwable
-
visitClearCommand
public Object visitClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command) throws Throwable
Deprecated.- Specified by:
visitClearCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitClearCommand
in classorg.infinispan.commands.AbstractVisitor
- Throws:
Throwable
-
handleClearCommand
protected Object handleClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command) throws Throwable
Deprecated.- Throws:
Throwable
-
visitPutMapCommand
public Object visitPutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command) throws Throwable
Deprecated.- Specified by:
visitPutMapCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitPutMapCommand
in classorg.infinispan.commands.AbstractVisitor
- Throws:
Throwable
-
handlePutMapCommand
protected Object handlePutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command) throws Throwable
Deprecated.- Throws:
Throwable
-
visitEvictCommand
public Object visitEvictCommand(InvocationContext ctx, org.infinispan.commands.write.EvictCommand command) throws Throwable
Deprecated.- Specified by:
visitEvictCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitEvictCommand
in classorg.infinispan.commands.AbstractVisitor
- Throws:
Throwable
-
handleEvictCommand
protected Object handleEvictCommand(InvocationContext ctx, org.infinispan.commands.write.EvictCommand command) throws Throwable
Deprecated.- Throws:
Throwable
-
visitSizeCommand
public Object visitSizeCommand(InvocationContext ctx, org.infinispan.commands.read.SizeCommand command) throws Throwable
Deprecated.- Specified by:
visitSizeCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitSizeCommand
in classorg.infinispan.commands.AbstractVisitor
- Throws:
Throwable
-
handleSizeCommand
protected Object handleSizeCommand(InvocationContext ctx, org.infinispan.commands.read.SizeCommand command) throws Throwable
Deprecated.- Throws:
Throwable
-
visitGetKeyValueCommand
public Object visitGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command) throws Throwable
Deprecated.- Specified by:
visitGetKeyValueCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitGetKeyValueCommand
in classorg.infinispan.commands.AbstractVisitor
- Throws:
Throwable
-
handleGetKeyValueCommand
protected Object handleGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command) throws Throwable
Deprecated.- Throws:
Throwable
-
visitPrepareCommand
public Object visitPrepareCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command) throws Throwable
Deprecated.- Specified by:
visitPrepareCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitPrepareCommand
in classorg.infinispan.commands.AbstractVisitor
- Throws:
Throwable
-
handlePrepareCommand
protected Object handlePrepareCommand(InvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command) throws Throwable
Deprecated.- Throws:
Throwable
-
visitRollbackCommand
public Object visitRollbackCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command) throws Throwable
Deprecated.- Specified by:
visitRollbackCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitRollbackCommand
in classorg.infinispan.commands.AbstractVisitor
- Throws:
Throwable
-
handleRollbackCommand
protected Object handleRollbackCommand(InvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command) throws Throwable
Deprecated.- Throws:
Throwable
-
visitCommitCommand
public Object visitCommitCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.CommitCommand command) throws Throwable
Deprecated.- Specified by:
visitCommitCommand
in interfaceorg.infinispan.commands.Visitor
- Overrides:
visitCommitCommand
in classorg.infinispan.commands.AbstractVisitor
- Throws:
Throwable
-
handleCommitCommand
protected Object handleCommitCommand(InvocationContext ctx, org.infinispan.commands.tx.CommitCommand command) throws Throwable
Deprecated.- Throws:
Throwable
-
doAfterCall
protected abstract void doAfterCall(InvocationContext ctx, org.infinispan.commands.VisitableCommand command)
Deprecated.Callback that is invoked after every handleXXX() method defined above.- Parameters:
ctx
- invocation contextcommand
- command which was invoked
-
doBeforeCall
protected boolean doBeforeCall(InvocationContext ctx, org.infinispan.commands.VisitableCommand command)
Deprecated.
-
-