Author: toad
Date: 2008-12-18 21:37:26 +0000 (Thu, 18 Dec 2008)
New Revision: 24521
Modified:
branches/db4o/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
branches/db4o/freenet/src/freenet/client/InsertContext.java
branches/db4o/freenet/src/freenet/node/NodeClientCore.java
Log:
Remove RealCompressor from InsertContext. This was causing Node etc to be
stored.
Also never store NodeClientCore.
Modified:
branches/db4o/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
2008-12-18 21:34:17 UTC (rev 24520)
+++ branches/db4o/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
2008-12-18 21:37:26 UTC (rev 24521)
@@ -212,7 +212,7 @@
forceNonPersistent ?
NullPersistentFileTracker.getInstance() : persistentFileTracker,
INSERT_RETRIES, CONSECUTIVE_RNFS_ASSUME_SUCCESS,
SPLITFILE_INSERT_THREADS,
SPLITFILE_BLOCKS_PER_SEGMENT, SPLITFILE_CHECK_BLOCKS_PER_SEGMENT,
- globalEventProducer, cacheLocalRequests,
core.compressor);
+ globalEventProducer, cacheLocalRequests);
}
public FreenetURI[] generateKeyPair(String docName) {
Modified: branches/db4o/freenet/src/freenet/client/InsertContext.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/InsertContext.java 2008-12-18
21:34:17 UTC (rev 24520)
+++ branches/db4o/freenet/src/freenet/client/InsertContext.java 2008-12-18
21:37:26 UTC (rev 24521)
@@ -8,7 +8,6 @@
import freenet.client.events.ClientEventProducer;
import freenet.client.events.SimpleEventProducer;
import freenet.support.api.BucketFactory;
-import freenet.support.compress.RealCompressor;
import freenet.support.io.PersistentFileTracker;
/** Context object for an insert operation, including both simple and
multi-file inserts */
@@ -27,11 +26,10 @@
public final ClientEventProducer eventProducer;
/** Interesting tradeoff, see comments at top of Node.java. */
public final boolean cacheLocalRequests;
- public final RealCompressor compressor;
public InsertContext(BucketFactory bf, BucketFactory persistentBF,
PersistentFileTracker tracker,
int maxRetries, int rnfsToSuccess, int maxThreads, int
splitfileSegmentDataBlocks, int splitfileSegmentCheckBlocks,
- ClientEventProducer eventProducer, boolean
cacheLocalRequests, RealCompressor compressor) {
+ ClientEventProducer eventProducer, boolean
cacheLocalRequests) {
this.persistentFileTracker = tracker;
this.persistentBucketFactory = persistentBF;
dontCompress = false;
@@ -43,7 +41,6 @@
this.splitfileSegmentDataBlocks = splitfileSegmentDataBlocks;
this.splitfileSegmentCheckBlocks = splitfileSegmentCheckBlocks;
this.cacheLocalRequests = cacheLocalRequests;
- this.compressor = compressor;
}
public InsertContext(InsertContext ctx, SimpleEventProducer producer) {
@@ -58,7 +55,6 @@
this.splitfileSegmentDataBlocks =
ctx.splitfileSegmentDataBlocks;
this.splitfileSegmentCheckBlocks =
ctx.splitfileSegmentCheckBlocks;
this.cacheLocalRequests = ctx.cacheLocalRequests;
- this.compressor = ctx.compressor;
}
public void removeFrom(ObjectContainer container) {
Modified: branches/db4o/freenet/src/freenet/node/NodeClientCore.java
===================================================================
--- branches/db4o/freenet/src/freenet/node/NodeClientCore.java 2008-12-18
21:34:17 UTC (rev 24520)
+++ branches/db4o/freenet/src/freenet/node/NodeClientCore.java 2008-12-18
21:37:26 UTC (rev 24521)
@@ -309,7 +309,7 @@
healingQueue = new SimpleHealingQueue(
new InsertContext(tempBucketFactory,
tempBucketFactory, persistentTempBucketFactory,
0, 2, 1, 0, 0, new
SimpleEventProducer(),
-
!Node.DONT_CACHE_LOCAL_REQUESTS, compressor),
RequestStarter.PREFETCH_PRIORITY_CLASS, 512 /* FIXME make configurable */);
+
!Node.DONT_CACHE_LOCAL_REQUESTS), RequestStarter.PREFETCH_PRIORITY_CLASS, 512
/* FIXME make configurable */);
clientContext = new ClientContext(this, fecQueue,
node.executor, backgroundBlockEncoder, archiveManager,
persistentTempBucketFactory, tempBucketFactory, healingQueue, uskManager,
random, node.fastWeakRandom, node.getTicker(), tempFilenameGenerator,
persistentFilenameGenerator, compressor);
compressor.setClientContext(clientContext);
@@ -1455,4 +1455,10 @@
}
}
}
+
+ public boolean objectCanNew(ObjectContainer container) {
+ Logger.error(this, "Not storing NodeClientCore in database",
new Exception("error"));
+ return false;
+ }
+
}
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs