クラス AbstractMessageGroupStore
java.lang.ObjectSE
org.springframework.integration.store.AbstractBatchingMessageGroupStore
org.springframework.integration.store.AbstractMessageGroupStore
- 実装済みのインターフェース一覧:
IterableSE<MessageGroup>、BasicMessageGroupStore、MessageGroupStore
- 既知の直属サブクラス
AbstractConfigurableMongoDbMessageStore、AbstractKeyValueMessageStore、JdbcMessageStore、MongoDbMessageStore、SimpleMessageStore
@ManagedResource
public abstract class AbstractMessageGroupStore
extends AbstractBatchingMessageGroupStore
implements MessageGroupStore, IterableSE<MessageGroup>
- 導入:
- 2.0
- 作成者:
- Dave Syer, Oleg Zhurakousky, Gary Russell, Artem Bilan, Christian Tzolov, Youbin Wu
ネストされたクラスの概要
インターフェース org.springframework.integration.store.MessageGroupStore から継承されたネストクラス / インターフェース
MessageGroupStore.MessageGroupCallbackフィールド概要
フィールドコンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明voidaddMessagesToGroup(ObjectSE groupId, Message<?>... messages) グループ ID に関連付けてメッセージを保存します。addMessageToGroup(ObjectSE groupId, Message<?> message) グループ ID に関連付けてメッセージを保存します。voidcompleteGroup(ObjectSE groupId) この MessageGroup を完成させます。protected MessageGroupcopy(MessageGroup group) expireMessageGroups で使用されます。protected abstract voiddoAddMessagesToGroup(ObjectSE groupId, Message<?>... messages) protected abstract voiddoCompleteGroup(ObjectSE groupId) protected abstract @Nullable Message<?> doPollMessageFromGroup(ObjectSE groupId) protected booleandoRemoveMessageFromGroupById(ObjectSE groupId, UUIDSE messageId) protected abstract voiddoRemoveMessageGroup(ObjectSE groupId) protected abstract voiddoRemoveMessagesFromGroup(ObjectSE key, CollectionSE<Message<?>> messages) protected abstract voiddoSetGroupCondition(ObjectSE groupId, StringSE condition) protected abstract voiddoSetLastReleasedSequenceNumberForGroup(ObjectSE groupId, int sequenceNumber) protected <T, E extends RuntimeExceptionSE>
TexecuteLocked(ObjectSE groupId, CheckedCallable<T, E> runnable) protected <E extends RuntimeExceptionSE>
voidexecuteLocked(ObjectSE groupId, CheckedRunnable<E> runnable) intexpireMessageGroups(long timeout) 期限切れのグループ(タイムスタンプが現在の時刻から指定されたしきい値を差し引いたものより古い)をすべて抽出し、登録されている各コールバックを順番に呼び出します。protected LockRegistry<?> intすべてのグループにわたるストア内のメッセージの数を示すオプションの属性。intメッセージグループの数を示すオプションの属性。protected MessageGroupFactoryboolean@Nullable Message<?> pollMessageFromGroup(ObjectSE groupId) このMessageGroupからのメッセージのポーリング(実装でサポートされている場合は FIFO スタイル)と同時に、ポーリングされたMessageも削除します。voidメッセージグループがMessageGroupStore.expireMessageGroups(long)を介して期限切れになったときのコールバックを登録します。booleanremoveMessageFromGroupById(ObjectSE groupId, UUIDSE messageId) グループからメッセージを削除します。voidremoveMessageGroup(ObjectSE groupId) この ID のメッセージグループを削除します。voidremoveMessagesFromGroup(ObjectSE key, CollectionSE<Message<?>> messages) グループからのメッセージの削除を永続化します。voidremoveMessagesFromGroup(ObjectSE key, Message<?>... messages) グループからのメッセージの削除を永続化します。voidsetExpiryCallbacks(CollectionSE<MessageGroupStore.MessageGroupCallback> expiryCallbacks) メッセージストアでの有効期限コールバックの便利なインジェクションポイント。voidsetGroupCondition(ObjectSE groupId, StringSE condition) グループに条件文を追加します。voidsetLastReleasedSequenceNumberForGroup(ObjectSE groupId, int sequenceNumber) 最後にリリースされたメッセージのシーケンス番号を設定できます。voidsetLazyLoadMessageGroups(boolean lazyLoadMessageGroups) BasicMessageGroupStore.getMessageGroup(Object)の結果をPersistentMessageGroupにラップするかどうかを指定します。グループのメッセージの遅延ロードプロキシデフォルトはtrueです。final voidsetLockRegistry(LockRegistry<?> lockRegistry) アトミック操作を確実にするためにLockRegistryの型を指定しますvoidsetTimeoutOnIdle(boolean timeoutOnIdle) タイムアウト計算のルールを上書きできます。クラス org.springframework.integration.store.AbstractBatchingMessageGroupStore から継承されたメソッド
getRemoveBatchSize, setMessageGroupFactory, setRemoveBatchSizeクラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース org.springframework.integration.store.BasicMessageGroupStore から継承されたメソッド
getMessageGroup, messageGroupSizeインターフェース java.lang.IterableSE から継承されたメソッド
forEachSE, iterator, spliteratorインターフェース org.springframework.integration.store.MessageGroupStore から継承されたメソッド
getGroupMetadata, getMessageFromGroup, getMessagesForGroup, getOneMessageFromGroup, iterator, streamMessagesForGroup
フィールドの詳細
INTERRUPTED_WHILE_OBTAINING_LOCK
- 関連事項:
logger
protected final org.apache.commons.logging.Log logger
コンストラクターの詳細
AbstractMessageGroupStore
protected AbstractMessageGroupStore()AbstractMessageGroupStore
protected AbstractMessageGroupStore(boolean lazyLoadMessageGroups)
メソッドの詳細
getMessageGroupFactory
- オーバーライド:
- クラス
AbstractBatchingMessageGroupStoreのgetMessageGroupFactory
setExpiryCallbacks
public void setExpiryCallbacks(CollectionSE<MessageGroupStore.MessageGroupCallback> expiryCallbacks) メッセージストアでの有効期限コールバックの便利なインジェクションポイント。提供される各コールバックは、registerMessageGroupExpiryCallback(MessageGroupCallback)を使用してストアに登録されるだけです。- パラメーター:
expiryCallbacks- 追加する有効期限コールバック
isTimeoutOnIdle
public boolean isTimeoutOnIdle()setTimeoutOnIdle
public void setTimeoutOnIdle(boolean timeoutOnIdle) タイムアウト計算のルールを上書きできます。通常のタイムアウトは、MessageGroupが作成された時間に基づいています。MessageGroupがアイドリングしていた時間に基づいてタイムアウトを設定する場合(たとえば、最後の更新から非アクティブ)、"true" を指定してこのメソッドを呼び出します。デフォルトは "false" です。- パラメーター:
timeoutOnIdle- ブール値。
setLazyLoadMessageGroups
public void setLazyLoadMessageGroups(boolean lazyLoadMessageGroups) BasicMessageGroupStore.getMessageGroup(Object)の結果をPersistentMessageGroupにラップするかどうかを指定します。グループのメッセージの遅延ロードプロキシデフォルトはtrueです。ターゲットロジックは
SimpleMessageGroupFactory.GroupType.PERSISTENTに基づいています。- パラメーター:
lazyLoadMessageGroups- 使用するbooleanフラグ。- 導入:
- 4.3
setLockRegistry
アトミック操作を確実にするためにLockRegistryの型を指定します- パラメーター:
lockRegistry- lockRegistryType- 導入:
- 6.5
getLockRegistry
registerMessageGroupExpiryCallback
インターフェースからコピーされた説明:MessageGroupStoreメッセージグループがMessageGroupStore.expireMessageGroups(long)を介して期限切れになったときのコールバックを登録します。- 次で指定:
- インターフェース
MessageGroupStoreのregisterMessageGroupExpiryCallback - パラメーター:
callback- メッセージグループがクリーンアップされたときに実行するコールバック。
expireMessageGroups
インターフェースからコピーされた説明:MessageGroupStore期限切れのグループ(タイムスタンプが現在の時刻から指定されたしきい値を差し引いたものより古い)をすべて抽出し、登録されている各コールバックを順番に呼び出します。例: タイムアウト 100 で呼び出して、100 ミリ秒以上前に作成され、まだ完了していないすべてのグループを期限切れにします。すべてのメッセージグループを期限切れにするには、タイムアウト 0(または安全のために負の値)を使用します。- 次で指定:
- インターフェース
MessageGroupStoreのexpireMessageGroups - パラメーター:
timeout- 使用するタイムアウトしきい値- 戻り値:
- 期限切れのメッセージグループの数
- 関連事項:
copy
expireMessageGroups によって使用されます。グループが現在から期限切れになるまでの間に変更されたかどうかを適切に検出できるように、リーパーの実行時にグループのスナップショットを返す必要があります。永続ストアには必要ないため、デフォルトの動作ではグループのみを返します。- パラメーター:
group- グループ。- 戻り値:
- グループ、またはコピー。
- 導入:
- 4.0.1
getMessageCountForAllMessageGroups
インターフェースからコピーされた説明:MessageGroupStoreすべてのグループにわたるストア内のメッセージの数を示すオプションの属性。実装は、例外をスローすることによって応答を拒否する場合があります。- 次で指定:
- インターフェース
MessageGroupStoreのgetMessageCountForAllMessageGroups - 戻り値:
- メッセージの数
getMessageGroupCount
インターフェースからコピーされた説明:MessageGroupStoreメッセージグループの数を示すオプションの属性。実装は、例外をスローすることによって応答を拒否する場合があります。- 次で指定:
- インターフェース
MessageGroupStoreのgetMessageGroupCount - 戻り値:
- メッセージグループの数
removeMessagesFromGroup
インターフェースからコピーされた説明:MessageGroupStoreグループからのメッセージの削除を永続化します。- 次で指定:
- インターフェース
MessageGroupStoreのremoveMessagesFromGroup - パラメーター:
key- メッセージを含むグループの groupId。messages- 削除するメッセージ。
removeMessagesFromGroup
インターフェースからコピーされた説明:MessageGroupStoreグループからのメッセージの削除を永続化します。- 次で指定:
- インターフェース
MessageGroupStoreのremoveMessagesFromGroup - パラメーター:
key- メッセージを含むグループの groupId。messages- 削除するメッセージ。
doRemoveMessagesFromGroup
addMessagesToGroup
インターフェースからコピーされた説明:MessageGroupStoreグループ ID に関連付けてメッセージを保存します。これは、メッセージをグループ化するために使用できます。- 次で指定:
- インターフェース
MessageGroupStoreのaddMessagesToGroup - パラメーター:
groupId- メッセージを保存するグループ ID。messages- 追加するメッセージ。
doAddMessagesToGroup
addMessageToGroup
インターフェースからコピーされた説明:BasicMessageGroupStoreグループ ID に関連付けてメッセージを保存します。これは、メッセージをグループ化するために使用できます。- 次で指定:
- インターフェース
BasicMessageGroupStoreのaddMessageToGroup - パラメーター:
groupId- メッセージを保存するグループ ID。message- メッセージ。- 戻り値:
- メッセージグループ。
removeMessageGroup
インターフェースからコピーされた説明:BasicMessageGroupStoreこの ID のメッセージグループを削除します。- 次で指定:
- インターフェース
BasicMessageGroupStoreのremoveMessageGroup - パラメーター:
groupId- 削除するグループの ID。
doRemoveMessageGroup
removeMessageFromGroupById
インターフェースからコピーされた説明:MessageGroupStoreグループからメッセージを削除します。- 次で指定:
- インターフェース
MessageGroupStoreのremoveMessageFromGroupById - パラメーター:
groupId- メッセージを含むグループの groupId。messageId- 削除するメッセージ ID。- 戻り値:
- メッセージが削除された場合は true。
doRemoveMessageFromGroupById
setLastReleasedSequenceNumberForGroup
インターフェースからコピーされた説明:MessageGroupStore最後にリリースされたメッセージのシーケンス番号を設定できます。ユースケースの並べ替えに使用- 次で指定:
- インターフェース
MessageGroupStoreのsetLastReleasedSequenceNumberForGroup - パラメーター:
groupId- グループ識別子。sequenceNumber- シーケンス番号。
doSetLastReleasedSequenceNumberForGroup
protected abstract void doSetLastReleasedSequenceNumberForGroup(ObjectSE groupId, int sequenceNumber) completeGroup
インターフェースからコピーされた説明:MessageGroupStoreこれで MessageGroup が完成します。MessageGroup の補完は一般に、このグループに対してそれ以上の変異操作の実行を許可すべきではないことを意味します。たとえば、グループから新しいメッセージを追加 / 削除する試みは許可されるべきではありません。- 次で指定:
- インターフェース
MessageGroupStoreのcompleteGroup - パラメーター:
groupId- グループ識別子。
doCompleteGroup
setGroupCondition
インターフェースからコピーされた説明:MessageGroupStoreグループに条件文を追加します。後でグループの意思決定に使用できます。相関ハンドラーのリリース戦略では、グループ内のすべてのメッセージを繰り返す代わりに、この条件を調べることができます。- 次で指定:
- インターフェース
MessageGroupStoreのsetGroupCondition - パラメーター:
groupId- グループ識別子。condition- グループに保存する条件。
doSetGroupCondition
pollMessageFromGroup
インターフェースからコピーされた説明:BasicMessageGroupStoreこのMessageGroupからのメッセージのポーリング(実装でサポートされている場合は FIFO スタイル)と同時に、ポーリングされたMessageも削除します。- 次で指定:
- インターフェース
BasicMessageGroupStoreのpollMessageFromGroup - パラメーター:
groupId- グループ識別子。- 戻り値:
- メッセージ。
doPollMessageFromGroup
executeLocked
protected <T, E extends RuntimeExceptionSE> T executeLocked(ObjectSE groupId, CheckedCallable<T, E> runnable) executeLocked
protected <E extends RuntimeExceptionSE> void executeLocked(ObjectSE groupId, CheckedRunnable<E> runnable)