Package alluxio.master.selectionpolicy
Interface MasterSelectionPolicy
-
- All Known Implementing Classes:
AbstractMasterSelectionPolicy
,SelectionPolicyAnyMaster
,SelectionPolicyAnyStandbyMaster
,SelectionPolicyPrimaryMaster
,SelectionPolicySpecifiedMaster
public interface MasterSelectionPolicy
Interface for master selection policy that determines which master node a client should connect to.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
MasterSelectionPolicy.Factory
Factory forMasterSelectionPolicy
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.net.InetSocketAddress
getGrpcMasterAddress(MasterInquireClient masterInquireClient)
Gets the master address the client makes gRPC request to.java.net.InetSocketAddress
getPrimaryMasterAddressCached(MasterInquireClient masterInquireClient)
Get and cache the primary master address.void
resetPrimaryMasterAddressCache()
Resets the cached primary master address.
-
-
-
Method Detail
-
getPrimaryMasterAddressCached
java.net.InetSocketAddress getPrimaryMasterAddressCached(MasterInquireClient masterInquireClient) throws UnavailableException
Get and cache the primary master address.- Parameters:
masterInquireClient
- master inquire client- Returns:
- the remote address of primary master gRPC server
- Throws:
UnavailableException
- if address cannot be determined
-
getGrpcMasterAddress
java.net.InetSocketAddress getGrpcMasterAddress(MasterInquireClient masterInquireClient) throws UnavailableException
Gets the master address the client makes gRPC request to.- Parameters:
masterInquireClient
- master inquire client- Returns:
- the remote address of master gRPC server
- Throws:
UnavailableException
- if address cannot be determined
-
resetPrimaryMasterAddressCache
void resetPrimaryMasterAddressCache()
Resets the cached primary master address.
-
-