クラス RedisStandaloneConfiguration
java.lang.ObjectSE
org.springframework.data.redis.connection.RedisStandaloneConfiguration
- 実装済みのインターフェース一覧:
RedisConfiguration, RedisConfiguration.WithAuthentication, RedisConfiguration.WithDatabaseIndex, RedisConfiguration.WithHostAndPort, RedisConfiguration.WithPassword
public class RedisStandaloneConfiguration
extends ObjectSE
implements RedisConfiguration, RedisConfiguration.WithHostAndPort, RedisConfiguration.WithPassword, RedisConfiguration.WithDatabaseIndex
- 導入:
- 2.0
- 作成者:
- Mark Paluch, Christoph Strobl, John Blum
ネストされたクラスの概要
インターフェース RedisConfiguration から継承されたネストクラス / インターフェース
RedisConfiguration.ClusterConfiguration, RedisConfiguration.DomainSocketConfiguration, RedisConfiguration.SentinelConfiguration, RedisConfiguration.StaticMasterReplicaConfiguration, RedisConfiguration.WithAuthentication, RedisConfiguration.WithDatabaseIndex, RedisConfiguration.WithDomainSocket, RedisConfiguration.WithHostAndPort, RedisConfiguration.WithPasswordコンストラクター概要
コンストラクターコンストラクター説明新しいデフォルトのRedisStandaloneConfigurationを作成します。RedisStandaloneConfiguration(StringSE hostName) hostNameを指定して新しいRedisStandaloneConfigurationを作成します。RedisStandaloneConfiguration(StringSE hostName, int port) hostNameとportを指定して新しいRedisStandaloneConfigurationを作成します。方法の概要
修飾子と型メソッド説明booleanint使用するデータベースインデックスを取得します。接続時に使用する RedisPassword を取得します。intgetPort()Redis サーバーポートを取得します。@Nullable StringSE接続時に使用するユーザー名を取得します。inthashCode()voidsetDatabase(int index) 使用するデータベースインデックスを設定します。voidsetHostName(StringSE hostName) Redis サーバーのホスト名を設定しますvoidsetPassword(RedisPassword password) 指定されたStringSE に対してRedisPasswordを作成および設定します。voidsetPort(int port) Redis サーバーポートを設定します。voidsetUsername(@Nullable StringSE username) 指定されたStringSE を使用してユーザー名を作成および設定します。クラス ObjectSE から継承されたメソッド
clone, finalize, getClass, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース RedisConfiguration から継承されたメソッド
getDatabaseOrElse, getPasswordOrElseインターフェース RedisConfiguration.WithAuthentication から継承されたメソッド
setPassword, setPassword
コンストラクターの詳細
RedisStandaloneConfiguration
public RedisStandaloneConfiguration()新しいデフォルトのRedisStandaloneConfigurationを作成します。RedisStandaloneConfiguration
hostNameを指定して新しいRedisStandaloneConfigurationを作成します。- パラメーター:
hostName- null または空であってはなりません。
RedisStandaloneConfiguration
hostNameとportを指定して新しいRedisStandaloneConfigurationを作成します。- パラメーター:
hostName- null または空であってはなりません。port- 有効な TCP ポート(1-65535)。
メソッドの詳細
getHostName
- 次で指定:
- インターフェース
RedisConfiguration.WithHostAndPortのgetHostName - 戻り値:
- 決して null にはなりません。
getPort
public int getPort()インターフェースからコピーされた説明:RedisConfiguration.WithHostAndPortRedis サーバーポートを取得します。- 次で指定:
- インターフェース
RedisConfiguration.WithHostAndPortのgetPort - 戻り値:
setHostName
インターフェースからコピーされた説明:RedisConfiguration.WithHostAndPortRedis サーバーのホスト名を設定します- 次で指定:
- インターフェース
RedisConfiguration.WithHostAndPortのsetHostName - パラメーター:
hostName- null であってはなりません。
setPort
public void setPort(int port) インターフェースからコピーされた説明:RedisConfiguration.WithHostAndPortRedis サーバーポートを設定します。- 次で指定:
- インターフェース
RedisConfiguration.WithHostAndPortのsetPort - パラメーター:
port-
getDatabase
public int getDatabase()インターフェースからコピーされた説明:RedisConfiguration.WithDatabaseIndex使用するデータベースインデックスを取得します。- 次で指定:
- インターフェース
RedisConfiguration.WithDatabaseIndexのgetDatabase - 戻り値:
- デフォルトでは
zero。
setDatabase
public void setDatabase(int index) インターフェースからコピーされた説明:RedisConfiguration.WithDatabaseIndex使用するデータベースインデックスを設定します。- 次で指定:
- インターフェース
RedisConfiguration.WithDatabaseIndexのsetDatabase - パラメーター:
index-
setUsername
インターフェースからコピーされた説明:RedisConfiguration.WithAuthentication指定されたStringSE を使用してユーザー名を作成および設定します。Redis 6 以降が必要です。- 次で指定:
- インターフェース
RedisConfiguration.WithAuthenticationのsetUsername - パラメーター:
username- ユーザー名。
getUsername
インターフェースからコピーされた説明:RedisConfiguration.WithAuthentication接続時に使用するユーザー名を取得します。- 次で指定:
- インターフェース
RedisConfiguration.WithAuthenticationのgetUsername - 戻り値:
- 何も設定されていない場合は null。
getPassword
インターフェースからコピーされた説明:RedisConfiguration.WithAuthentication接続時に使用する RedisPassword を取得します。- 次で指定:
- インターフェース
RedisConfiguration.WithAuthenticationのgetPassword - 戻り値:
- 何も設定されていない場合は
RedisPassword.none()。
setPassword
インターフェースからコピーされた説明:RedisConfiguration.WithAuthentication指定されたStringSE に対してRedisPasswordを作成および設定します。- 次で指定:
- インターフェース
RedisConfiguration.WithAuthenticationのsetPassword - パラメーター:
password- null であってはならず、代わりにRedisPassword.none()を使用してください。
equals
hashCode