org.jboss.cache.aop
Class TreeCacheAopDelegate

java.lang.Object
  extended by org.jboss.cache.aop.TreeCacheAopDelegate

public class TreeCacheAopDelegate
extends java.lang.Object

Delegate class for PojoCache.

Author:
Ben Wang

Field Summary
protected  java.lang.ThreadLocal bulkRemove_
           
protected  PojoCache cache_
           
protected  CollectionClassHandler collectionHandler_
           
protected  java.lang.String DETACH
           
protected  ObjectGraphHandler graphHandler_
           
protected  InternalDelegate internal_
           
protected static org.apache.commons.logging.Log log
           
protected  SerializableObjectHandler serializableHandler_
           
 
Constructor Summary
TreeCacheAopDelegate(PojoCache cache)
           
 
Method Summary
protected  java.util.Map _findObjects(Fqn fqn)
           
protected  java.lang.Object _getObject(Fqn fqn)
           
protected  java.lang.Object _getObjectInternal(Fqn fqn)
           
protected  java.lang.Object _putObject(Fqn fqn, java.lang.Object obj)
          Note that caller of this method will take care of synchronization within the fqn sub-tree.
protected  void _regularPutObject(Fqn fqn, java.lang.Object obj, org.jboss.aop.InstanceAdvisor advisor, CachedType type)
           
protected  void _regularRemoveObject(Fqn fqn, boolean removeCacheInterceptor, java.lang.Object result, java.lang.Class clazz, boolean evict)
           
 java.lang.Object _removeObject(Fqn fqn, boolean removeCacheInterceptor, boolean evict)
          Note that caller of this method will take care of synchronization within the fqn sub-tree.
protected  boolean bulkRemove(Fqn fqn, java.lang.Object obj)
          Based on the pojo to perform a bulk remove recursively if there is no object graph relationship for performance optimization.
protected  void detachInterceptor(org.jboss.aop.InstanceAdvisor advisor, org.jboss.aop.advice.Interceptor interceptor, boolean detachOnly, java.util.Map undoMap)
           
protected  void findChildObjects(Fqn fqn, java.util.Map map)
           
 boolean getBulkRemove()
           
protected  boolean pojoGraphMultipleReferenced(java.lang.Object obj, java.util.Map undoMap)
          Check recursively if the pojo and its graph is multiple referenced.
 void setBulkRemove(boolean bulk)
           
protected  void undoInterceptorDetach(java.util.Map undoMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache_

protected PojoCache cache_

log

protected static final org.apache.commons.logging.Log log

internal_

protected InternalDelegate internal_

graphHandler_

protected ObjectGraphHandler graphHandler_

collectionHandler_

protected CollectionClassHandler collectionHandler_

serializableHandler_

protected SerializableObjectHandler serializableHandler_

bulkRemove_

protected java.lang.ThreadLocal bulkRemove_

DETACH

protected final java.lang.String DETACH
See Also:
Constant Field Values
Constructor Detail

TreeCacheAopDelegate

public TreeCacheAopDelegate(PojoCache cache)
Method Detail

setBulkRemove

public void setBulkRemove(boolean bulk)

getBulkRemove

public boolean getBulkRemove()

_getObject

protected java.lang.Object _getObject(Fqn fqn)
                               throws CacheException
Throws:
CacheException

_getObjectInternal

protected java.lang.Object _getObjectInternal(Fqn fqn)
                                       throws CacheException
Throws:
CacheException

_putObject

protected java.lang.Object _putObject(Fqn fqn,
                                      java.lang.Object obj)
                               throws CacheException
Note that caller of this method will take care of synchronization within the fqn sub-tree.

Parameters:
fqn -
obj -
Returns:
Throws:
CacheException

bulkRemove

protected boolean bulkRemove(Fqn fqn,
                             java.lang.Object obj)
                      throws CacheException
Based on the pojo to perform a bulk remove recursively if there is no object graph relationship for performance optimization.

Throws:
CacheException

detachInterceptor

protected void detachInterceptor(org.jboss.aop.InstanceAdvisor advisor,
                                 org.jboss.aop.advice.Interceptor interceptor,
                                 boolean detachOnly,
                                 java.util.Map undoMap)

undoInterceptorDetach

protected void undoInterceptorDetach(java.util.Map undoMap)

pojoGraphMultipleReferenced

protected boolean pojoGraphMultipleReferenced(java.lang.Object obj,
                                              java.util.Map undoMap)
                                       throws CacheException
Check recursively if the pojo and its graph is multiple referenced. If it is, we can't do a bulk remove.

Throws:
CacheException

_regularPutObject

protected void _regularPutObject(Fqn fqn,
                                 java.lang.Object obj,
                                 org.jboss.aop.InstanceAdvisor advisor,
                                 CachedType type)
                          throws CacheException
Throws:
CacheException

_removeObject

public java.lang.Object _removeObject(Fqn fqn,
                                      boolean removeCacheInterceptor,
                                      boolean evict)
                               throws CacheException
Note that caller of this method will take care of synchronization within the fqn sub-tree.

Parameters:
fqn -
removeCacheInterceptor -
evict -
Returns:
Throws:
CacheException

_regularRemoveObject

protected void _regularRemoveObject(Fqn fqn,
                                    boolean removeCacheInterceptor,
                                    java.lang.Object result,
                                    java.lang.Class clazz,
                                    boolean evict)
                             throws CacheException
Throws:
CacheException

_findObjects

protected java.util.Map _findObjects(Fqn fqn)
                              throws CacheException
Throws:
CacheException

findChildObjects

protected void findChildObjects(Fqn fqn,
                                java.util.Map map)
                         throws CacheException
Throws:
CacheException


Copyright © 1998-2005 JBoss Inc . All Rights Reserved.