public class TxnKVClient extends Object implements AutoCloseable
Constructor and Description |
---|
TxnKVClient(TiConfiguration conf,
RegionStoreClient.RegionStoreClientBuilder clientBuilder,
ReadOnlyPDClient pdClient) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
ClientRPCResult |
commit(BackOffer backOffer,
com.google.protobuf.ByteString[] keys,
long startTs,
long commitTs,
TiRegion tiRegion,
TiStore store)
Commit request of 2pc, add backoff logic when encountered region error, ErrBodyMissing, and
other errors
|
TiConfiguration |
getConf() |
RegionManager |
getRegionManager() |
TiTimestamp |
getTimestamp() |
ClientRPCResult |
prewrite(BackOffer backOffer,
List<Kvrpcpb.Mutation> mutations,
com.google.protobuf.ByteString primary,
long lockTTL,
long startTs,
TiRegion tiRegion,
TiStore store)
when encountered region error,ErrBodyMissing, and other errors
|
ClientRPCResult |
txnHeartBeat(BackOffer backOffer,
com.google.protobuf.ByteString primaryLock,
long startTs,
long ttl,
TiRegion tiRegion,
TiStore store)
TXN Heart Beat: update primary key ttl
|
public TxnKVClient(TiConfiguration conf, RegionStoreClient.RegionStoreClientBuilder clientBuilder, ReadOnlyPDClient pdClient)
public TiConfiguration getConf()
public RegionManager getRegionManager()
public TiTimestamp getTimestamp()
public ClientRPCResult prewrite(BackOffer backOffer, List<Kvrpcpb.Mutation> mutations, com.google.protobuf.ByteString primary, long lockTTL, long startTs, TiRegion tiRegion, TiStore store)
public ClientRPCResult txnHeartBeat(BackOffer backOffer, com.google.protobuf.ByteString primaryLock, long startTs, long ttl, TiRegion tiRegion, TiStore store)
public ClientRPCResult commit(BackOffer backOffer, com.google.protobuf.ByteString[] keys, long startTs, long commitTs, TiRegion tiRegion, TiStore store)
backOffer
- keys
- startTs
- commitTs
- tiRegion
- public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2024 PingCAP. All rights reserved.