org.infinispan.interceptors
Class BatchingInterceptor
java.lang.Object
org.infinispan.commands.AbstractVisitor
org.infinispan.interceptors.base.CommandInterceptor
org.infinispan.interceptors.BatchingInterceptor
- All Implemented Interfaces:
- Visitor
public class BatchingInterceptor
- extends CommandInterceptor
Interceptor that captures batched calls and attaches contexts.
- Since:
- 4.0
- Author:
- Manik Surtani (manik@jboss.org)
Methods inherited from class org.infinispan.commands.AbstractVisitor |
visitClearCommand, visitCollection, visitCommitCommand, visitEntrySetCommand, visitEvictCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitPutKeyValueCommand, visitPutMapCommand, visitRemoveCommand, visitReplaceCommand, visitRollbackCommand, visitSizeCommand, visitValuesCommand |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BatchingInterceptor
public BatchingInterceptor()
handleDefault
protected Object handleDefault(InvocationContext ctx,
VisitableCommand command)
throws Throwable
- Simply check if there is an ongoing tx.
- If there is one, this is a no-op and just passes the call up the
chain.
- If there isn't one and there is a batch in progress, resume the batch's tx, pass up, and finally
suspend the batch's tx.
- If there is no batch in progress, just pass the call up the chain.
- Overrides:
handleDefault
in class CommandInterceptor
- Parameters:
ctx
- invocation contextcommand
- command to invoke
- Returns:
- return value
- Throws:
Throwable
- in the event of problems
Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.