public class RowsMetadata extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
columnCount |
List<ColumnSpec> |
columnSpecs
empty if and only if the SKIP_METADATA flag is present (there is no difference between skipping
the column specs, and having the specs but no columns in them)
|
int |
flags |
byte[] |
newResultMetadataId |
ByteBuffer |
pagingState |
int[] |
pkIndices |
| Constructor and Description |
|---|
RowsMetadata(int columnCount,
ByteBuffer pagingState,
int[] pkIndices,
byte[] newResultMetadataId)
Builds a new instance with
NO_METADATA == true. |
RowsMetadata(int flags,
List<ColumnSpec> columnSpecs,
int columnCount,
ByteBuffer pagingState,
int[] pkIndices,
byte[] newResultMetadataId)
This constructor should only be used in message codecs.
|
RowsMetadata(List<ColumnSpec> columnSpecs,
ByteBuffer pagingState,
int[] pkIndices,
byte[] newResultMetadataId)
Builds a new instance with
NO_METADATA == false; the column count is set to the number
of column specifications in the provided list. |
| Modifier and Type | Method and Description |
|---|---|
protected static int |
computeFlags(boolean noMetadata,
List<ColumnSpec> columnSpecs,
ByteBuffer pagingState,
byte[] newResultMetadataId) |
static <B> RowsMetadata |
decode(B source,
PrimitiveCodec<B> decoder,
boolean withPkIndices,
int protocolVersion) |
<B> void |
encode(B dest,
PrimitiveCodec<B> encoder,
boolean withPkIndices,
int protocolVersion) |
int |
encodedSize(boolean withPkIndices,
int protocolVersion) |
public final List<ColumnSpec> columnSpecs
public final int columnCount
public final ByteBuffer pagingState
public final int[] pkIndices
public final byte[] newResultMetadataId
public final int flags
public RowsMetadata(List<ColumnSpec> columnSpecs, ByteBuffer pagingState, int[] pkIndices, byte[] newResultMetadataId)
NO_METADATA == false; the column count is set to the number
of column specifications in the provided list.public RowsMetadata(int columnCount,
ByteBuffer pagingState,
int[] pkIndices,
byte[] newResultMetadataId)
NO_METADATA == true.public RowsMetadata(int flags,
List<ColumnSpec> columnSpecs,
int columnCount,
ByteBuffer pagingState,
int[] pkIndices,
byte[] newResultMetadataId)
RowsMetadata(int, ByteBuffer, int[], byte[]) or RowsMetadata(List, ByteBuffer, int[], byte[]) so that the flags are computed automatically.protected static int computeFlags(boolean noMetadata,
List<ColumnSpec> columnSpecs,
ByteBuffer pagingState,
byte[] newResultMetadataId)
public <B> void encode(B dest,
PrimitiveCodec<B> encoder,
boolean withPkIndices,
int protocolVersion)
public int encodedSize(boolean withPkIndices,
int protocolVersion)
public static <B> RowsMetadata decode(B source, PrimitiveCodec<B> decoder, boolean withPkIndices, int protocolVersion)
Copyright © 2017–2020. All rights reserved.