列挙 HostRequirement

java.lang.Object
java.lang.Enum<HostRequirement>
org.postgresql.hostchooser.HostRequirement
すべての実装されたインタフェース:
Serializable, Comparable<HostRequirement>, java.lang.constant.Constable

public enum HostRequirement extends Enum<HostRequirement>
Describes the required server type.
  • 列挙型定数の詳細

  • メソッドの詳細

    • values

      public static HostRequirement[] values()
      この列挙型の定数を含む配列を宣言されている順序で 返します。
      戻り値:
      この列挙型の定数を含む、宣言されている順序での配列
    • valueOf

      public static HostRequirement valueOf(String name)
      指定した名前を持つこの型の列挙型定数を返します。 文字列は、この型の列挙型定数を宣言するのに使用した識別子と正確に 一致している必要があります。(余分な空白文字を含めることは できません。)
      パラメータ:
      name - 返される列挙型定数の名前。
      戻り値:
      指定した名前の列挙型定数
      例外:
      IllegalArgumentException - この列挙型に、指定した名前の定数がない場合
      NullPointerException - 引数がnullの場合
    • allowConnectingTo

      public abstract boolean allowConnectingTo(@Nullable HostStatus status)
    • getTargetServerType

      public static HostRequirement getTargetServerType(String targetServerType)

      The postgreSQL project has decided not to use the term slave to refer to alternate servers. secondary or standby is preferred. We have arbitrarily chosen secondary. As of Jan 2018 in order not to break existing code we are going to accept both slave or secondary for names of alternate servers.

      The current policy is to keep accepting this silently but not document slave, or slave preferSlave

      As of Jul 2018 silently deprecate the use of the word master as well

      パラメータ:
      targetServerType - the value of targetServerType connection property
      戻り値:
      HostRequirement