/** * Allocate a slice of the given length. */ public ByteBuffer clone(ByteBuffer buffer) { assert buffer != null; if (buffer.remaining() == 0) return ByteBufferUtil.EMPTY_BYTE_BUFFER; ByteBuffer cloned = allocate(buffer.remaining()); cloned.mark(); cloned.put(buffer.duplicate()); cloned.reset(); return cloned; }
protected ByteBuffer[] elementsCopy(AbstractAllocator allocator) { ByteBuffer[] elementsCopy = new ByteBuffer[size]; for (int i = 0; i < size; i++) elementsCopy[i] = allocator.clone(elements[i]); return elementsCopy; }
public Row.Builder rowBuilder(OpOrder.Group writeOp) { return allocator(writeOp).cloningBTreeRowBuilder(); }
public CellPath copy(AbstractAllocator allocator) { return new SingleItemCellPath(allocator.clone(value)); }
/** * Allocate a slice of the given length. */ public ByteBuffer clone(ByteBuffer buffer) { assert buffer != null; if (buffer.remaining() == 0) return ByteBufferUtil.EMPTY_BYTE_BUFFER; ByteBuffer cloned = allocate(buffer.remaining()); cloned.mark(); cloned.put(buffer.duplicate()); cloned.reset(); return cloned; }
public Row.Builder rowBuilder(OpOrder.Group writeOp) { return allocator(writeOp).cloningBTreeRowBuilder(); }
public Composite copy(CFMetaData cfm, AbstractAllocator allocator) { return new SimpleComposite(allocator.clone(element)); } }
/** * Allocate a slice of the given length. */ public ByteBuffer clone(ByteBuffer buffer) { assert buffer != null; if (buffer.remaining() == 0) return ByteBufferUtil.EMPTY_BYTE_BUFFER; ByteBuffer cloned = allocate(buffer.remaining()); cloned.mark(); cloned.put(buffer.duplicate()); cloned.reset(); return cloned; }
public Row.Builder rowBuilder(OpOrder.Group writeOp) { return allocator(writeOp).cloningBTreeRowBuilder(); }
public CellPath copy(AbstractAllocator allocator) { return new SingleItemCellPath(allocator.clone(value)); }
/** * Allocate a slice of the given length. */ public ByteBuffer clone(ByteBuffer buffer) { assert buffer != null; if (buffer.remaining() == 0) return ByteBufferUtil.EMPTY_BYTE_BUFFER; ByteBuffer cloned = allocate(buffer.remaining()); cloned.mark(); cloned.put(buffer.duplicate()); cloned.reset(); return cloned; }
public Row.Builder rowBuilder(OpOrder.Group writeOp) { return allocator(writeOp).cloningBTreeRowBuilder(); }
public ColumnIdentifier clone(AbstractAllocator allocator) { return interned ? this : new ColumnIdentifier(allocator.clone(bytes), text, false); }
/** * Allocate a slice of the given length. */ public ByteBuffer clone(ByteBuffer buffer) { assert buffer != null; if (buffer.remaining() == 0) return ByteBufferUtil.EMPTY_BYTE_BUFFER; ByteBuffer cloned = allocate(buffer.remaining()); cloned.mark(); cloned.put(buffer.duplicate()); cloned.reset(); return cloned; }
@Override public CellName copy(CFMetaData cfm, AbstractAllocator allocator) { return new SimpleDenseCellName(allocator.clone(element)); }
private ByteBuffer get(int i, AbstractAllocator copy) { // remember to take dense/sparse into account, and only return EOC when not dense int size = size(); assert i >= 0 && i < size(); int cellNamesOffset = nameDeltaOffset(size); int startDelta = i == 0 ? 0 : getShort(nameDeltaOffset(i)); int endDelta = i < size - 1 ? getShort(nameDeltaOffset(i + 1)) : valueStartOffset() - cellNamesOffset; int length = endDelta - startDelta; if (copy == null) return getByteBuffer(cellNamesOffset + startDelta, length).order(ByteOrder.BIG_ENDIAN); ByteBuffer result = copy.allocate(length); FastByteOperations.UnsafeOperations.copy(null, peer + cellNamesOffset + startDelta, result, 0, length); return result; }
public CellPath copy(AbstractAllocator allocator) { return new SingleItemCellPath(allocator.clone(value)); }
public ColumnIdentifier clone(AbstractAllocator allocator) { return interned ? this : new ColumnIdentifier(allocator.clone(bytes), text, false); }
public CellPath copy(AbstractAllocator allocator) { return new SingleItemCellPath(allocator.clone(value)); }
public ColumnIdentifier clone(AbstractAllocator allocator) { return interned ? this : new ColumnIdentifier(allocator.clone(bytes), text, false); }