org.jboss.cache.interceptors
Class LegacyActivationInterceptor

java.lang.Object
  extended by org.jboss.cache.commands.AbstractVisitor
      extended by org.jboss.cache.interceptors.base.CommandInterceptor
          extended by org.jboss.cache.interceptors.base.JmxStatsCommandInterceptor
              extended by org.jboss.cache.interceptors.LegacyCacheLoaderInterceptor
                  extended by org.jboss.cache.interceptors.LegacyActivationInterceptor
All Implemented Interfaces:
Visitor, JmxStatisticsExposer

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

@Deprecated
public class LegacyActivationInterceptor
extends LegacyCacheLoaderInterceptor

Loads nodes that don't exist at the time of the call into memory from the CacheLoader. If the nodes were evicted earlier then we remove them from the cache loader after their attributes have been initialized and their children have been loaded in memory.

Version:
$Id: LegacyActivationInterceptor.java 8181 2009-08-11 11:35:33Z manik.surtani@jboss.com $
Author:
{Hany Mesha}

Field Summary
protected static java.lang.Object NULL
          Deprecated.  
protected  java.util.concurrent.ConcurrentHashMap transactions
          Deprecated. List that we have registered for
protected  javax.transaction.TransactionManager txMgr
          Deprecated.  
 
Fields inherited from class org.jboss.cache.interceptors.LegacyCacheLoaderInterceptor
dataContainer, isActivation, loader, notifier, txTable, useCacheStore, usingVersionedInvalidation
 
Fields inherited from class org.jboss.cache.interceptors.base.CommandInterceptor
configuration, log, trace
 
Constructor Summary
LegacyActivationInterceptor()
          Deprecated.  
 
Method Summary
 java.util.Map<java.lang.String,java.lang.Object> dumpStatistics()
          Deprecated. Returns a map of statistics.
 long getActivations()
          Deprecated.  
 void injectTransactionManager(javax.transaction.TransactionManager txMgr)
          Deprecated.  
protected  void recordNodeLoaded(InvocationContext ctx, Fqn fqn)
          Deprecated.  
 void resetStatistics()
          Deprecated. Resets statistics gathered.
 java.lang.Object visitClearDataCommand(InvocationContext ctx, ClearDataCommand command)
          Deprecated. Visits a RemoveDataCommand.
 java.lang.Object visitGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command)
          Deprecated. Visits a GetChildrenNamesCommand.
 java.lang.Object visitGetKeysCommand(InvocationContext ctx, GetKeysCommand command)
          Deprecated. Visits a GetKeysCommand.
 java.lang.Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command)
          Deprecated. Visits a GetKeyValueCommand.
 java.lang.Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command)
          Deprecated. Visits a GetNodeCommand.
 java.lang.Object visitMoveCommand(InvocationContext ctx, MoveCommand command)
          Deprecated. Visits a MoveCommand.
 java.lang.Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command)
          Deprecated. Visits a PutDataMapCommand.
 java.lang.Object visitPutForExternalReadCommand(InvocationContext ctx, PutForExternalReadCommand command)
          Deprecated. Visits a PutForExternalReadCommand.
 java.lang.Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command)
          Deprecated. Visits a PutKeyValueCommand.
 java.lang.Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command)
          Deprecated. Visits a RemoveKeyCommand.
 java.lang.Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command)
          Deprecated. Visits a RemoveNodeCommand.
 
Methods inherited from class org.jboss.cache.interceptors.LegacyCacheLoaderInterceptor
getCacheLoaderLoads, getCacheLoaderMisses, injectDependencies, lock, startInterceptor, visitGetDataMapCommand, visitRollbackCommand
 
Methods inherited from class org.jboss.cache.interceptors.base.JmxStatsCommandInterceptor
getStatisticsEnabled, checkStatisticsUsed, setStatisticsEnabled
 
Methods inherited from class org.jboss.cache.interceptors.base.CommandInterceptor
getNext, handleDefault, hasNext, invokeNextInterceptor, setNext
 
Methods inherited from class org.jboss.cache.commands.AbstractVisitor
visitCollection, visitCommitCommand, visitCreateNodeCommand, visitEvictFqnCommand, visitExistsNodeCommand, visitGravitateDataCommand, visitInvalidateCommand, visitOptimisticPrepareCommand, visitPrepareCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

txMgr

protected javax.transaction.TransactionManager txMgr
Deprecated. 

transactions

protected java.util.concurrent.ConcurrentHashMap transactions
Deprecated. 
List that we have registered for


NULL

protected static final java.lang.Object NULL
Deprecated. 
Constructor Detail

LegacyActivationInterceptor

public LegacyActivationInterceptor()
Deprecated. 
Method Detail

injectTransactionManager

public void injectTransactionManager(javax.transaction.TransactionManager txMgr)
Deprecated. 

visitClearDataCommand

public java.lang.Object visitClearDataCommand(InvocationContext ctx,
                                              ClearDataCommand command)
                                       throws java.lang.Throwable
Deprecated. 
Description copied from interface: Visitor
Visits a RemoveDataCommand.

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

visitRemoveNodeCommand

public java.lang.Object visitRemoveNodeCommand(InvocationContext ctx,
                                               RemoveNodeCommand command)
                                        throws java.lang.Throwable
Deprecated. 
Description copied from interface: Visitor
Visits a RemoveNodeCommand.

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

visitGetChildrenNamesCommand

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

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

visitGetKeysCommand

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

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

visitGetNodeCommand

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

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

visitGetKeyValueCommand

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

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

visitPutForExternalReadCommand

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

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

visitPutKeyValueCommand

public java.lang.Object visitPutKeyValueCommand(InvocationContext ctx,
                                                PutKeyValueCommand command)
                                         throws java.lang.Throwable
Deprecated. 
Description copied from interface: Visitor
Visits a PutKeyValueCommand.

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

visitPutDataMapCommand

public java.lang.Object visitPutDataMapCommand(InvocationContext ctx,
                                               PutDataMapCommand command)
                                        throws java.lang.Throwable
Deprecated. 
Description copied from interface: Visitor
Visits a PutDataMapCommand.

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

visitRemoveKeyCommand

public java.lang.Object visitRemoveKeyCommand(InvocationContext ctx,
                                              RemoveKeyCommand command)
                                       throws java.lang.Throwable
Deprecated. 
Description copied from interface: Visitor
Visits a RemoveKeyCommand.

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

visitMoveCommand

public java.lang.Object visitMoveCommand(InvocationContext ctx,
                                         MoveCommand command)
                                  throws java.lang.Throwable
Deprecated. 
Description copied from interface: Visitor
Visits a MoveCommand.

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

getActivations

public long getActivations()
Deprecated. 

resetStatistics

public void resetStatistics()
Deprecated. 
Description copied from class: JmxStatsCommandInterceptor
Resets statistics gathered. Is a no-op, and should be overridden if it is to be meaningful.

Specified by:
resetStatistics in interface JmxStatisticsExposer
Overrides:
resetStatistics in class LegacyCacheLoaderInterceptor

dumpStatistics

public java.util.Map<java.lang.String,java.lang.Object> dumpStatistics()
Deprecated. 
Description copied from class: JmxStatsCommandInterceptor
Returns a map of statistics. This is a default implementation which returns an empty map and should be overridden if it is to be meaningful.

Specified by:
dumpStatistics in interface JmxStatisticsExposer
Overrides:
dumpStatistics in class LegacyCacheLoaderInterceptor
Returns:
an empty map

recordNodeLoaded

protected void recordNodeLoaded(InvocationContext ctx,
                                Fqn fqn)
Deprecated. 
Overrides:
recordNodeLoaded in class LegacyCacheLoaderInterceptor


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