Package alluxio.master.selectionpolicy
Class MasterSelectionPolicy.Factory
- java.lang.Object
-
- alluxio.master.selectionpolicy.MasterSelectionPolicy.Factory
-
- Enclosing interface:
- MasterSelectionPolicy
public static class MasterSelectionPolicy.Factory extends java.lang.Object
Factory forMasterSelectionPolicy
.
-
-
Constructor Summary
Constructors Constructor Description Factory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MasterSelectionPolicy
anyMaster()
Creates a MasterSelectionPolicy that selects a random master to connect.static MasterSelectionPolicy
anyStandbyMaster()
Creates a MasterSelectionPolicy that selects a standby master to connect.static MasterSelectionPolicy
anyStandbyMaster(long randomSeed)
Creates a MasterSelectionPolicy that selects a standby master to connect.static MasterSelectionPolicy
primaryMaster()
Creates a MasterSelectionPolicy that selects the primary master to connect.static MasterSelectionPolicy
specifiedMaster(java.net.InetSocketAddress masterAddress)
Creates a MasterSelectionPolicy that selects a specified master to connect.
-
-
-
Method Detail
-
primaryMaster
public static MasterSelectionPolicy primaryMaster()
Creates a MasterSelectionPolicy that selects the primary master to connect.- Returns:
- the MasterSelectionPolicy
-
anyStandbyMaster
public static MasterSelectionPolicy anyStandbyMaster()
Creates a MasterSelectionPolicy that selects a standby master to connect.- Returns:
- the MasterSelectionPolicy
-
anyStandbyMaster
public static MasterSelectionPolicy anyStandbyMaster(long randomSeed)
Creates a MasterSelectionPolicy that selects a standby master to connect.- Parameters:
randomSeed
- a random seed to do the deterministic random selection- Returns:
- the MasterSelectionPolicy
-
anyMaster
public static MasterSelectionPolicy anyMaster()
Creates a MasterSelectionPolicy that selects a random master to connect.- Returns:
- the MasterSelectionPolicy
-
specifiedMaster
public static MasterSelectionPolicy specifiedMaster(java.net.InetSocketAddress masterAddress)
Creates a MasterSelectionPolicy that selects a specified master to connect.- Parameters:
masterAddress
- the master address to connect- Returns:
- the MasterSelectionPolicy
-
-