public class RedisMetadataStore extends ObjectSE implements ConcurrentMetadataStore
ConcurrentMetadataStore の Redis 実装。この ConcurrentMetadataStore を使用して、アプリケーションの再起動後もメタデータの永続性を実現します。 この実装は、RedisProperties とその replace(String, String, String) に基づいています。WATCH コマンドはサポートされていないため、現在 Redis クラスターでは使用できません。
| コンストラクターと説明 |
|---|
RedisMetadataStore(RedisConnectionFactory connectionFactory) |
RedisMetadataStore(RedisConnectionFactory connectionFactory, StringSE key) 提供された RedisConnectionFactory とキーによって RedisProperties を初期化します。 |
RedisMetadataStore(RedisOperations<StringSE,?> operations) |
RedisMetadataStore(RedisOperations<StringSE,?> operations, StringSE key) 提供された RedisConnectionFactory とキーによって RedisProperties を初期化します。 |
RedisMetadataStore(RedisProperties properties) この ConcurrentMetadataStore の RedisProperties バックエンドを指定します。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
StringSE | get(StringSE key) 指定されたキーの永続化された値を取得します。 |
void | put(StringSE key, StringSE value) 提供されたキーと値を Redis に永続化します。 |
StringSE | putIfAbsent(StringSE key, StringSE value) キーをストアに原子的に挿入します。 |
StringSE | remove(StringSE key) この MetadataStore から指定されたキーの値を削除します。 |
boolean | replace(StringSE key, StringSE oldValue, StringSE newValue) 古い値が oldValue 引数と一致する場合、ストア内のキーの値をアトミックに置き換えます。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic RedisMetadataStore(RedisProperties properties)
ConcurrentMetadataStore の RedisProperties バックエンドを指定します。properties - プロパティ。public RedisMetadataStore(RedisConnectionFactory connectionFactory)
connectionFactory - 接続ファクトリ。public RedisMetadataStore(RedisConnectionFactory connectionFactory, StringSE key)
RedisConnectionFactory とキーによって RedisProperties を初期化します。connectionFactory - 接続ファクトリ。key - キー。public RedisMetadataStore(RedisOperations<StringSE,?> operations)
operations - Redis 操作オブジェクト。public RedisMetadataStore(RedisOperations<StringSE,?> operations, StringSE key)
RedisConnectionFactory とキーによって RedisProperties を初期化します。operations - Redis 操作オブジェクト。key - キー。public void put(StringSE key, StringSE value)
MetadataStore の put key - null であってはなりません value - null であってはなりません public StringSE get(StringSE key)
MetadataStore の get key - null であってはなりません public StringSE remove(StringSE key)
MetadataStoreMetadataStore の remove key - キー。public StringSE putIfAbsent(StringSE key, StringSE value)
ConcurrentMetadataStoreConcurrentMetadataStore の putIfAbsent key - キー。value - 値。public boolean replace(StringSE key, StringSE oldValue, StringSE newValue)
ConcurrentMetadataStoreConcurrentMetadataStore の replace key - キー。oldValue - 古い値。newValue - 新しい値。