public class SimpleMetadataStore extends ObjectSE implements ConcurrentMetadataStore
ConcurrentMapSE を使用する MetadataStore の単純な実装。提供された ConcurrentMapSE がメモリ内インスタンスである場合、メタデータはアプリケーションの再起動後も保持されない場合があります。| コンストラクターと説明 |
|---|
SimpleMetadataStore() インメモリ ConcurrentHashMapSE を使用して SimpleMetadataStore をインスタンス化します。 |
SimpleMetadataStore(ConcurrentMapSE<StringSE, StringSE> metadata) 提供されている ConcurrentMapSE を使用して SimpleMetadataStore をインスタンス化します。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
StringSE | get(StringSE key) この MetadataStore から指定されたキーの値を読み取ります。 |
void | put(StringSE key, StringSE value) キーと値のペアをこの MetadataStore に書き込みます。 |
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 SimpleMetadataStore()
ConcurrentHashMapSE を使用して SimpleMetadataStore をインスタンス化します。public SimpleMetadataStore(ConcurrentMapSE<StringSE,StringSE> metadata)
ConcurrentMapSE を使用して SimpleMetadataStore をインスタンス化します。実装は、Redis や Hazelcast などのプロジェクトによって提供される分散マップの場合があります。metadata - メタデータの ConcurrentMapSE インスタンス。public void put(StringSE key, StringSE value)
MetadataStoreMetadataStore の put key - キー。value - 値。public StringSE get(StringSE key)
MetadataStoreMetadataStore の get key - キー。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 - 新しい値。