public static enum Kvrpcpb.APIVersion extends Enum<Kvrpcpb.APIVersion> implements com.google.protobuf.ProtocolMessageEnum
The API version the server and the client is using. See more details in https://github.com/tikv/rfcs/blob/master/text/0069-api-v2.md.Protobuf enum
kvrpcpb.APIVersion
Enum Constant and Description |
---|
UNRECOGNIZED |
V1
Mainly for TxnKV and not safe to use RawKV along with TxnKV.
|
V1TTL
Only RawKV is available, and then 8 bytes representing the unix timestamp in
seconds for expiring time will be append to the value of all RawKV kv pairs.
|
V2
TxnKV keys start with `x{keyspace id}`, `m`, or `t`.
|
Modifier and Type | Field and Description |
---|---|
static int |
V1_VALUE
Mainly for TxnKV and not safe to use RawKV along with TxnKV.
|
static int |
V1TTL_VALUE
Only RawKV is available, and then 8 bytes representing the unix timestamp in
seconds for expiring time will be append to the value of all RawKV kv pairs.
|
static int |
V2_VALUE
TxnKV keys start with `x{keyspace id}`, `m`, or `t`.
|
Modifier and Type | Method and Description |
---|---|
static Kvrpcpb.APIVersion |
forNumber(int value) |
static com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptor() |
com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
com.google.protobuf.Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static com.google.protobuf.Internal.EnumLiteMap<Kvrpcpb.APIVersion> |
internalGetValueMap() |
static Kvrpcpb.APIVersion |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static Kvrpcpb.APIVersion |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static Kvrpcpb.APIVersion |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Kvrpcpb.APIVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Kvrpcpb.APIVersion V1
Mainly for TxnKV and not safe to use RawKV along with TxnKV. V1 server only accepts V1 requests. Except that the V1 raw requests with TTL will be rejected.
V1 = 0;
public static final Kvrpcpb.APIVersion V1TTL
Only RawKV is available, and then 8 bytes representing the unix timestamp in seconds for expiring time will be append to the value of all RawKV kv pairs. ------------------------------------------------------------ | User value | Expire Ts | ------------------------------------------------------------ | 0x12 0x34 0x56 | 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff | ------------------------------------------------------------ V1TTL server only accepts V1 raw requests. V1 client should not use `V1TTL` in request. V1 client should always send `V1`.
V1TTL = 1;
public static final Kvrpcpb.APIVersion V2
TxnKV keys start with `x{keyspace id}`, `m`, or `t`. RawKV keys must be in `default` CF and all start with `r{keyspace id}` prefix, where the keyspace id is in varint format (little endian), whose bytes expect the last one always sets the most significant bit to 1. The last byte in the raw value must be a meta flag. For example: -------------------------------------- | User value | Meta flags | -------------------------------------- | 0x12 0x34 0x56 | 0x00 (0b00000000) | -------------------------------------- As shown in the example below, the least significant bit of the meta flag indicates whether the value contains 8 bytes expire ts at the very left to the meta flags. -------------------------------------------------------------------------------- | User value | Expire Ts | Meta flags | -------------------------------------------------------------------------------- | 0x12 0x34 0x56 | 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff | 0x01 (0b00000001) | -------------------------------------------------------------------------------- V2 server accpets V2 requests and V1 txn requests that statrts with TiDB key prefix (`m` and `t`).
V2 = 2;
public static final Kvrpcpb.APIVersion UNRECOGNIZED
public static final int V1_VALUE
Mainly for TxnKV and not safe to use RawKV along with TxnKV. V1 server only accepts V1 requests. Except that the V1 raw requests with TTL will be rejected.
V1 = 0;
public static final int V1TTL_VALUE
Only RawKV is available, and then 8 bytes representing the unix timestamp in seconds for expiring time will be append to the value of all RawKV kv pairs. ------------------------------------------------------------ | User value | Expire Ts | ------------------------------------------------------------ | 0x12 0x34 0x56 | 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff | ------------------------------------------------------------ V1TTL server only accepts V1 raw requests. V1 client should not use `V1TTL` in request. V1 client should always send `V1`.
V1TTL = 1;
public static final int V2_VALUE
TxnKV keys start with `x{keyspace id}`, `m`, or `t`. RawKV keys must be in `default` CF and all start with `r{keyspace id}` prefix, where the keyspace id is in varint format (little endian), whose bytes expect the last one always sets the most significant bit to 1. The last byte in the raw value must be a meta flag. For example: -------------------------------------- | User value | Meta flags | -------------------------------------- | 0x12 0x34 0x56 | 0x00 (0b00000000) | -------------------------------------- As shown in the example below, the least significant bit of the meta flag indicates whether the value contains 8 bytes expire ts at the very left to the meta flags. -------------------------------------------------------------------------------- | User value | Expire Ts | Meta flags | -------------------------------------------------------------------------------- | 0x12 0x34 0x56 | 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff | 0x01 (0b00000001) | -------------------------------------------------------------------------------- V2 server accpets V2 requests and V1 txn requests that statrts with TiDB key prefix (`m` and `t`).
V2 = 2;
public static Kvrpcpb.APIVersion[] values()
for (Kvrpcpb.APIVersion c : Kvrpcpb.APIVersion.values()) System.out.println(c);
public static Kvrpcpb.APIVersion valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic final int getNumber()
getNumber
in interface com.google.protobuf.Internal.EnumLite
getNumber
in interface com.google.protobuf.ProtocolMessageEnum
@Deprecated public static Kvrpcpb.APIVersion valueOf(int value)
forNumber(int)
instead.value
- The numeric wire value of the corresponding enum entry.public static Kvrpcpb.APIVersion forNumber(int value)
value
- The numeric wire value of the corresponding enum entry.public static com.google.protobuf.Internal.EnumLiteMap<Kvrpcpb.APIVersion> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor
in interface com.google.protobuf.ProtocolMessageEnum
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.ProtocolMessageEnum
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static Kvrpcpb.APIVersion valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2024 PingCAP. All rights reserved.