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 2014/09/07 19:53:51 UTC
svn commit: r1623079 - in
/jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup: BuildDB.java
DatasetBuilderStd.java SystemParams.java SystemParamsBuilder.java
Author: andy
Date: Sun Sep 7 17:53:51 2014
New Revision: 1623079
URL: http://svn.apache.org/r1623079
Log:
Better naming
Modified:
jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/BuildDB.java
jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/DatasetBuilderStd.java
jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/SystemParams.java
jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/SystemParamsBuilder.java
Modified: jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/BuildDB.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/BuildDB.java?rev=1623079&r1=1623078&r2=1623079&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/BuildDB.java (original)
+++ jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/BuildDB.java Sun Sep 7 17:53:51 2014
@@ -51,7 +51,7 @@ public class BuildDB
spb.blockReadCacheSize(readCacheSize) ;
spb.blockWriteCacheSize(writeCacheSize) ;
RecordFactory recordFactory = new RecordFactory(dftKeyLength, dftValueLength) ;
- IndexParams idxParams = spb.buildParams() ;
+ IndexParams idxParams = spb.build() ;
FileSet fs = new FileSet(location, indexName) ;
RangeIndex rIndex = BuildIndex.buildRangeIndex(fs, recordFactory, idxParams) ;
TupleIndex tupleIndex = new TupleIndexRecord(primary.length(), new ColumnMap(primary, indexOrder), indexOrder, rIndex.getRecordFactory(), rIndex) ;
@@ -103,6 +103,6 @@ public class BuildDB
spb.indexNode2Id(indexNode2Id).node2NodeIdCacheSize(node2NodeIdCacheSize) ;
spb.indexId2Node(indexId2Node).nodeId2NodeCacheSize(nodeId2NodeCacheSize) ;
DatasetBuilderStd dbBuild = DatasetBuilderStd.stdBuilder() ;
- return makeNodeTable(location, spb.buildParams()) ;
+ return makeNodeTable(location, spb.build()) ;
}
}
Modified: jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/DatasetBuilderStd.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/DatasetBuilderStd.java?rev=1623079&r1=1623078&r2=1623079&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/DatasetBuilderStd.java (original)
+++ jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/DatasetBuilderStd.java Sun Sep 7 17:53:51 2014
@@ -306,7 +306,7 @@ public class DatasetBuilderStd implement
spb.indexId2Node(indexId2Node) ;
spb.node2NodeIdCacheSize(sizeNode2NodeIdCache) ;
spb.nodeId2NodeCacheSize(sizeNodeId2NodeCache) ;
- return makeNodeTable(location, spb.buildParams()) ;
+ return makeNodeTable(location, spb.build()) ;
}
private static void error(Logger log, String msg) {
Modified: jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/SystemParams.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/SystemParams.java?rev=1623079&r1=1623078&r2=1623079&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/SystemParams.java (original)
+++ jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/SystemParams.java Sun Sep 7 17:53:51 2014
@@ -28,7 +28,7 @@ public class SystemParams implements Ind
{
// SystemParams are built with a SystemParamsBuilder
- private static SystemParams dftSystemParams = new SystemParamsBuilder().buildParams() ;
+ private static SystemParams dftSystemParams = new SystemParamsBuilder().build() ;
/* These are items you can change JVM to JVM */
Modified: jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/SystemParamsBuilder.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/SystemParamsBuilder.java?rev=1623079&r1=1623078&r2=1623079&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/SystemParamsBuilder.java (original)
+++ jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/setup/SystemParamsBuilder.java Sun Sep 7 17:53:51 2014
@@ -18,23 +18,12 @@
package com.hp.hpl.jena.tdb.setup;
-import org.apache.jena.atlas.json.JSON ;
-import org.apache.jena.atlas.json.JsonObject ;
-
import com.hp.hpl.jena.tdb.base.block.FileMode ;
import com.hp.hpl.jena.tdb.sys.Names ;
import com.hp.hpl.jena.tdb.sys.SystemTDB ;
public class SystemParamsBuilder {
- /*
- * There are two possible styles here - centrally managed parameters, so the named
- * can be used in compiled method names; and an open style here a name (string)
- * can be used in a map-like way Map<String, Object>
- *
- */
-
-
- // Defaults.
+ // Initial values are the system defaults.
/** Database and query configuration */
@@ -120,7 +109,7 @@ public class SystemParamsBuilder {
this.prefixId2Node = other.getIndexId2Node() ;
}
- public SystemParams buildParams() {
+ public SystemParams build() {
return new SystemParams(
fileMode, blockSize, blockReadCacheSize, blockWriteCacheSize,
Node2NodeIdCacheSize, NodeId2NodeCacheSize, NodeMissCacheSize,
@@ -130,10 +119,10 @@ public class SystemParamsBuilder {
prefixNode2Id, prefixId2Node) ;
}
- public SystemParams build(String filename) {
- JsonObject obj = JSON.read(filename) ;
- return null ;
- }
+// public SystemParams build(String filename) {
+// JsonObject obj = JSON.read(filename) ;
+// return null ;
+// }
public FileMode getFileMode() {
return fileMode ;