インターフェース RedisConfiguration

すべての既知の実装クラス:
RedisClusterConfiguration, RedisSentinelConfiguration, RedisSocketConfiguration, RedisStandaloneConfiguration, RedisStaticMasterReplicaConfiguration

public interface RedisConfiguration
Redis 接続設定に関連する設定クラスのマーカーインターフェース。設定シナリオは非常に多様であるため、統一する手間を省き、RedisConfiguration は個々の目的に合わせて設定を識別する手段を提供します。
導入:
2.1
作成者:
Christoph Strobl, Luis De Bello, Vikas Garg
  • メソッドの詳細

    • getDatabaseOrElse

      default IntegerSE getDatabaseOrElse(SupplierSE<IntegerSE> other)
      現在の RedisConfiguration が database aware の場合は構成されたデータベースインデックスを取得し、指定された SupplierSE の値を評価して返します。
      パラメーター:
      other - 指定された RedisConfiguration が database aware でない場合に結果が返される Supplier
      戻り値:
      決して null にはなりません。
      例外:
      IllegalArgumentExceptionSE - other が null の場合。
    • getPasswordOrElse

      default RedisPassword getPasswordOrElse(SupplierSE<RedisPassword> other)
      現在の RedisConfiguration が password aware の場合は構成された RedisPassword を取得するか、指定された SupplierSE の値を評価して返します。
      パラメーター:
      other - 指定された RedisConfiguration が password aware でない場合に結果が返される Supplier
      戻り値:
      決して null にはなりません。
      例外:
      IllegalArgumentExceptionSE - other が null の場合。
    • isAuthenticationAware

      @Contract("null -> false") static boolean isAuthenticationAware(@Nullable RedisConfiguration configuration)
      パラメーター:
      configuration - null でもかまいません。
      戻り値:
      true が指定されている場合、RedisConfiguration は RedisConfiguration.WithPassword のインスタンスになります。
    • isDatabaseIndexAware

      @Contract("null -> false") static boolean isDatabaseIndexAware(@Nullable RedisConfiguration configuration)
      パラメーター:
      configuration - null でもかまいません。
      戻り値:
      true が指定されている場合、RedisConfiguration は RedisConfiguration.WithDatabaseIndex のインスタンスになります。
    • isSentinelConfiguration

      @Contract("null -> false") static boolean isSentinelConfiguration(@Nullable RedisConfiguration configuration)
      パラメーター:
      configuration - null でもかまいません。
      戻り値:
      true が指定されている場合、RedisConfiguration は RedisConfiguration.SentinelConfiguration のインスタンスになります。
    • isHostAndPortAware

      @Contract("null -> false") static boolean isHostAndPortAware(@Nullable RedisConfiguration configuration)
      パラメーター:
      configuration - null でもかまいません。
      戻り値:
      true が指定されている場合、RedisConfiguration は RedisConfiguration.WithHostAndPort のインスタンスになります。
      導入:
      2.1.6
    • isClusterConfiguration

      @Contract("null -> false") static boolean isClusterConfiguration(@Nullable RedisConfiguration configuration)
      パラメーター:
      configuration - null でもかまいません。
      戻り値:
      true が指定されている場合、RedisConfiguration は RedisConfiguration.ClusterConfiguration のインスタンスになります。
    • isStaticMasterReplicaConfiguration

      @Contract("null -> false") static boolean isStaticMasterReplicaConfiguration(@Nullable RedisConfiguration configuration)
      パラメーター:
      configuration - null でもかまいません。
      戻り値:
      true が指定されている場合、RedisConfiguration は RedisConfiguration.StaticMasterReplicaConfiguration のインスタンスになります。
    • isDomainSocketConfiguration

      @Contract("null -> false") static boolean isDomainSocketConfiguration(@Nullable RedisConfiguration configuration)
      パラメーター:
      configuration - null でもかまいません。
      戻り値:
      true が指定されている場合、RedisConfiguration は RedisConfiguration.DomainSocketConfiguration のインスタンスになります。
    • getDatabaseOrElse

      static IntegerSE getDatabaseOrElse(@Nullable RedisConfiguration configuration, SupplierSE<IntegerSE> other)
      パラメーター:
      configuration - null でもかまいません。
      other - 指定された RedisConfiguration が database aware でない場合に結果が返される Supplier
      戻り値:
      決して null にはなりません。
      例外:
      IllegalArgumentExceptionSE - other が null の場合。
    • getUsernameOrElse

      static @Nullable StringSE getUsernameOrElse(@Nullable RedisConfiguration configuration, SupplierSE<@Nullable StringSE> other)
      パラメーター:
      configuration - null でもかまいません。
      other - 指定された RedisConfiguration が password aware でない場合に結果が返される Supplier
      戻り値:
      null でもかまいません。
      例外:
      IllegalArgumentExceptionSE - other が null の場合。
    • getPasswordOrElse

      static RedisPassword getPasswordOrElse(@Nullable RedisConfiguration configuration, SupplierSE<RedisPassword> other)
      パラメーター:
      configuration - null でもかまいません。
      other - 指定された RedisConfiguration が password aware でない場合に結果が返される Supplier
      戻り値:
      決して null にはなりません。
      例外:
      IllegalArgumentExceptionSE - other が null の場合。
    • getPortOrElse

      static int getPortOrElse(@Nullable RedisConfiguration configuration, IntSupplierSE other)
      パラメーター:
      configuration - null でもかまいません。
      other - 指定された RedisConfiguration が port aware でない場合に結果が返される Supplier
      戻り値:
      決して null にはなりません。
      例外:
      IllegalArgumentExceptionSE - other が null の場合。
      導入:
      2.1.6
    • getHostOrElse

      static StringSE getHostOrElse(@Nullable RedisConfiguration configuration, SupplierSE<StringSE> other)
      パラメーター:
      configuration - null でもかまいません。
      other - 指定された RedisConfiguration が host aware でない場合に結果が返される Supplier
      戻り値:
      決して null にはなりません。
      例外:
      IllegalArgumentExceptionSE - other が null の場合。
      導入:
      2.1.6