public class PropertiesPersistingMetadataStore extends ObjectSE implements ConcurrentMetadataStore, InitializingBean, DisposableBean, CloseableSE, FlushableSE
MetadataStore
のプロパティファイルベースの実装。競合を回避するために、各インスタンスは、一意のファイル名が生成される一意のキーを使用して構築する必要があります。デフォルトでは、プロパティファイルは 'java.io.tmpdir' + "/spring-integration/metadata-store.properties"
になりますが、ディレクトリとファイル名は設定可能です。コンストラクターと説明 |
---|
PropertiesPersistingMetadataStore() |
修飾子と型 | メソッドと説明 |
---|---|
void | afterPropertiesSet() |
void | close() |
void | destroy() |
void | flush() |
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 引数と一致する場合、ストア内のキーの値をアトミックに置き換えます。 |
void | setBaseDirectory(StringSE baseDirectory) プロパティファイルの場所を設定します。 |
void | setFileName(StringSE fileName) setBaseDirectory(String) でプロパティファイルの名前を設定します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public void setBaseDirectory(StringSE baseDirectory)
'java.io.tmpdir' + "/spring-integration/"
です。baseDirectory
- ディレクトリ。public void setFileName(StringSE fileName)
setBaseDirectory(String)
でプロパティファイルの名前を設定します。デフォルトは metadata-store.properties
fileName
- プロパティファイル名。public void afterPropertiesSet()
InitializingBean
の afterPropertiesSet
public void put(StringSE key, StringSE value)
MetadataStore
MetadataStore
の put
key
- キー。value
- 値。public StringSE get(StringSE key)
MetadataStore
MetadataStore
の get
key
- キー。public StringSE remove(StringSE key)
MetadataStore
MetadataStore
の remove
key
- キー。public StringSE putIfAbsent(StringSE key, StringSE value)
ConcurrentMetadataStore
ConcurrentMetadataStore
の putIfAbsent
key
- キー。value
- 値。public boolean replace(StringSE key, StringSE oldValue, StringSE newValue)
ConcurrentMetadataStore
ConcurrentMetadataStore
の replace
key
- キー。oldValue
- 古い値。newValue
- 新しい値。public void close()
CloseableSE
の closeSE
AutoCloseableSE
の closeSE
public void flush()
FlushableSE
の flushSE
public void destroy()
DisposableBean
の destroy