public class TiRegion extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
class |
TiRegion.RegionVerID |
Constructor and Description |
---|
TiRegion(TiConfiguration conf,
Metapb.Region meta,
Metapb.Peer leader,
List<Metapb.Peer> peers,
List<TiStore> stores) |
public TiRegion(TiConfiguration conf, Metapb.Region meta, Metapb.Peer leader, List<Metapb.Peer> peers, List<TiStore> stores)
public TiConfiguration getConf()
public Metapb.Peer getLeader()
public List<Metapb.Peer> getFollowerList()
public List<Metapb.Peer> getLearnerList()
public List<Metapb.Peer> getPeersList()
public Metapb.Peer getCurrentReplica()
public Metapb.Peer getNextReplica()
public void setReplicaIdx(int idx)
public List<Metapb.Peer> getReplicaList()
public long getId()
public com.google.protobuf.ByteString getStartKey()
public boolean contains(Key key)
public com.google.protobuf.ByteString getEndKey()
public Kvrpcpb.Context getLeaderContext()
public Kvrpcpb.Context getReplicaContext(Set<Long> resolvedLocks, TiStoreType storeType)
public Kvrpcpb.Context getReplicaContext(Metapb.Peer currentPeer, Set<Long> resolvedLocks)
public Kvrpcpb.Context getReplicaContext(Metapb.Peer currentPeer)
public TiRegion.RegionVerID getVerID()
public TiRegion switchPeer(long leaderStoreID)
leaderStoreID
- is leader peer id.public boolean isMoreThan(com.google.protobuf.ByteString key)
public boolean isLessThan(com.google.protobuf.ByteString key)
public boolean contains(com.google.protobuf.ByteString key)
public boolean isValid()
public Metapb.RegionEpoch getRegionEpoch()
public Metapb.Region getMeta()
Copyright © 2024 PingCAP. All rights reserved.