インターフェース 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 interfaceRedisConfigurationパーツは、接続にホスト / ポートの組み合わせを使用する構成に適しています。static interface接続時に認証を使用する可能性のある構成に適したRedisConfigurationパーツ。メソッドのサマリー
修飾子と型メソッド説明default IntegerSEgetDatabaseOrElse(SupplierSE<IntegerSE> other) static IntegerSEgetDatabaseOrElse(RedisConfiguration configuration, SupplierSE<IntegerSE> other) static StringSEgetHostOrElse(RedisConfiguration configuration, SupplierSE<StringSE> other) default RedisPasswordgetPasswordOrElse(SupplierSE<RedisPassword> other) 現在のRedisConfigurationがpassword awareの場合は、構成済みのRedisPasswordを取得するか、指定されたSupplierSE の値を評価して返します。static RedisPasswordgetPasswordOrElse(RedisConfiguration configuration, SupplierSE<RedisPassword> other) static intgetPortOrElse(RedisConfiguration configuration, IntSupplierSE other) static StringSEgetUsernameOrElse(RedisConfiguration configuration, SupplierSE<StringSE> other) static booleanisAuthenticationAware(RedisConfiguration configuration) static booleanisClusterConfiguration(RedisConfiguration configuration) static booleanisDatabaseIndexAware(RedisConfiguration configuration) static booleanisDomainSocketConfiguration(RedisConfiguration configuration) static booleanisHostAndPortAware(RedisConfiguration configuration) static booleanisSentinelConfiguration(RedisConfiguration configuration) static booleanisStaticMasterReplicaConfiguration(RedisConfiguration configuration)
メソッドの詳細
getDatabaseOrElse
- パラメーター:
other-RedisConfigurationが指定された場合に結果が返されるSupplierはdatabase awareではありません。- 戻り値:
- 決して null にはなりません。
- 例外:
IllegalArgumentExceptionSE-otherが null の場合。
getPasswordOrElse
現在のRedisConfigurationがpassword awareの場合は、構成済みのRedisPasswordを取得するか、指定されたSupplierSE の値を評価して返します。- パラメーター:
other-RedisConfigurationが指定された場合に結果が返されるSupplierはpassword awareではありません。- 戻り値:
- 決して null にはなりません。
- 例外:
IllegalArgumentExceptionSE-otherが null の場合。
isAuthenticationAware
- パラメーター:
configuration- null でもかまいません。- 戻り値:
-
RedisConfigurationが指定されている場合、trueはRedisConfiguration.WithPasswordのインスタンスです。
isDatabaseIndexAware
- パラメーター:
configuration- null でもかまいません。- 戻り値:
-
RedisConfigurationが指定されている場合、trueはRedisConfiguration.WithDatabaseIndexのインスタンスです。
isSentinelConfiguration
- パラメーター:
configuration- null でもかまいません。- 戻り値:
-
RedisConfigurationが指定されている場合、trueはRedisConfiguration.SentinelConfigurationのインスタンスです。
isHostAndPortAware
- パラメーター:
configuration- null でもかまいません。- 戻り値:
-
RedisConfigurationが指定されている場合、trueはRedisConfiguration.WithHostAndPortのインスタンスです。 - 導入:
- 2.1.6
isClusterConfiguration
- パラメーター:
configuration- null でもかまいません。- 戻り値:
-
RedisConfigurationが指定されている場合、trueはRedisConfiguration.ClusterConfigurationのインスタンスです。
isStaticMasterReplicaConfiguration
- パラメーター:
configuration- null でもかまいません。- 戻り値:
-
RedisConfigurationが指定されている場合、trueはRedisConfiguration.StaticMasterReplicaConfigurationのインスタンスです。
isDomainSocketConfiguration
- パラメーター:
configuration- null でもかまいません。- 戻り値:
-
RedisConfigurationが指定されている場合、trueはRedisConfiguration.DomainSocketConfigurationのインスタンスです。
getDatabaseOrElse
static IntegerSE getDatabaseOrElse(@Nullable RedisConfiguration configuration, SupplierSE<IntegerSE> other) - パラメーター:
configuration- null でもかまいません。other-RedisConfigurationが指定された場合に結果が返されるSupplierはdatabase awareではありません。- 戻り値:
- 決して null にはなりません。
- 例外:
IllegalArgumentExceptionSE-otherが null の場合。
getUsernameOrElse
@Nullable static StringSE getUsernameOrElse(@Nullable RedisConfiguration configuration, SupplierSE<StringSE> other) - パラメーター:
configuration- null でもかまいません。other-RedisConfigurationが指定された場合に結果が返されるSupplierはpassword awareではありません。- 戻り値:
- null でもかまいません。
- 例外:
IllegalArgumentExceptionSE-otherが null の場合。
getPasswordOrElse
static RedisPassword getPasswordOrElse(@Nullable RedisConfiguration configuration, SupplierSE<RedisPassword> other) - パラメーター:
configuration- null でもかまいません。other-RedisConfigurationが指定された場合に結果が返されるSupplierはpassword awareではありません。- 戻り値:
- 決して null にはなりません。
- 例外:
IllegalArgumentExceptionSE-otherが null の場合。
getPortOrElse
- パラメーター:
configuration- null でもかまいません。other-RedisConfigurationが指定された場合に結果が返されるSupplierはport awareではありません。- 戻り値:
- 決して null にはなりません。
- 例外:
IllegalArgumentExceptionSE-otherが null の場合。- 導入:
- 2.1.6
getHostOrElse
static StringSE getHostOrElse(@Nullable RedisConfiguration configuration, SupplierSE<StringSE> other) - パラメーター:
configuration- null でもかまいません。other-RedisConfigurationが指定された場合に結果が返されるSupplierはhost awareではありません。- 戻り値:
- 決して null にはなりません。
- 例外:
IllegalArgumentExceptionSE-otherが null の場合。- 導入:
- 2.1.6