org.jboss.cache.interceptors
Class LegacyCacheLoaderInterceptor

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
All Implemented Interfaces:
Visitor, JmxStatisticsExposer
Direct Known Subclasses:
LegacyActivationInterceptor

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

@Deprecated
public class LegacyCacheLoaderInterceptor
extends JmxStatsCommandInterceptor

Loads nodes that don't exist at the time of the call into memory from the CacheLoader

Version:
$Id: LegacyCacheLoaderInterceptor.java 7196 2008-11-25 12:21:15Z manik.surtani@jboss.com $
Author:
Bela Ban

Field Summary
protected  DataContainer dataContainer
          Deprecated.  
protected  boolean isActivation
          Deprecated.  
protected  CacheLoader loader
          Deprecated.  
protected  Notifier notifier
          Deprecated.  
protected  TransactionTable txTable
          Deprecated.  
protected  boolean useCacheStore
          Deprecated. True if CacheStoreInterceptor is in place.
protected  boolean usingVersionedInvalidation
          Deprecated.  
 
Fields inherited from class org.jboss.cache.interceptors.base.CommandInterceptor
configuration, log, trace
 
Constructor Summary
LegacyCacheLoaderInterceptor()
          Deprecated.  
 
Method Summary
 Map<String,Object> dumpStatistics()
          Deprecated. Returns a map of statistics.
 long getCacheLoaderLoads()
          Deprecated.  
 long getCacheLoaderMisses()
          Deprecated.  
protected  void injectDependencies(TransactionTable txTable, CacheLoaderManager clm, Configuration configuration, DataContainer dataContainer, LockManager lockManager, Notifier notifier)
          Deprecated.  
protected  void lock(Fqn fqn, LockType lockType, boolean recursive, InvocationContext ctx)
          Deprecated.  
protected  void recordNodeLoaded(InvocationContext ctx, Fqn fqn)
          Deprecated.  
 void resetStatistics()
          Deprecated. Resets statistics gathered.
protected  void startInterceptor()
          Deprecated.  
 Object visitClearDataCommand(InvocationContext ctx, ClearDataCommand command)
          Deprecated. Visits a RemoveDataCommand.
 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 visitMoveCommand(InvocationContext ctx, MoveCommand command)
          Deprecated. Visits a MoveCommand.
 Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command)
          Deprecated. Visits a PutDataMapCommand.
 Object visitPutForExternalReadCommand(InvocationContext ctx, PutForExternalReadCommand command)
          Deprecated. Visits a PutForExternalReadCommand.
 Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command)
          Deprecated. Visits a PutKeyValueCommand.
 Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command)
          Deprecated. Visits a RemoveKeyCommand.
 Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command)
          Deprecated. Visits a RemoveNodeCommand.
 Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command)
          Deprecated. Visits a RollbackCommand.
 
Methods inherited from class org.jboss.cache.interceptors.base.JmxStatsCommandInterceptor
checkStatisticsUsed, getStatisticsEnabled, 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

txTable

protected TransactionTable txTable
Deprecated. 

loader

protected CacheLoader loader
Deprecated. 

dataContainer

protected DataContainer dataContainer
Deprecated. 

notifier

protected Notifier notifier
Deprecated. 

isActivation

protected boolean isActivation
Deprecated. 

usingVersionedInvalidation

protected boolean usingVersionedInvalidation
Deprecated. 

useCacheStore

protected boolean useCacheStore
Deprecated. 
True if CacheStoreInterceptor is in place. This allows us to skip loading keys for remove(Fqn, key) and put(Fqn, key). It also affects removal of node data and listing children.

Constructor Detail

LegacyCacheLoaderInterceptor

public LegacyCacheLoaderInterceptor()
Deprecated. 
Method Detail

injectDependencies

protected void injectDependencies(TransactionTable txTable,
                                  CacheLoaderManager clm,
                                  Configuration configuration,
                                  DataContainer dataContainer,
                                  LockManager lockManager,
                                  Notifier notifier)
Deprecated. 

startInterceptor

protected void startInterceptor()
Deprecated. 

visitPutDataMapCommand

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

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

visitPutKeyValueCommand

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

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

visitMoveCommand

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

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

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.

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.

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.

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.

visitRemoveNodeCommand

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

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

visitRemoveKeyCommand

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

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

visitClearDataCommand

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

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

lock

protected void lock(Fqn fqn,
                    LockType lockType,
                    boolean recursive,
                    InvocationContext ctx)
             throws Throwable
Deprecated. 
Throws:
Throwable

getCacheLoaderLoads

public long getCacheLoaderLoads()
Deprecated. 

getCacheLoaderMisses

public long getCacheLoaderMisses()
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 JmxStatsCommandInterceptor

dumpStatistics

public Map<String,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 JmxStatsCommandInterceptor
Returns:
an empty map

recordNodeLoaded

protected void recordNodeLoaded(InvocationContext ctx,
                                Fqn fqn)
Deprecated. 


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