public class SelectionPolicySpecifiedMaster extends AbstractMasterSelectionPolicy
MasterSelectionPolicy.Factory, MasterSelectionPolicy.Type
mPrimaryMasterAddress
Modifier | Constructor and Description |
---|---|
protected |
SelectionPolicySpecifiedMaster(InetSocketAddress masterAddressToConnect)
Creates a new selection policy that specifies a master address to client.
|
Modifier and Type | Method and Description |
---|---|
InetSocketAddress |
getGrpcMasterAddress(MasterInquireClient masterInquireClient)
Gets the master address the client makes gRPC request to.
|
MasterSelectionPolicy.Type |
getType() |
getPrimaryMasterAddressCached, resetPrimaryMasterAddressCache
protected SelectionPolicySpecifiedMaster(InetSocketAddress masterAddressToConnect)
masterAddressToConnect
- the master address to connectpublic InetSocketAddress getGrpcMasterAddress(MasterInquireClient masterInquireClient) throws UnavailableException
MasterSelectionPolicy
getGrpcMasterAddress
in interface MasterSelectionPolicy
getGrpcMasterAddress
in class AbstractMasterSelectionPolicy
masterInquireClient
- master inquire clientUnavailableException
- if address cannot be determinedpublic MasterSelectionPolicy.Type getType()
Copyright © 2023. All Rights Reserved.