Author: toad
Date: 2007-07-21 12:29:01 +0000 (Sat, 21 Jul 2007)
New Revision: 14226

Modified:
   trunk/freenet/src/freenet/client/FetchContext.java
   trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
Log:
Add ticker to FetchContext.

Modified: trunk/freenet/src/freenet/client/FetchContext.java
===================================================================
--- trunk/freenet/src/freenet/client/FetchContext.java  2007-07-21 12:10:35 UTC 
(rev 14225)
+++ trunk/freenet/src/freenet/client/FetchContext.java  2007-07-21 12:29:01 UTC 
(rev 14226)
@@ -11,6 +11,7 @@
 import freenet.client.events.ClientEventProducer;
 import freenet.client.events.SimpleEventProducer;
 import freenet.crypt.RandomSource;
+import freenet.node.Ticker;
 import freenet.support.api.BucketFactory;

 /** Context for a Fetcher. Contains all the settings a Fetcher needs to know 
about. */
@@ -51,6 +52,7 @@
        /** If set, contains a set of blocks to be consulted before checking 
the datastore. */
        public BlockSet blocks;
        public Set allowedMIMETypes;
+       public final Ticker ticker;

        public FetchContext(long curMaxLength, 
                        long curMaxTempLength, int maxMetadataSize, int 
maxRecursionLevel, int maxArchiveRestarts, int maxArchiveLevels,
@@ -59,7 +61,8 @@
                        boolean allowSplitfiles, boolean followRedirects, 
boolean localRequestOnly,
                        int maxDataBlocksPerSegment, int 
maxCheckBlocksPerSegment,
                        RandomSource random, ArchiveManager archiveManager, 
BucketFactory bucketFactory,
-                       ClientEventProducer producer, boolean 
cacheLocalRequests, USKManager uskManager, HealingQueue hq, boolean 
ignoreTooManyPathComponents) {
+                       ClientEventProducer producer, boolean 
cacheLocalRequests, USKManager uskManager, HealingQueue hq, boolean 
ignoreTooManyPathComponents, Ticker ticker) {
+               this.ticker = ticker;
                this.maxOutputLength = curMaxLength;
                this.uskManager = uskManager;
                this.maxTempLength = curMaxTempLength;
@@ -91,6 +94,7 @@
                        this.eventProducer = ctx.eventProducer;
                else
                        this.eventProducer = new SimpleEventProducer();
+               this.ticker = ctx.ticker;
                this.uskManager = ctx.uskManager;
                this.ignoreTooManyPathComponents = 
ctx.ignoreTooManyPathComponents;
                this.blocks = ctx.blocks;

Modified: trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
===================================================================
--- trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java     
2007-07-21 12:10:35 UTC (rev 14225)
+++ trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java     
2007-07-21 12:29:01 UTC (rev 14226)
@@ -191,7 +191,7 @@
                                MAX_SPLITFILE_BLOCKS_PER_SEGMENT, 
MAX_SPLITFILE_CHECK_BLOCKS_PER_SEGMENT,
                                random, archiveManager, bucketFactory, 
globalEventProducer, 
                                cacheLocalRequests, core.uskManager, 
healingQueue, 
-                               forceDontIgnoreTooManyPathComponents ? false : 
core.ignoreTooManyPathComponents);
+                               forceDontIgnoreTooManyPathComponents ? false : 
core.ignoreTooManyPathComponents, core.getTicker());
        }

        public InsertContext getInsertContext(boolean forceNonPersistent) {


Reply via email to