org.jboss.cache.interceptors
Class OptimisticReplicationInterceptor

java.lang.Object
  extended by org.jboss.cache.commands.AbstractVisitor
      extended by org.jboss.cache.interceptors.base.CommandInterceptor
          extended by org.jboss.cache.interceptors.BaseRpcInterceptor
              extended by org.jboss.cache.interceptors.OptimisticReplicationInterceptor
All Implemented Interfaces:
Visitor

Deprecated. will be removed along with optimistic and pessimistic locking.

@Deprecated
public class OptimisticReplicationInterceptor
extends BaseRpcInterceptor

Replication interceptor for the optimistically locked interceptor chain. Responsible for replicating state to remote nodes. Unlike its cousin, the ReplicationInterceptor, this interceptor only deals with transactional calls. Just like all things to do with Optimistic Locking, it is a requirement that everything is done in a transaction and the transaction context is available via InvocationContext.getTransaction() and InvocationContext.getGlobalTransaction().

Author:
Manik Surtani (manik AT jboss DOT org), Steve Woodcock (stevew@jofti.com)

Nested Class Summary
 class OptimisticReplicationInterceptor.DataVersionPopulator
          Deprecated.  
 
Field Summary
 
Fields inherited from class org.jboss.cache.interceptors.BaseRpcInterceptor
defaultSynchronous, rpcManager, txTable
 
Fields inherited from class org.jboss.cache.interceptors.base.CommandInterceptor
configuration, log, trace
 
Constructor Summary
OptimisticReplicationInterceptor()
          Deprecated.  
 
Method Summary
protected  void broadcastCommit(GlobalTransaction gtx, InvocationContext ctx)
          Deprecated.  
protected  void broadcastPrepare(OptimisticPrepareCommand command, GlobalTransaction gtx, InvocationContext ctx)
          Deprecated.  
protected  void broadcastRollback(GlobalTransaction gtx, InvocationContext ctx)
          Deprecated.  
protected  TransactionWorkspace getTransactionWorkspace(InvocationContext ctx)
          Deprecated.  
 Object handleDefault(InvocationContext ctx, VisitableCommand command)
          Deprecated. The default behaviour of the visitXXX methods, which is to ignore the call and pass the call up to the next interceptor in the chain.
 void initialize(CommandsFactory commandsFactory)
          Deprecated.  
 Object visitCommitCommand(InvocationContext ctx, CommitCommand command)
          Deprecated. Visits a CommitCommand.
 Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command)
          Deprecated. Visits a OptimisticPrepareCommand.
 Object visitPutForExternalReadCommand(InvocationContext ctx, PutForExternalReadCommand command)
          Deprecated. Visits a PutForExternalReadCommand.
 Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command)
          Deprecated. Visits a RollbackCommand.
 
Methods inherited from class org.jboss.cache.interceptors.BaseRpcInterceptor
checkResponses, injectComponents, isLocalModeForced, isSynchronous, isTransactionalAndLocal, replicateCall, replicateCall, replicateCall, replicateCall, skipReplicationOfTransactionMethod
 
Methods inherited from class org.jboss.cache.interceptors.base.CommandInterceptor
getNext, hasNext, invokeNextInterceptor, setNext
 
Methods inherited from class org.jboss.cache.commands.AbstractVisitor
visitClearDataCommand, visitCollection, visitCreateNodeCommand, visitEvictFqnCommand, visitExistsNodeCommand, visitGetChildrenNamesCommand, visitGetDataMapCommand, visitGetKeysCommand, visitGetKeyValueCommand, visitGetNodeCommand, visitGravitateDataCommand, visitInvalidateCommand, visitMoveCommand, visitPrepareCommand, visitPutDataMapCommand, visitPutKeyValueCommand, visitRemoveKeyCommand, visitRemoveNodeCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptimisticReplicationInterceptor

public OptimisticReplicationInterceptor()
Deprecated. 
Method Detail

initialize

public void initialize(CommandsFactory commandsFactory)
Deprecated. 

visitOptimisticPrepareCommand

public Object visitOptimisticPrepareCommand(InvocationContext ctx,
                                            OptimisticPrepareCommand command)
                                     throws Throwable
Deprecated. 
Description copied from interface: Visitor
Visits a OptimisticPrepareCommand.

Specified by:
visitOptimisticPrepareCommand in interface Visitor
Overrides:
visitOptimisticPrepareCommand in class AbstractVisitor
Parameters:
ctx - invocation context
command - command to visit
Returns:
response from the visit
Throws:
Throwable - in the event of problems.

visitCommitCommand

public Object visitCommitCommand(InvocationContext ctx,
                                 CommitCommand command)
                          throws Throwable
Deprecated. 
Description copied from interface: Visitor
Visits a CommitCommand.

Specified by:
visitCommitCommand in interface Visitor
Overrides:
visitCommitCommand in class AbstractVisitor
Parameters:
ctx - invocation context
command - command to visit
Returns:
response from the visit
Throws:
Throwable - in the event of problems.

visitRollbackCommand

public Object visitRollbackCommand(InvocationContext ctx,
                                   RollbackCommand command)
                            throws Throwable
Deprecated. 
Description copied from interface: Visitor
Visits a RollbackCommand.

Specified by:
visitRollbackCommand in interface Visitor
Overrides:
visitRollbackCommand in class AbstractVisitor
Parameters:
ctx - invocation context
command - command to visit
Returns:
response from the visit
Throws:
Throwable - in the event of problems.

visitPutForExternalReadCommand

public Object visitPutForExternalReadCommand(InvocationContext ctx,
                                             PutForExternalReadCommand command)
                                      throws Throwable
Deprecated. 
Description copied from interface: Visitor
Visits a PutForExternalReadCommand.

Specified by:
visitPutForExternalReadCommand in interface Visitor
Overrides:
visitPutForExternalReadCommand in class AbstractVisitor
Parameters:
ctx - invocation context
command - command to visit
Returns:
response from the visit
Throws:
Throwable - in the event of problems.

handleDefault

public Object handleDefault(InvocationContext ctx,
                            VisitableCommand command)
                     throws Throwable
Deprecated. 
Description copied from class: CommandInterceptor
The default behaviour of the visitXXX methods, which is to ignore the call and pass the call up to the next interceptor in the chain.

Overrides:
handleDefault in class CommandInterceptor
Parameters:
ctx - invocation context
command - command to invoke
Returns:
return value
Throws:
Throwable - in the event of problems

broadcastPrepare

protected void broadcastPrepare(OptimisticPrepareCommand command,
                                GlobalTransaction gtx,
                                InvocationContext ctx)
                         throws Throwable
Deprecated. 
Throws:
Throwable

broadcastCommit

protected void broadcastCommit(GlobalTransaction gtx,
                               InvocationContext ctx)
                        throws Throwable
Deprecated. 
Throws:
Throwable

broadcastRollback

protected void broadcastRollback(GlobalTransaction gtx,
                                 InvocationContext ctx)
                          throws Throwable
Deprecated. 
Throws:
Throwable

getTransactionWorkspace

protected TransactionWorkspace getTransactionWorkspace(InvocationContext ctx)
                                                throws CacheException
Deprecated. 
Throws:
CacheException


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.