public Short deserialize(ByteBuffer bytes) { return bytes.remaining() == 0 ? null : ByteBufferUtil.toShort(bytes); }
public Short deserialize(ByteBuffer bytes) { return bytes.remaining() == 0 ? null : ByteBufferUtil.toShort(bytes); }
public Short deserialize(ByteBuffer bytes) { return bytes.remaining() == 0 ? null : ByteBufferUtil.toShort(bytes); }
public Short deserialize(ByteBuffer bytes) { return bytes.remaining() == 0 ? null : ByteBufferUtil.toShort(bytes); }
public Short deserialize(ByteBuffer bytes) { return bytes.remaining() == 0 ? null : ByteBufferUtil.toShort(bytes); }
public ByteBuffer serializeForNativeProtocol(Iterator<Cell> cells, ProtocolVersion protocolVersion) { assert isMultiCell; ByteBuffer[] components = new ByteBuffer[size()]; short fieldPosition = 0; while (cells.hasNext()) { Cell cell = cells.next(); // handle null fields that aren't at the end short fieldPositionOfCell = ByteBufferUtil.toShort(cell.path().get(0)); while (fieldPosition < fieldPositionOfCell) components[fieldPosition++] = null; components[fieldPosition++] = cell.value(); } // append trailing nulls for missing cells while (fieldPosition < size()) components[fieldPosition++] = null; return TupleType.buildValue(components); }
public ByteBuffer serializeForNativeProtocol(Iterator<Cell> cells, ProtocolVersion protocolVersion) { assert isMultiCell; ByteBuffer[] components = new ByteBuffer[size()]; short fieldPosition = 0; while (cells.hasNext()) { Cell cell = cells.next(); // handle null fields that aren't at the end short fieldPositionOfCell = ByteBufferUtil.toShort(cell.path().get(0)); while (fieldPosition < fieldPositionOfCell) components[fieldPosition++] = null; components[fieldPosition++] = cell.value(); } // append trailing nulls for missing cells while (fieldPosition < size()) components[fieldPosition++] = null; return TupleType.buildValue(components); }
public ByteBuffer serializeForNativeProtocol(Iterator<Cell> cells, ProtocolVersion protocolVersion) { assert isMultiCell; ByteBuffer[] components = new ByteBuffer[size()]; short fieldPosition = 0; while (cells.hasNext()) { Cell cell = cells.next(); // handle null fields that aren't at the end short fieldPositionOfCell = ByteBufferUtil.toShort(cell.path().get(0)); while (fieldPosition < fieldPositionOfCell) components[fieldPosition++] = null; components[fieldPosition++] = cell.value(); } // append trailing nulls for missing cells while (fieldPosition < size()) components[fieldPosition++] = null; return TupleType.buildValue(components); }
public ByteBuffer serializeForNativeProtocol(Iterator<Cell> cells, ProtocolVersion protocolVersion) { assert isMultiCell; ByteBuffer[] components = new ByteBuffer[size()]; short fieldPosition = 0; while (cells.hasNext()) { Cell cell = cells.next(); // handle null fields that aren't at the end short fieldPositionOfCell = ByteBufferUtil.toShort(cell.path().get(0)); while (fieldPosition < fieldPositionOfCell) components[fieldPosition++] = null; components[fieldPosition++] = cell.value(); } // append trailing nulls for missing cells while (fieldPosition < size()) components[fieldPosition++] = null; return TupleType.buildValue(components); }