クラス 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
ネストされたクラスのサマリー
インターフェース org.springframework.data.redis.connection.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) メソッドのサマリー
修飾子と型メソッド説明boolean
int
使用するデータベースインデックスを取得します。接続時に使用する RedisPassword を取得します。int
getPort()
Redis サーバーポートを取得します。接続時に使用するユーザー名を取得します。int
hashCode()
void
setDatabase
(int index) 使用するデータベースインデックスを設定します。void
setHostName
(StringSE hostName) Redis サーバーのホスト名を設定しますvoid
setPassword
(RedisPassword password) 指定されたString
SE に対してRedisPassword
を作成および設定します。void
setPort
(int port) Redis サーバーポートを設定します。void
setUsername
(StringSE username) 指定されたString
SE を使用してユーザー名を作成および設定します。クラス java.lang.ObjectSE から継承されたメソッド
clone, finalize, getClass, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.data.redis.connection.RedisConfiguration から継承されたメソッド
getDatabaseOrElse, getPasswordOrElse
インターフェース org.springframework.data.redis.connection.RedisConfiguration.WithAuthentication から継承されたメソッド
setPassword, setPassword
コンストラクターの詳細
RedisStandaloneConfiguration
public RedisStandaloneConfiguration()新しいデフォルトのRedisStandaloneConfiguration
を作成します。RedisStandaloneConfiguration
hostName
を指定して新しいRedisStandaloneConfiguration
を作成します。- パラメーター:
hostName
- null または空であってはなりません。
RedisStandaloneConfiguration
- パラメーター:
hostName
- null または空であってはなりません。port
- 有効な TCP ポート(1-65535)。
メソッドの詳細
getHostName
- 次で指定:
- インターフェース
RedisConfiguration.WithHostAndPort
のgetHostName
- 戻り値:
- 決して null にはなりません。
getPort
public int getPort()インターフェースからコピーされた説明:RedisConfiguration.WithHostAndPort
Redis サーバーポートを取得します。- 次で指定:
- インターフェース
RedisConfiguration.WithHostAndPort
のgetPort
- 戻り値:
setHostName
インターフェースからコピーされた説明:RedisConfiguration.WithHostAndPort
Redis サーバーのホスト名を設定します- 次で指定:
- インターフェース
RedisConfiguration.WithHostAndPort
のsetHostName
- パラメーター:
hostName
- null であってはなりません。
setPort
public void setPort(int port) インターフェースからコピーされた説明:RedisConfiguration.WithHostAndPort
Redis サーバーポートを設定します。- 次で指定:
- インターフェース
RedisConfiguration.WithHostAndPort
のsetPort
getDatabase
public int getDatabase()インターフェースからコピーされた説明:RedisConfiguration.WithDatabaseIndex
使用するデータベースインデックスを取得します。- 次で指定:
- インターフェース
RedisConfiguration.WithDatabaseIndex
のgetDatabase
- 戻り値:
- デフォルトでは
zero
。
setDatabase
public void setDatabase(int index) インターフェースからコピーされた説明:RedisConfiguration.WithDatabaseIndex
使用するデータベースインデックスを設定します。- 次で指定:
- インターフェース
RedisConfiguration.WithDatabaseIndex
のsetDatabase
setUsername
インターフェースからコピーされた説明:RedisConfiguration.WithAuthentication
指定されたString
SE を使用してユーザー名を作成および設定します。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
指定されたString
SE に対してRedisPassword
を作成および設定します。- 次で指定:
- インターフェース
RedisConfiguration.WithAuthentication
のsetPassword
- パラメーター:
password
- null であってはならず、代わりにRedisPassword.none()
を使用してください。
equals
hashCode
public int hashCode()