You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2012/08/01 14:45:05 UTC

svn commit: r1367965 - in /jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/graph: Node.java Triple.java

Author: andy
Date: Wed Aug  1 12:45:04 2012
New Revision: 1367965

URL: http://svn.apache.org/viewvc?rev=1367965&view=rev
Log:
Turn Node and Triple caches off.

Modified:
    jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/graph/Node.java
    jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/graph/Triple.java

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/graph/Node.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/graph/Node.java?rev=1367965&r1=1367964&r2=1367965&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/graph/Node.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/graph/Node.java Wed Aug  1 12:45:04 2012
@@ -288,7 +288,7 @@ public abstract class Node {
     /* package visibility only */ Node( Object label ) 
         { this.label = label; }
         
-    static private boolean caching = true;
+    static private boolean caching = false;
     
     /**
         provided only for testing purposes. _cache(false)_ switches off caching and

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/graph/Triple.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/graph/Triple.java?rev=1367965&r1=1367964&r2=1367965&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/graph/Triple.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/graph/Triple.java Wed Aug  1 12:45:04 2012
@@ -168,17 +168,22 @@ public class Triple implements TripleMat
     public static int hashCode( Node s, Node p, Node o ) 
         { return (s.hashCode() >> 1) ^ p.hashCode() ^ (o.hashCode() << 1); }
     
-    /**
-        Factory method for creating triples, allows caching opportunities. Attempts
-        to use triples from the cache, if any suitable ones exist.
-        
-        @return a triple with subject=s, predicate=p, object=o
-    */
-    public static Triple create( Node s, Node p, Node o )
-        { 
-        Triple already = cache.get( s, p, o );
-        return already == null ? cache.put( new Triple( s, p, o ) ) : already;
-        }
+//    /**
+//        Factory method for creating triples, allows caching opportunities. Attempts
+//        to use triples from the cache, if any suitable ones exist.
+//        
+//        @return a triple with subject=s, predicate=p, object=o
+//    */
+//    public static Triple create( Node s, Node p, Node o )
+//        { 
+//        Triple already = cache.get( s, p, o );
+//        return already == null ? cache.put( new Triple( s, p, o ) ) : already;
+//        }
+
+      public static Triple create( Node s, Node p, Node o )
+      {
+          return new Triple( s, p, o ) ;
+      }
     
     /**
         The cache of already-created triples.