Package freenet.client

Examples of freenet.client.FetchContext


     
      long endInsertsTime = System.currentTimeMillis();
     
      System.err.println("Succeeded inserts: "+successes+" of "+INSERTED_BLOCKS+" in "+(endInsertsTime-startInsertsTime)+"ms");
     
      FetchContext fctx = client.getFetchContext();
      fctx.maxNonSplitfileRetries = 0;
      fctx.maxSplitfileBlockRetries = 0;
      RequestClient requestContext = new RequestClient() {

        @Override
View Full Code Here


    this.uri = key;
    this.maxSize = maxSize2;
    this.timeStarted = System.currentTimeMillis();
    this.fctx = fctx;
        this.rc = rc;
    FetchContext alteredFctx = new FetchContext(fctx, FetchContext.IDENTICAL_MASK);
    alteredFctx.maxOutputLength = fctx.maxTempLength = maxSize;
    alteredFctx.eventProducer.addEventListener(this);
    waiters = new ArrayList<FProxyFetchWaiter>();
    results = new ArrayList<FProxyFetchResult>();
    getter = new ClientGetter(this, uri, alteredFctx, FProxyToadlet.PRIORITY, null, null, null);
View Full Code Here

        if(parent instanceof ClientGetter) {
            wantBinaryBlob = ((ClientGetter)parent).collectingBinaryBlob();
        } else {
            wantBinaryBlob = false;
        }
        blockFetchContext = new FetchContext(fetchContext, FetchContext.SPLITFILE_DEFAULT_BLOCK_MASK, true, null);
        if(parent.isCancelled())
            throw new FetchException(FetchExceptionMode.CANCELLED);
       
        try {
            // Completion via truncation.
View Full Code Here

    // it's likely (on reports so far) that a restart will fix it.
    // And we have to get a build out because ALL plugins are now failing to load,
    // including the absolutely essential (for most nodes) JSTUN and UPnP.
    WrapperManager.signalStarting((int) MINUTES.toMillis(2));

    FetchContext ctx = clientCore.makeClient((short)0, true, false).getFetchContext();

    ctx.allowSplitfiles = false;
    ctx.dontEnterImplicitArchives = true;
    ctx.maxArchiveRestarts = 0;
    ctx.maxMetadataSize = 256;
View Full Code Here

      w.write(outsb.toString());
      w.flush();
                  return false;
              }
              try {
                FetchContext context = client.getFetchContext();
              FetchWaiter fw = new FetchWaiter((RequestClient)client);
              ClientGetter get = new ClientGetter(fw, uri, context, RequestStarter.INTERACTIVE_PRIORITY_CLASS, null, null, null);
              get.setMetaSnoop(new DumperSnoopMetadata());
                get.start(n.clientCore.clientContext);
          FetchResult result = fw.waitForCompletion();
View Full Code Here

      ClientRequester requester, boolean keepLastData, boolean checkStoreOnly) {
    return new USKFetcher(usk, this, ctx, requester, 3, false, keepLastData, checkStoreOnly);
  }
 
  public USKFetcherTag getFetcherForInsertDontSchedule(USK usk, short prioClass, USKFetcherCallback cb, RequestClient client, ClientContext context, boolean persistent, boolean ignoreUSKDatehints) {
    FetchContext fctx = ignoreUSKDatehints ? backgroundFetchContextIgnoreDBR : backgroundFetchContext;
    return getFetcher(usk, persistent ? new FetchContext(fctx, FetchContext.IDENTICAL_MASK) : fctx, true, client.persistent(), client.realTimeFlag(), cb, true, context, false);
  }
View Full Code Here

   * @param context
   */
  public void hintUpdate(USK usk, long edition, ClientContext context) {
    if(edition < lookupLatestSlot(usk)) return;
    FreenetURI uri = usk.copy(edition).getURI().sskForUSK();
    final ClientGetter get = new ClientGetter(new NullClientCallback(rcBulk), uri, new FetchContext(backgroundFetchContext, FetchContext.IDENTICAL_MASK), RequestStarter.UPDATE_PRIORITY_CLASS, new NullBucket(), null, null);
    try {
      get.start(context);
    } catch (FetchException e) {
      // Ignore
    }
View Full Code Here

      if(logMINOR) Logger.minor(this, "Ignoring hint because edition is "+uri.getSuggestedEdition()+" but latest is "+lookupLatestSlot(USK.create(uri)));
      return;
    }
    uri = uri.sskForUSK();
    if(logMINOR) Logger.minor(this, "Doing hint fetch for "+uri);
    final ClientGetter get = new ClientGetter(new NullClientCallback(rcBulk), uri, new FetchContext(backgroundFetchContext, FetchContext.IDENTICAL_MASK), priority, new NullBucket(), null, null);
    try {
      get.start(context);
    } catch (FetchException e) {
      if(logMINOR) Logger.minor(this, "Cannot start hint fetch for "+uri+" : "+e, e);
      // Ignore
View Full Code Here

            @Override
            public RequestClient getRequestClient() {
                return rcBulk;
            }
     
    }, uri, new FetchContext(backgroundFetchContext, FetchContext.IDENTICAL_MASK), priority, new NullBucket(), null, null);
    try {
      get.start(context);
    } catch (FetchException e) {
      if(logMINOR) Logger.minor(this, "Cannot start hint fetch for "+uri+" : "+e, e);
      if(e.isDataFound())
View Full Code Here

        Bucket copyBucket = m1.toBucket(smallBucketFactory);
        assertTrue(BucketTools.equalBuckets(metaBucket, copyBucket));
       
        MyFetchCallback fcb = new MyFetchCallback();
       
        FetchContext fctx = HighLevelSimpleClientImpl.makeDefaultFetchContext(size*2, size*2, smallBucketFactory, new SimpleEventProducer());
       
        SplitFileFetcherStorage fetcherStorage = new SplitFileFetcherStorage(m1, fcb, new ArrayList<COMPRESSOR_TYPE>(),
                new ClientMetadata(), false, cmode.code, fctx, false, salt, URI, URI, true, new byte[0],
                r, smallBucketFactory, smallRAFFactory, jobRunner, ticker, memoryLimitedJobRunner,
                checker, false, null, null, keys);
View Full Code Here

TOP

Related Classes of freenet.client.FetchContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.