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 extendAsyncInterceptorinstead.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 voiddoAfterCall(InvocationContext ctx, org.infinispan.commands.VisitableCommand command)Deprecated.Callback that is invoked after every handleXXX() method defined above.protected booleandoBeforeCall(InvocationContext ctx, org.infinispan.commands.VisitableCommand command)Deprecated.protected ObjecthandleClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command)Deprecated.protected ObjecthandleCommitCommand(InvocationContext ctx, org.infinispan.commands.tx.CommitCommand command)Deprecated.protected ObjecthandleEvictCommand(InvocationContext ctx, org.infinispan.commands.write.EvictCommand command)Deprecated.protected ObjecthandleGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command)Deprecated.protected ObjecthandlePrepareCommand(InvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command)Deprecated.protected ObjecthandlePutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command)Deprecated.protected ObjecthandlePutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command)Deprecated.protected ObjecthandleRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command)Deprecated.protected ObjecthandleReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command)Deprecated.protected ObjecthandleRollbackCommand(InvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command)Deprecated.protected ObjecthandleSizeCommand(InvocationContext ctx, org.infinispan.commands.read.SizeCommand command)Deprecated.ObjectvisitClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command)Deprecated.ObjectvisitCommitCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.CommitCommand command)Deprecated.ObjectvisitComputeCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeCommand command)Deprecated.ObjectvisitComputeIfAbsentCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command)Deprecated.ObjectvisitEvictCommand(InvocationContext ctx, org.infinispan.commands.write.EvictCommand command)Deprecated.ObjectvisitGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command)Deprecated.ObjectvisitPrepareCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command)Deprecated.ObjectvisitPutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command)Deprecated.ObjectvisitPutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command)Deprecated.ObjectvisitRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command)Deprecated.ObjectvisitReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command)Deprecated.ObjectvisitRollbackCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command)Deprecated.ObjectvisitSizeCommand(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:
visitPutKeyValueCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitPutKeyValueCommandin 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:
visitRemoveCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitRemoveCommandin 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:
visitReplaceCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitReplaceCommandin 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:
visitComputeCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitComputeCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
Throwable
-
visitComputeIfAbsentCommand
public Object visitComputeIfAbsentCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command) throws Throwable
Deprecated.- Specified by:
visitComputeIfAbsentCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitComputeIfAbsentCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
Throwable
-
visitClearCommand
public Object visitClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command) throws Throwable
Deprecated.- Specified by:
visitClearCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitClearCommandin 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:
visitPutMapCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitPutMapCommandin 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:
visitEvictCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitEvictCommandin 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:
visitSizeCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitSizeCommandin 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:
visitGetKeyValueCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitGetKeyValueCommandin 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:
visitPrepareCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitPrepareCommandin 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:
visitRollbackCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitRollbackCommandin 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:
visitCommitCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitCommitCommandin 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.
-
-