Package com.asakusafw.runtime.io.util

Examples of com.asakusafw.runtime.io.util.DataBuffer


        this.output = output;
        this.dataTypeName = dataTypeName;
    }

    public synchronized void initialize(int initialBufferSize) {
        available.addFirst(new DataBuffer(initialBufferSize));
        available.addFirst(new DataBuffer(initialBufferSize));
    }
View Full Code Here


            flushBuffer();
            if (available.isEmpty()) {
                throw new IllegalStateException();
            }
        }
        DataBuffer first = available.removeFirst();
        first.reset(0, 0);
        return first;
    }
View Full Code Here

        this.input = input;
        this.blockRest = Math.max(blocks - 1, -1);
    }

    public void initialize() {
        releaseBuffer(new DataBuffer());
        releaseBuffer(new DataBuffer());
    }
View Full Code Here

    private void submitIfAvailable() {
        if (sawEof || running != null || available.isEmpty()) {
            return;
        }
        // acquires an available buffer for reading next page, and submit the task
        DataBuffer buffer = available.removeFirst();
        Task task = new Task(input, buffer, positionInBlock, currentBlock, blockRest);
        running = executor.submit(task);
    }
View Full Code Here

    /**
     * 初期バッファサイズを指定してインスタンスを生成する。
     * @param bufferSize 初期バッファサイズ
     */
    public LookUpKey(int bufferSize) {
        this.buffer = new DataBuffer(bufferSize);
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.runtime.io.util.DataBuffer

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.