public interface MasterSelectionPolicy
Modifier and Type | Interface and Description |
---|---|
static class |
MasterSelectionPolicy.Factory
Factory for
MasterSelectionPolicy . |
static class |
MasterSelectionPolicy.Type
The enum for master selection policies.
|
Modifier and Type | Method and Description |
---|---|
InetSocketAddress |
getGrpcMasterAddress(MasterInquireClient masterInquireClient)
Gets the master address the client makes gRPC request to.
|
InetSocketAddress |
getPrimaryMasterAddressCached(MasterInquireClient masterInquireClient)
Get and cache the primary master address.
|
MasterSelectionPolicy.Type |
getType() |
void |
resetPrimaryMasterAddressCache()
Resets the cached primary master address.
|
InetSocketAddress getPrimaryMasterAddressCached(MasterInquireClient masterInquireClient) throws UnavailableException
masterInquireClient
- master inquire clientUnavailableException
- if address cannot be determinedInetSocketAddress getGrpcMasterAddress(MasterInquireClient masterInquireClient) throws UnavailableException
masterInquireClient
- master inquire clientUnavailableException
- if address cannot be determinedvoid resetPrimaryMasterAddressCache()
MasterSelectionPolicy.Type getType()
Copyright © 2023. All Rights Reserved.