Package freenet.support.io

Examples of freenet.support.io.BarrierRandomAccessBuffer.pause()


    public void testCancel() throws IOException, InsertException, MissingKeyException {
        Random r = new Random(12124);
        long size = 32768*6;
        BarrierRandomAccessBuffer data = new BarrierRandomAccessBuffer(generateData(r, size, smallRAFFactory));
        HashResult[] hashes = getHashes(data);
        data.pause();
        MyCallback cb = new MyCallback();
        InsertContext context = baseContext.clone();
        context.earlyEncode = true;
        KeysFetchingLocally keys = new MyKeysFetchingLocally();
        SplitFileInserterStorage storage = new SplitFileInserterStorage(data, size, cb, null,
View Full Code Here


    }
   
    private void testCancelAlt(Random r, long size) throws IOException, InsertException {
        BarrierRandomAccessBuffer data = new BarrierRandomAccessBuffer(generateData(r, size, smallRAFFactory));
        HashResult[] hashes = getHashes(data);
        data.pause();
        MyCallback cb = new MyCallback();
        InsertContext context = baseContext.clone();
        context.earlyEncode = true;
        KeysFetchingLocally keys = new MyKeysFetchingLocally();
        SplitFileInserterStorage storage = new SplitFileInserterStorage(data, size, cb, null,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.