jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1212114 - in /incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb: base/objectfile/ObjectFileStorage.java index/Index.java nodetable/NodeTableNative.java transaction/DatasetBuilderTxn.java transaction/NodeTableTrans.java
Date Thu, 08 Dec 2011 20:49:16 GMT
Author: andy
Date: Thu Dec  8 20:49:15 2011
New Revision: 1212114

URL: http://svn.apache.org/viewvc?rev=1212114&view=rev
Log:
Tidy up.

Modified:
    incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileStorage.java
    incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/index/Index.java
    incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/nodetable/NodeTableNative.java
    incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/DatasetBuilderTxn.java
    incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/NodeTableTrans.java

Modified: incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileStorage.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileStorage.java?rev=1212114&r1=1212113&r2=1212114&view=diff
==============================================================================
--- incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileStorage.java
(original)
+++ incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileStorage.java
Thu Dec  8 20:49:15 2011
@@ -215,6 +215,7 @@ public class ObjectFileStorage implement
         int newLen = idx+actualLength+4 ;
         writeBuffer.position(newLen);
         writeBuffer.limit(writeBuffer.capacity()) ;
+        allocLocation = -1 ;
     }
 
     private void flushOutputBuffer()

Modified: incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/index/Index.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/index/Index.java?rev=1212114&r1=1212113&r2=1212114&view=diff
==============================================================================
--- incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/index/Index.java (original)
+++ incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/index/Index.java Thu
Dec  8 20:49:15 2011
@@ -54,8 +54,7 @@ public interface Index extends Iterable<
     @Override
     public void close() ;
     
-    /** Answer whether the index is empty or not.  May return false for unknown or meaningless
-     * (e.g. transactional index)  */
+    /** Answer whether the index is empty or not.  May return false for unknown or meaningless
*/
     public boolean isEmpty() ;
     
     /** Clear the index */

Modified: incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/nodetable/NodeTableNative.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/nodetable/NodeTableNative.java?rev=1212114&r1=1212113&r2=1212114&view=diff
==============================================================================
--- incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/nodetable/NodeTableNative.java
(original)
+++ incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/nodetable/NodeTableNative.java
Thu Dec  8 20:49:15 2011
@@ -161,7 +161,7 @@ public class NodeTableNative implements 
     private final NodeId writeNodeToTable(Node node)
     {
         syncNeeded = true ;
-        // Synchroized in accessIndex
+        // Synchronized in accessIndex
         long x = NodeLib.encodeStore(node, getObjects()) ;
         return NodeId.create(x);
     }

Modified: incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/DatasetBuilderTxn.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/DatasetBuilderTxn.java?rev=1212114&r1=1212113&r2=1212114&view=diff
==============================================================================
--- incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/DatasetBuilderTxn.java
(original)
+++ incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/DatasetBuilderTxn.java
Thu Dec  8 20:49:15 2011
@@ -126,12 +126,10 @@ public class DatasetBuilderTxn
             ObjectFile objectFile ;
             
             
-//            if ( fsObjectFile.isMem() )
-//                objectFile = FileFactory.createObjectFileMem(objFilename) ;
-//            else
-//                objectFile = FileFactory.createObjectFileDisk(objFilename) ;
-            // EXPERIMENT
-            objectFile = FileFactory.createObjectFileMem(objFilename) ;
+            if ( fsObjectFile.isMem() )
+                objectFile = FileFactory.createObjectFileMem(objFilename) ;
+            else
+                objectFile = FileFactory.createObjectFileDisk(objFilename) ;
 
             NodeTableTrans ntt = new NodeTableTrans(txn ,fsObjectFile.getBasename(), ntBase,
idx, objectFile) ;
             txn.addComponent(ntt) ;

Modified: incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/NodeTableTrans.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/NodeTableTrans.java?rev=1212114&r1=1212113&r2=1212114&view=diff
==============================================================================
--- incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/NodeTableTrans.java
(original)
+++ incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/NodeTableTrans.java
Thu Dec  8 20:49:15 2011
@@ -65,7 +65,6 @@ public class NodeTableTrans implements N
         this.txn = txn ;
         this.base = sub ;
         this.nodeIndex = nodeIndex ;
-        //objFile.truncate(0) ;
         this.journalObjFile = objFile ;
         
         this.label = label ; 
@@ -190,16 +189,15 @@ public class NodeTableTrans implements N
         
         this.nodeTableJournal = new NodeTableNative(nodeIndex, journalObjFile) ;
         this.nodeTableJournal = NodeTableCache.create(nodeTableJournal, CacheSize, CacheSize)
;
-        // map to/from Journal knows about unmappable inline values. 
+
+        // This class knows about non-mappable inline values.   mapToJournal(NodeId)/mapFromJournal.

         this.nodeTableJournal = NodeTableInline.create(nodeTableJournal) ;
-        
     }
     
     /** Copy from the journal file to the real file */
     /*package*/ void append()
     {
         //debug(">> append: %s",label) ;
-        
         // Assumes all() is in order from low to high.
         Iterator<Pair<NodeId, Node>> iter = nodeTableJournal.all() ;
         for ( ; iter.hasNext() ; )



Mime
View raw message