Class MasterSelectionPolicy.Factory

    • Constructor Detail

      • Factory

        public Factory()
    • 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