public class SelectionPolicyAnyStandbyMaster extends AbstractMasterSelectionPolicy
MasterSelectionPolicy.Factory
mPrimaryMasterAddress
Modifier | Constructor and Description |
---|---|
protected |
SelectionPolicyAnyStandbyMaster()
Creates a new standby connection mode that picks the standby master randomly.
|
protected |
SelectionPolicyAnyStandbyMaster(long shuffleSeed)
Creates a new standby connection mode that
picks the standby master deterministically with a random seed.
|
Modifier and Type | Method and Description |
---|---|
InetSocketAddress |
getGrpcMasterAddress(MasterInquireClient masterInquireClient)
Gets the master address the client makes gRPC request to.
|
getPrimaryMasterAddressCached, resetPrimaryMasterAddressCache
protected SelectionPolicyAnyStandbyMaster()
protected SelectionPolicyAnyStandbyMaster(long shuffleSeed)
shuffleSeed
- the random seed to shuffle the master client listpublic InetSocketAddress getGrpcMasterAddress(MasterInquireClient masterInquireClient) throws UnavailableException
MasterSelectionPolicy
getGrpcMasterAddress
in interface MasterSelectionPolicy
getGrpcMasterAddress
in class AbstractMasterSelectionPolicy
masterInquireClient
- master inquire clientUnavailableException
- if address cannot be determinedCopyright © 2023. All Rights Reserved.