org.jboss.cache.interceptors
Class LegacyDataGravitatorInterceptor

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.LegacyDataGravitatorInterceptor
All Implemented Interfaces:
Visitor
Direct Known Subclasses:
DataGravitatorInterceptor

Deprecated. will be removed with optimistic and pessimistic locking.

@Deprecated
public class LegacyDataGravitatorInterceptor
extends BaseRpcInterceptor

The Data Gravitator interceptor intercepts cache misses and attempts to gravitate data from other parts of the cluster.

Only used if Buddy Replication is enabled. Also, the interceptor only kicks in if an Option is passed in to force Data Gravitation for a specific invocation or if autoDataGravitation is set to true when configuring Buddy Replication.

See the JBoss Cache User Guide for more details on configuration options. There is a section dedicated to Buddy Replication in the Replication chapter.

In terms of functionality, if a gravitation call has occured and a cleanup call is needed (based on how BR is configured), a cleanup call will be broadcast immediately after the gravitation call (no txs) or if txs are used, an asynchronous call is made to perform the cleanup outside the scope of the tx that caused the gravitation event.

Author:
Manik Surtani (manik AT jboss DOT org)

Nested Class Summary
static class LegacyDataGravitatorInterceptor.ResponseValidityFilter
          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
LegacyDataGravitatorInterceptor()
          Deprecated.  
 
Method Summary
 void injectComponents(BuddyManager buddyManager, DataContainer dataContainer, CommandsFactory commandsFactory, CacheSPI cacheSPI, BuddyFqnTransformer transformer)
          Deprecated.  
protected  boolean nodeDoesNotExist(InvocationContext ctx, Fqn fqn)
          Deprecated.  
 Object visitCommitCommand(InvocationContext ctx, CommitCommand command)
          Deprecated. Visits a CommitCommand.
 Object visitGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command)
          Deprecated. Visits a GetChildrenNamesCommand.
 Object visitGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command)
          Deprecated. Visits a GetDataMapCommand.
 Object visitGetKeysCommand(InvocationContext ctx, GetKeysCommand command)
          Deprecated. Visits a GetKeysCommand.
 Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command)
          Deprecated. Visits a GetKeyValueCommand.
 Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command)
          Deprecated. Visits a GetNodeCommand.
 Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command)
          Deprecated. Visits a OptimisticPrepareCommand.
 Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command)
          Deprecated. Make sure you also run a cleanup if we have an 1pc.
 Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command)
          Deprecated. Visits a RollbackCommand.
protected  void wrapIfNeeded(InvocationContext ctx, Fqn fqnToWrap)
          Deprecated.  
 
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, handleDefault, hasNext, invokeNextInterceptor, setNext
 
Methods inherited from class org.jboss.cache.commands.AbstractVisitor
visitClearDataCommand, visitCollection, visitCreateNodeCommand, visitEvictFqnCommand, visitExistsNodeCommand, visitGravitateDataCommand, visitInvalidateCommand, visitMoveCommand, visitPutDataMapCommand, visitPutForExternalReadCommand, visitPutKeyValueCommand, visitRemoveKeyCommand, visitRemoveNodeCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LegacyDataGravitatorInterceptor

public LegacyDataGravitatorInterceptor()
Deprecated. 
Method Detail

injectComponents

public void injectComponents(BuddyManager buddyManager,
                             DataContainer dataContainer,
                             CommandsFactory commandsFactory,
                             CacheSPI cacheSPI,
                             BuddyFqnTransformer transformer)
Deprecated. 

visitGetChildrenNamesCommand

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

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

visitGetDataMapCommand

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

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

visitGetKeysCommand

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

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

visitGetKeyValueCommand

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

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

visitGetNodeCommand

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

Specified by:
visitGetNodeCommand in interface Visitor
Overrides:
visitGetNodeCommand 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.

visitPrepareCommand

public Object visitPrepareCommand(InvocationContext ctx,
                                  PrepareCommand command)
                           throws Throwable
Deprecated. 
Make sure you also run a cleanup if we have an 1pc.

Specified by:
visitPrepareCommand in interface Visitor
Overrides:
visitPrepareCommand 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.

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.

nodeDoesNotExist

protected boolean nodeDoesNotExist(InvocationContext ctx,
                                   Fqn fqn)
Deprecated. 
Parameters:
ctx - invocation context
fqn - fqn to test
Returns:
true if the node does not exist; false otherwise.

wrapIfNeeded

protected void wrapIfNeeded(InvocationContext ctx,
                            Fqn fqnToWrap)
                     throws InterruptedException
Deprecated. 
Throws:
InterruptedException


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