Package freenet.client

Examples of freenet.client.FailureCodeTracker


      expectedURI = new FreenetURI(euri);
    else
      expectedURI = null;
    SimpleFieldSet trackerSubset = fs.subset("Errors");
    if(trackerSubset != null) {
      tracker = new FailureCodeTracker(true, trackerSubset);
    } else {
      tracker = null;
    }
  }
View Full Code Here


    }
   
    extraDescription = fs.get("ExtraDescription");
    SimpleFieldSet trackerSubset = fs.subset("Errors");
    if(trackerSubset != null) {
      tracker = new FailureCodeTracker(true, trackerSubset);
    } else {
      tracker = null;
    }
    expectedMimeType = fs.get("ExpectedMimeType");
    finalizedExpected = fs.getBoolean("FinalizedExpected", false);
View Full Code Here

    this.ctx = ctx;
    this.maxRetries = ctx.maxInsertRetries;
    this.consecutiveRNFsCountAsSuccess = ctx.consecutiveRNFsCountAsSuccess;
    this.parent = parent;
    this.clientContext = clientContext;
    this.errors = new FailureCodeTracker(true);
    this.realTimeFlag = clientContext.realTimeFlag();
    DataInputStream dis = new DataInputStream(blob.getInputStream());

    BlockSet blocks = new SimpleBlockSet();
View Full Code Here

        this.hashThisLayerOnly = hashThisLayerOnly;
        this.topDontCompress = topDontCompress;
        this.origDataSize = origDataSize;
        this.origCompressedDataSize = origCompressedDataSize;
        this.maxRetries = ctx.maxInsertRetries;
        this.errors = new FailureCodeTracker(true);
        this.ticker = ticker;
        this.random = random;

        // Work out how many blocks in each segment, crypto keys etc.
        // Complicated by back compatibility, i.e. the need to be able to
View Full Code Here

            dis.close();
        }
        ois.close();
        ois = new RAFInputStream(raf, offsetOverallStatus, rafLength - offsetOverallStatus);
        dis = new DataInputStream(checker.checksumReaderWithLength(ois, new ArrayBucketFactory(), 1024*1024));
        errors = new FailureCodeTracker(true, dis);
        dis.close();
        for(SplitFileInserterSegmentStorage segment : segments) {
            segment.readStatus();
        }
        if(crossSegments != null) {
View Full Code Here

        this.decompressedLength = metadata.uncompressedDataLength();
        this.splitfileType = metadata.getSplitfileType();
        this.fecCodec = FECCodec.getInstance(splitfileType);
        this.decompressors = decompressors;
        this.random = random;
        this.errors = new FailureCodeTracker(false);
        this.checksumChecker = checker;
        this.checksumLength = checker.checksumLength();
        this.persistent = persistent;
        this.completeViaTruncation = (storageFile != null);
        if(decompressors.size() > 1) {
View Full Code Here

        this.checksumChecker = checker;
        this.checksumLength = checker.checksumLength();
        this.maxRetries = origContext.maxSplitfileBlockRetries;
        this.cooldownTries = origContext.getCooldownRetries();
        this.cooldownLength = origContext.getCooldownTime();
        this.errors = new FailureCodeTracker(false); // FIXME persist???
        this.completeViaTruncation = completeViaTruncation;
        // FIXME this is hideous! Rewrite the writing/parsing code here in a less ugly way. However, it works...
        rafLength = raf.size();
        if(raf.size() < 8 /* FIXME more! */)
            throw new StorageFormatException("Too short");
View Full Code Here

            ByteArrayInputStream bais = new ByteArrayInputStream(buf);
            DataInputStream dis = new DataInputStream(bais);
            long flags = dis.readLong();
            if((flags & HAS_CHECKED_DATASTORE_FLAG) != 0)
                hasCheckedDatastore = true;
            errors = new FailureCodeTracker(false, dis);
            dis.close();
        } catch (ChecksumFailedException e) {
            Logger.error(this, "Failed to read general progress: "+e);
            // Reset general progress
            this.hasCheckedDatastore = false;
            this.errors = new FailureCodeTracker(false);
        } catch (StorageFormatException e) {
            Logger.error(this, "Failed to read general progress: "+e);
            // Reset general progress
            this.hasCheckedDatastore = false;
            this.errors = new FailureCodeTracker(false);
        }
    }
View Full Code Here

    this.dontSendEncoded = dontSendEncoded;
    this.retries = 0;
    this.finished = false;
    this.ctx = ctx;
    this.freeData = freeData;
    errors = new FailureCodeTracker(true);
    this.cb = cb;
    this.uri = uri;
    this.compressionCodec = compressionCodec;
    this.sourceData = data;
    if(sourceData == null) throw new NullPointerException();
View Full Code Here

TOP

Related Classes of freenet.client.FailureCodeTracker

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.