public interface ReadOnlyPDClient
Modifier and Type | Method and Description |
---|---|
List<Metapb.Store> |
getAllStores(BackOffer backOffer) |
Long |
getClusterId() |
RequestKeyCodec |
getCodec() |
HostMapping |
getHostMapping() |
Pair<Metapb.Region,Metapb.Peer> |
getRegionByID(BackOffer backOffer,
long id)
Get Region by Region Id
|
Pair<Metapb.Region,Metapb.Peer> |
getRegionByKey(BackOffer backOffer,
com.google.protobuf.ByteString key)
Get Region from PD by key specified
|
TiConfiguration.ReplicaRead |
getReplicaRead() |
Metapb.Store |
getStore(BackOffer backOffer,
long storeId)
Get Store by StoreId
|
TiTimestamp |
getTimestamp(BackOffer backOffer)
Get Timestamp from Placement Driver
|
List<Pdpb.Region> |
scanRegions(BackOffer backOffer,
com.google.protobuf.ByteString startKey,
com.google.protobuf.ByteString endKey,
int limit) |
Long |
updateServiceGCSafePoint(String serviceId,
long ttl,
long safePoint,
BackOffer backOffer)
Update ServiceGCSafePoint
|
TiTimestamp getTimestamp(BackOffer backOffer)
Pair<Metapb.Region,Metapb.Peer> getRegionByKey(BackOffer backOffer, com.google.protobuf.ByteString key)
key
- key in bytes for locating a regionPair<Metapb.Region,Metapb.Peer> getRegionByID(BackOffer backOffer, long id)
id
- Region IdList<Pdpb.Region> scanRegions(BackOffer backOffer, com.google.protobuf.ByteString startKey, com.google.protobuf.ByteString endKey, int limit)
HostMapping getHostMapping()
Metapb.Store getStore(BackOffer backOffer, long storeId)
storeId
- StoreIdList<Metapb.Store> getAllStores(BackOffer backOffer)
TiConfiguration.ReplicaRead getReplicaRead()
Long getClusterId()
RequestKeyCodec getCodec()
Long updateServiceGCSafePoint(String serviceId, long ttl, long safePoint, BackOffer backOffer)
serviceId
- ServiceIdttl
- TTL in secondssafePoint
- The TiTimestamp you want to set. Set to start_ts.getPrevious() is a good
practiceCopyright © 2024 PingCAP. All rights reserved.