Author: j16sdiz
Date: 2008-09-05 15:48:12 +0000 (Fri, 05 Sep 2008)
New Revision: 22461
Modified:
trunk/freenet/src/freenet/node/Node.java
Log:
rearrange config items
Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java 2008-09-05 15:32:26 UTC (rev
22460)
+++ trunk/freenet/src/freenet/node/Node.java 2008-09-05 15:48:12 UTC (rev
22461)
@@ -1408,50 +1408,6 @@
});
- nodeConfig.register("storeBloomFilterSize", 0x3600000,
sortOrder++, true, false, "Node.storeBloomFilterSize",
- "Node.storeBloomFilterSizeLong", new IntCallback() {
- private Integer cachedBloomFilterSize;
-
- public Integer get() {
- if (cachedBloomFilterSize == null)
- cachedBloomFilterSize =
storeBloomFilterSize;
- return cachedBloomFilterSize;
- }
-
- public void set(Integer val) throws
InvalidConfigValueException, NodeNeedRestartException {
- cachedBloomFilterSize = val;
- throw new
NodeNeedRestartException("Store bloom filter size cannot be changed on the
fly");
- }
-
- public boolean isReadOnly() {
- return !("salt-hash".equals(storeType));
- }
- });
-
- storeBloomFilterSize =
nodeConfig.getInt("storeBloomFilterSize");
-
- nodeConfig.register("storeBloomFilterCounting", true,
sortOrder++, true, false,
- "Node.storeBloomFilterCounting",
"Node.storeBloomFilterCountingLong", new BooleanCallback() {
- private Boolean cachedBloomFilterCounting;
-
- public Boolean get() {
- if (cachedBloomFilterCounting == null)
- cachedBloomFilterCounting =
storeBloomFilterCounting;
- return cachedBloomFilterCounting;
- }
-
- public void set(Boolean val) throws
InvalidConfigValueException, NodeNeedRestartException {
- cachedBloomFilterCounting = val;
- throw new
NodeNeedRestartException("Store bloom filter type cannot be changed on the
fly");
- }
-
- public boolean isReadOnly() {
- return !("salt-hash".equals(storeType));
- }
- });
-
- storeBloomFilterCounting =
nodeConfig.getBoolean("storeBloomFilterCounting");
-
nodeConfig.register("storeType", "bdb-index", sortOrder++,
true, false, "Node.storeType", "Node.storeTypeLong", new StoreTypeCallback());
storeType = nodeConfig.getString("storeType");
@@ -1506,6 +1462,50 @@
maxTotalKeys = maxTotalDatastoreSize / sizePerKey;
+ nodeConfig.register("storeBloomFilterSize", 0x3600000,
sortOrder++, true, false, "Node.storeBloomFilterSize",
+ "Node.storeBloomFilterSizeLong", new IntCallback() {
+ private Integer cachedBloomFilterSize;
+
+ public Integer get() {
+ if (cachedBloomFilterSize == null)
+ cachedBloomFilterSize =
storeBloomFilterSize;
+ return cachedBloomFilterSize;
+ }
+
+ public void set(Integer val) throws
InvalidConfigValueException, NodeNeedRestartException {
+ cachedBloomFilterSize = val;
+ throw new
NodeNeedRestartException("Store bloom filter size cannot be changed on the
fly");
+ }
+
+ public boolean isReadOnly() {
+ return !("salt-hash".equals(storeType));
+ }
+ });
+
+ storeBloomFilterSize =
nodeConfig.getInt("storeBloomFilterSize");
+
+ nodeConfig.register("storeBloomFilterCounting", true,
sortOrder++, true, false,
+ "Node.storeBloomFilterCounting",
"Node.storeBloomFilterCountingLong", new BooleanCallback() {
+ private Boolean cachedBloomFilterCounting;
+
+ public Boolean get() {
+ if (cachedBloomFilterCounting == null)
+ cachedBloomFilterCounting =
storeBloomFilterCounting;
+ return cachedBloomFilterCounting;
+ }
+
+ public void set(Boolean val) throws
InvalidConfigValueException, NodeNeedRestartException {
+ cachedBloomFilterCounting = val;
+ throw new
NodeNeedRestartException("Store bloom filter type cannot be changed on the
fly");
+ }
+
+ public boolean isReadOnly() {
+ return !("salt-hash".equals(storeType));
+ }
+ });
+
+ storeBloomFilterCounting =
nodeConfig.getBoolean("storeBloomFilterCounting");
+
nodeConfig.register("storeDir", "datastore", sortOrder++, true,
true, "Node.storeDirectory", "Node.storeDirectoryLong",
new StringCallback() {
public String get() {