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 java.lang.ObjecthandleClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command)Deprecated.protected java.lang.ObjecthandleCommitCommand(InvocationContext ctx, org.infinispan.commands.tx.CommitCommand command)Deprecated.protected java.lang.ObjecthandleEvictCommand(InvocationContext ctx, org.infinispan.commands.write.EvictCommand command)Deprecated.protected java.lang.ObjecthandleGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command)Deprecated.protected java.lang.ObjecthandlePrepareCommand(InvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command)Deprecated.protected java.lang.ObjecthandlePutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command)Deprecated.protected java.lang.ObjecthandlePutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command)Deprecated.protected java.lang.ObjecthandleRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command)Deprecated.protected java.lang.ObjecthandleReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command)Deprecated.protected java.lang.ObjecthandleRollbackCommand(InvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command)Deprecated.protected java.lang.ObjecthandleSizeCommand(InvocationContext ctx, org.infinispan.commands.read.SizeCommand command)Deprecated.java.lang.ObjectvisitClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command)Deprecated.java.lang.ObjectvisitCommitCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.CommitCommand command)Deprecated.java.lang.ObjectvisitComputeCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeCommand command)Deprecated.java.lang.ObjectvisitComputeIfAbsentCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command)Deprecated.java.lang.ObjectvisitEvictCommand(InvocationContext ctx, org.infinispan.commands.write.EvictCommand command)Deprecated.java.lang.ObjectvisitGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command)Deprecated.java.lang.ObjectvisitPrepareCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command)Deprecated.java.lang.ObjectvisitPutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command)Deprecated.java.lang.ObjectvisitPutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command)Deprecated.java.lang.ObjectvisitRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command)Deprecated.java.lang.ObjectvisitReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command)Deprecated.java.lang.ObjectvisitRollbackCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command)Deprecated.java.lang.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, visitEntrySetCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeysInGroupCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, visitReadWriteKeyCommand, visitReadWriteKeyValueCommand, visitReadWriteManyCommand, visitReadWriteManyEntriesCommand, visitUnknownCommand, visitWriteOnlyKeyCommand, visitWriteOnlyKeyValueCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommand
-
-
-
-
Method Detail
-
visitPutKeyValueCommand
public java.lang.Object visitPutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command) throws java.lang.Throwable
Deprecated.- Specified by:
visitPutKeyValueCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitPutKeyValueCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
java.lang.Throwable
-
handlePutKeyValueCommand
protected java.lang.Object handlePutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command) throws java.lang.Throwable
Deprecated.- Throws:
java.lang.Throwable
-
visitRemoveCommand
public java.lang.Object visitRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command) throws java.lang.Throwable
Deprecated.- Specified by:
visitRemoveCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitRemoveCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
java.lang.Throwable
-
handleRemoveCommand
protected java.lang.Object handleRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command) throws java.lang.Throwable
Deprecated.- Throws:
java.lang.Throwable
-
visitReplaceCommand
public java.lang.Object visitReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command) throws java.lang.Throwable
Deprecated.- Specified by:
visitReplaceCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitReplaceCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
java.lang.Throwable
-
handleReplaceCommand
protected java.lang.Object handleReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command) throws java.lang.Throwable
Deprecated.- Throws:
java.lang.Throwable
-
visitComputeCommand
public java.lang.Object visitComputeCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeCommand command) throws java.lang.Throwable
Deprecated.- Specified by:
visitComputeCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitComputeCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
java.lang.Throwable
-
visitComputeIfAbsentCommand
public java.lang.Object visitComputeIfAbsentCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command) throws java.lang.Throwable
Deprecated.- Specified by:
visitComputeIfAbsentCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitComputeIfAbsentCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
java.lang.Throwable
-
visitClearCommand
public java.lang.Object visitClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command) throws java.lang.Throwable
Deprecated.- Specified by:
visitClearCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitClearCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
java.lang.Throwable
-
handleClearCommand
protected java.lang.Object handleClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command) throws java.lang.Throwable
Deprecated.- Throws:
java.lang.Throwable
-
visitPutMapCommand
public java.lang.Object visitPutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command) throws java.lang.Throwable
Deprecated.- Specified by:
visitPutMapCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitPutMapCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
java.lang.Throwable
-
handlePutMapCommand
protected java.lang.Object handlePutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command) throws java.lang.Throwable
Deprecated.- Throws:
java.lang.Throwable
-
visitEvictCommand
public java.lang.Object visitEvictCommand(InvocationContext ctx, org.infinispan.commands.write.EvictCommand command) throws java.lang.Throwable
Deprecated.- Specified by:
visitEvictCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitEvictCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
java.lang.Throwable
-
handleEvictCommand
protected java.lang.Object handleEvictCommand(InvocationContext ctx, org.infinispan.commands.write.EvictCommand command) throws java.lang.Throwable
Deprecated.- Throws:
java.lang.Throwable
-
visitSizeCommand
public java.lang.Object visitSizeCommand(InvocationContext ctx, org.infinispan.commands.read.SizeCommand command) throws java.lang.Throwable
Deprecated.- Specified by:
visitSizeCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitSizeCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
java.lang.Throwable
-
handleSizeCommand
protected java.lang.Object handleSizeCommand(InvocationContext ctx, org.infinispan.commands.read.SizeCommand command) throws java.lang.Throwable
Deprecated.- Throws:
java.lang.Throwable
-
visitGetKeyValueCommand
public java.lang.Object visitGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command) throws java.lang.Throwable
Deprecated.- Specified by:
visitGetKeyValueCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitGetKeyValueCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
java.lang.Throwable
-
handleGetKeyValueCommand
protected java.lang.Object handleGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command) throws java.lang.Throwable
Deprecated.- Throws:
java.lang.Throwable
-
visitPrepareCommand
public java.lang.Object visitPrepareCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command) throws java.lang.ThrowableDeprecated.- Specified by:
visitPrepareCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitPrepareCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
java.lang.Throwable
-
handlePrepareCommand
protected java.lang.Object handlePrepareCommand(InvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command) throws java.lang.Throwable
Deprecated.- Throws:
java.lang.Throwable
-
visitRollbackCommand
public java.lang.Object visitRollbackCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command) throws java.lang.ThrowableDeprecated.- Specified by:
visitRollbackCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitRollbackCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
java.lang.Throwable
-
handleRollbackCommand
protected java.lang.Object handleRollbackCommand(InvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command) throws java.lang.Throwable
Deprecated.- Throws:
java.lang.Throwable
-
visitCommitCommand
public java.lang.Object visitCommitCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.CommitCommand command) throws java.lang.ThrowableDeprecated.- Specified by:
visitCommitCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitCommitCommandin classorg.infinispan.commands.AbstractVisitor- Throws:
java.lang.Throwable
-
handleCommitCommand
protected java.lang.Object handleCommitCommand(InvocationContext ctx, org.infinispan.commands.tx.CommitCommand command) throws java.lang.Throwable
Deprecated.- Throws:
java.lang.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.
-
-