You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by pn...@apache.org on 2004/09/09 10:03:54 UTC

cvs commit: jakarta-slide/proposals/tamino/src/store/org/apache/slide/store/tamino/common XDescriptorsHandler.java

pnever      2004/09/09 01:03:54

  Modified:    proposals/tamino/src/store/org/apache/slide/store/tamino/common
                        Tag: TWS421_BRANCH XDescriptorsHandler.java
  Log:
  Added cacheQueryResults
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.4.1   +17 -4     jakarta-slide/proposals/tamino/src/store/org/apache/slide/store/tamino/common/XDescriptorsHandler.java
  
  Index: XDescriptorsHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/tamino/src/store/org/apache/slide/store/tamino/common/XDescriptorsHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.1.4.1
  diff -u -r1.1 -r1.1.4.1
  --- XDescriptorsHandler.java	25 Mar 2004 16:17:59 -0000	1.1
  +++ XDescriptorsHandler.java	9 Sep 2004 08:03:54 -0000	1.1.4.1
  @@ -27,6 +27,7 @@
   import com.softwareag.common.instrumentation.logging.LoggerUtil;
   import org.apache.slide.store.tamino.datastore.IDbSession;
   import org.apache.slide.store.tamino.datastore.XDbHandler;
  +import org.apache.slide.store.tamino.jdomobjects.XDescriptors;
   import org.apache.slide.store.tamino.jdomobjects.XFactory;
   import org.apache.slide.store.tamino.jdomobjects.XTLock;
   import org.apache.slide.store.tamino.store.XChildStore;
  @@ -202,6 +203,18 @@
           prepareForModify();
           d = XFactory.createUriDescriptor( useBinding(), childStore.getParameter(TAMINO_COLLECTION), uri );
           return globalCache.add( XTLock.WRITE_LOCK, uri, d );
  +    }
  +    
  +    public synchronized XDescriptors cacheQueryResult(String uri, XDescriptors d) {
  +        XDescriptors result = null;
  +        try {
  +            result = (XDescriptors)globalCache.checkout(XTLock.NO_LOCK, null, d.getUuri());
  +        }
  +        catch (XTLockedException e) {}
  +        if (result == null) {
  +            result = (XDescriptors)globalCache.add(XTLock.NO_LOCK, uri, d);
  +        }
  +        return result;
       }
       
       //-- transaction functionality
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org