@Override public void forward(int length) { memoryBlock.writerPosition(memoryBlock.writerPosition() + length); }
@Override public int usedMem() { return memory.writerPosition(); }
@Override public int usedMem() { return memory.writerPosition(); }
@Override public int position() { return memoryBlock.writerPosition(); }
@Override public int position() { return memoryBlock.writerPosition(); }
@Override public void forward(int length) { memoryBlock.writerPosition(memoryBlock.writerPosition() + length); }
/** * Current position * * @return The position */ public int position() { return rowBlock.getMemory().writerPosition(); }
/** * Forward the address; * * @param length Length to be forwarded */ public void forward(int length) { rowBlock.getMemory().writerPosition(rowBlock.getMemory().writerPosition() + length); }
/** * Backward the address; * * @param length Length to be backwarded */ public void backward(int length) { rowBlock.getMemory().writerPosition(rowBlock.getMemory().writerPosition() - length); }
/** * Forward the address; * * @param length Length to be forwarded */ public void forward(int length) { rowBlock.getMemory().writerPosition(rowBlock.getMemory().writerPosition() + length); }
@Override public boolean startRow() { memoryBlock.writerPosition(0); return super.startRow(); }
/** * Current position * * @return The position */ public int position() { return rowBlock.getMemory().writerPosition(); }
/** * Backward the address; * * @param length Length to be backwarded */ public void backward(int length) { rowBlock.getMemory().writerPosition(rowBlock.getMemory().writerPosition() - length); }
@Override public boolean startRow() { memoryBlock.writerPosition(0); return super.startRow(); }
@Override public void forward(int length) { rowBlock.getMemory().writerPosition(rowBlock.getMemory().writerPosition() + length); }
@Override public void backward(int length) { rowBlock.getMemory().writerPosition(rowBlock.getMemory().writerPosition() - length); }
@Override public long getOffset() throws IOException { return hasExternalBuf ? pos : pos + rowBlock.getMemory().writerPosition(); }
public boolean next(RowBlock rowblock) throws IOException { long reamin = reader == null ? 0 : reader.remainForRead(); boolean ret = rowblock.copyFromChannel(channel); reader = rowblock.getReader(); filePosition += rowblock.getMemory().writerPosition() - reamin; return ret; }
public boolean next(RowBlock rowblock) throws IOException { long reamin = reader == null ? 0 : reader.remainForRead(); boolean ret = rowblock.copyFromChannel(channel); reader = rowblock.getReader(); filePosition += rowblock.getMemory().writerPosition() - reamin; return ret; }
public boolean addTuple(Tuple tuple) { int prevPos = currentRowBlock.getMemory().writerPosition(); if (currentRowBlock.getWriter().addTuple(tuple)) { UnSafeTuple unSafeTuple = new UnSafeTuple(); unSafeTuple.set(currentRowBlock.getMemory(), prevPos, dataTypes); return super.add(unSafeTuple); } else { this.totalUsedMem += currentRowBlock.usedMem(); this.currentRowBlock = new MemoryRowBlock(dataTypes, new FixedSizeLimitSpec(pageSize), true); this.rowBlocks.add(currentRowBlock); return this.addTuple(tuple); } }