Code example for BlockingQueue

Methods: clear

0
        commandBuffer = new LinkedBlockingQueue<byte[]>();
        command = new Command();
    } 
     
    public void clear(){ 
        this.commandBuffer.clear();
        this.currentResultSize = 0;
    } 
     
    public Command command(){ 
        return command;
    } 
     
    /** 
     * 現在未発行のコマンドの総バイトサイズを返却します。 
     * @return 
     */ 
    public int getCommandSize(){ 
        int total = 0;
        for(byte[] b : commandBuffer){
            total += b.length;