[jboss-cvs] JBossCache/src/org/jboss/cache/loader ...

Manik Surtani msurtani at jboss.com
Fri Oct 6 08:26:28 EDT 2006


  User: msurtani
  Date: 06/10/06 08:26:28

  Modified:    src/org/jboss/cache/loader  ChainingCacheLoader.java
  Log:
  JBCACHE-792
  
  Revision  Changes    Path
  1.10      +435 -434  JBossCache/src/org/jboss/cache/loader/ChainingCacheLoader.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ChainingCacheLoader.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/loader/ChainingCacheLoader.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- ChainingCacheLoader.java	31 Aug 2006 14:56:45 -0000	1.9
  +++ ChainingCacheLoader.java	6 Oct 2006 12:26:28 -0000	1.10
  @@ -25,7 +25,7 @@
    * This decorator is used whenever more than one cache loader is configured.  READ operations are directed to
    * each of the cache loaders (in the order which they were configured) until a non-null (or non-empty in the case
    * of retrieving collection objects) result is achieved.
  - *
  + * <p/>
    * WRITE operations are propagated to ALL registered cacheloaders that specified set ignoreModifications to false.
    *
    * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
  @@ -83,7 +83,7 @@
           {
               CacheLoader l = i.next();
               answer = l.get(name);
  -            if (answer != null && answer.size() > 0) break;
  +         if (answer != null) break;
           }
           return answer;
       }
  @@ -279,9 +279,9 @@
       }
   
      
  -
       /**
        * Creates individual cache loaders.
  +    *
        * @throws Exception
        */
       public void create() throws Exception
  @@ -357,7 +357,7 @@
              CacheLoaderConfig.IndividualCacheLoaderConfig cfg = cfgs.next();
              if (cfg.isFetchPersistentState())
              {
  -              l.loadState(subtree,os);
  +            l.loadState(subtree, os);
                 break;
              }
          }             
  @@ -390,7 +390,7 @@
              CacheLoaderConfig.IndividualCacheLoaderConfig cfg = cfgs.next();
              if (cfg.isFetchPersistentState())
              {
  -              l.storeState(subtree,is);
  +            l.storeState(subtree, is);
                 break;
              }
          }       
  @@ -414,12 +414,13 @@
   
       /**
        * Adds a cache loader to the chain (always added at the end of the chain)
  +    *
        * @param l the cache loader to add
        * @param cfg and its configuration
        */
       public void addCacheLoader(CacheLoader l, CacheLoaderConfig.IndividualCacheLoaderConfig cfg)
       {
  -        synchronized(this)
  +      synchronized (this)
           {
               cacheLoaderConfigs.add(cfg);
               cacheLoaders.add(l);
  @@ -436,7 +437,7 @@
           StringBuffer buf = new StringBuffer("ChainingCacheLoader{");
           Iterator<CacheLoader> i = cacheLoaders.iterator();
           Iterator<CacheLoaderConfig.IndividualCacheLoaderConfig> c = cacheLoaderConfigs.iterator();
  -        int count=0;
  +      int count = 0;
           while (i.hasNext() && c.hasNext())
           {
               CacheLoader loader = i.next();
  
  
  



More information about the jboss-cvs-commits mailing list