Package org.jboss.cache.aop.collection

Examples of org.jboss.cache.aop.collection.AbstractCollectionInterceptor


   boolean collectionObjectPut(Fqn fqn, Object obj) throws CacheException {
      boolean isCollection = false;

      CachedType type = null;
      AbstractCollectionInterceptor interceptor = null;
      if(obj instanceof ClassProxy)
      {
         Class originalClaz = obj.getClass().getSuperclass();
         interceptor = CollectionInterceptorUtil.getInterceptor((ClassProxy)obj);
         type = cache_.getCachedType(originalClaz);
      } else
      {
         type = cache_.getCachedType(obj.getClass());
      }

      if(obj instanceof ClassProxy)
      {
         // A proxy here. We may have multiple references.
         if(interceptor == null)
         {
            if(log.isDebugEnabled())
            {
               log.debug("collectionObjectPut(): null interceptor. Could be removed previously. "+fqn);
            }
         } else
         {
            if( interceptor.isAttached() ) // If it is not attached, it is not active.
            {
               // Let's check for object graph, e.g., multiple and circular references first
               if (graphHandler_.objectGraphPut(fqn, interceptor, type, obj)) { // found cross references
                  return true;
               }
            } else
            {
               // Re-attach the interceptor to this fqn.
               boolean copyToCache = true;
               interceptor.attach(fqn, copyToCache);
               internal_.putAopClazz(fqn, type.getType());
               internal_.setPojo(fqn, obj);
               return true; // we are done
            }
         }
View Full Code Here

TOP

Related Classes of org.jboss.cache.aop.collection.AbstractCollectionInterceptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.