インターフェース RedisConfiguration
- すべての既知の実装クラス:
RedisClusterConfiguration, RedisSentinelConfiguration, RedisSocketConfiguration, RedisStandaloneConfiguration, RedisStaticMasterReplicaConfiguration
public interface RedisConfiguration
Redis 接続設定に関連する設定クラスのマーカーインターフェース。設定シナリオは非常に多様であるため、統一する手間を省き、
RedisConfiguration は個々の目的に合わせて設定を識別する手段を提供します。- 導入:
- 2.1
- 作成者:
- Christoph Strobl, Luis De Bello, Vikas Garg
ネストされたクラスの要約
ネストされたクラス修飾子と型インターフェース説明static interfaceRedis クラスター環境に適した構成インターフェース。static interfaceローカル UNIX ドメインソケットを使用したシングルノード redis 接続に適した構成インターフェース。static interfaceRedis Sentinel 環境に適した構成インターフェース。static interface固定ホストの Redis マスター / レプリカ環境に適した構成インターフェース。static interface接続時に認証を使用する可能性のある構成に適したRedisConfiguration部品。static interface特定のデータベースを使用する構成に適したRedisConfigurationパーツ。static interface接続にネイティブドメインソケットを使用する構成に適したRedisConfigurationパーツ。static interfaceホスト / ポートの組み合わせを使用して接続する構成に適したRedisConfiguration部品。static interface接続時に認証を使用する可能性のある構成に適したRedisConfiguration部品。メソッドのサマリー
修飾子と型メソッド説明default IntegerSEgetDatabaseOrElse(SupplierSE<IntegerSE> other) static IntegerSEgetDatabaseOrElse(@Nullable RedisConfiguration configuration, SupplierSE<IntegerSE> other) static StringSEgetHostOrElse(@Nullable RedisConfiguration configuration, SupplierSE<StringSE> other) default RedisPasswordgetPasswordOrElse(SupplierSE<RedisPassword> other) 現在のRedisConfigurationがpassword awareの場合は構成されたRedisPasswordを取得するか、指定されたSupplierSE の値を評価して返します。static RedisPasswordgetPasswordOrElse(@Nullable RedisConfiguration configuration, SupplierSE<RedisPassword> other) static intgetPortOrElse(@Nullable RedisConfiguration configuration, IntSupplierSE other) static @Nullable StringSEgetUsernameOrElse(@Nullable RedisConfiguration configuration, SupplierSE<@Nullable StringSE> other) static booleanisAuthenticationAware(@Nullable RedisConfiguration configuration) static booleanisClusterConfiguration(@Nullable RedisConfiguration configuration) static booleanisDatabaseIndexAware(@Nullable RedisConfiguration configuration) static booleanisDomainSocketConfiguration(@Nullable RedisConfiguration configuration) static booleanisHostAndPortAware(@Nullable RedisConfiguration configuration) static booleanisSentinelConfiguration(@Nullable RedisConfiguration configuration) static booleanisStaticMasterReplicaConfiguration(@Nullable RedisConfiguration configuration)
メソッドの詳細
getDatabaseOrElse
- パラメーター:
other- 指定されたRedisConfigurationがdatabase awareでない場合に結果が返されるSupplier。- 戻り値:
- 決して null にはなりません。
- 例外:
IllegalArgumentExceptionSE-otherが null の場合。
getPasswordOrElse
現在の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
- パラメーター:
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