incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Incubator Wiki] Update of "Synapse/InProgress/RegistryAccessThoughts" by PaulFremantle
Date Fri, 30 Jun 2006 13:31:37 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Incubator Wiki" for change notification.

The following page has been changed by PaulFremantle:
http://wiki.apache.org/incubator/Synapse/InProgress/RegistryAccessThoughts

------------------------------------------------------------------------------
      if (obj instanceof DynamicProperty) {
           XMLRegistry r = this.getRegistry;      
           DynamicProperty dp = (DynamicProperty)obj;
+          OMElement el = null;
           //have we ever cached this?
           if (dp.cache==null) {
-              OMElement el = r.lookup(dp.key);
+              el = r.lookup(dp.key);
+          } else 
+              el = r.lookupIfModified(dp.key, timeCached);
+              if (el == null) return dp.cache 
-              Object fresh = null;
-              if (dp.xmlMapper==null) fresh = el;
-              else fresh = dp.xmlMapper.fromOM(el);
-              dp.cache = fresh;
-              return fresh;
           }
-          // now check if it is up to date      
-          OMElement el = r.lookupIfModified(dp.key, timeCached);
  
+          if (dp.xmlMapper==null) return el;
-          if (el == null) { // still good - return cached
-              return dp.cache 
-          };
  
-          if (dp.xmlMapper==null) fresh = el;
-          else fresh = dp.xmlMapper.fromOM(el);
+          dp.cache = dp.xmlMapper.fromOM(el);      
-          
-          
-          dp.cache = fresh;
-          return fresh;
+          return dp;
- 
-          
-          if (r.isModified, 
-          Object cached = cache.lookup(key);
-          if (cached==null) { // first time reading this
- 
-          Object obj = r.lookup(key); // actually would use a cache but ignore that
      }
      return obj;
  }

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message