クラス MessageGroupQueue
- 実装済みのインターフェース一覧:
IterableSE<Message<?>>, CollectionSE<Message<?>>, BlockingQueueSE<Message<?>>, QueueSE<Message<?>>
public class MessageGroupQueue
extends AbstractQueueSE<Message<?>>
implements BlockingQueueSE<Message<?>>
MessageGroupStore による BlockingQueueSE。トランザクションのロールバックに直面した場合の確実な配信(ストアがトランザクションであると想定)、およびプロセスが停止した場合にメッセージが失われないようにする(ストアが永続的であると想定)ために使用できます。プロセスの再起動全体でキューを使用するには、同じグループ ID を指定する必要があるため、キューの単一の論理インスタンスで一意であるが識別可能である必要があります。- 導入:
- 2.0
- 作成者:
- Dave Syer, Oleg Zhurakousky, Gunnar Hillert, Gary Russell, Artem Bilan
コンストラクター概要
コンストラクターコンストラクター説明MessageGroupQueue(BasicMessageGroupStore messageGroupStore, ObjectSE groupId) MessageGroupQueue(BasicMessageGroupStore messageGroupStore, ObjectSE groupId, int capacity) MessageGroupQueue(BasicMessageGroupStore messageGroupStore, ObjectSE groupId, int capacity, LockSE storeLock) MessageGroupQueue(BasicMessageGroupStore messageGroupStore, ObjectSE groupId, LockSE storeLock) 方法の概要
修飾子と型メソッド説明protected boolean'storeLock' は呼び出し元によって保持されているものと想定されます。そうでない場合は、IllegalMonitorStateException がスローされる可能性があります。protected @Nullable Message<?> doPoll()'storeLock' は呼び出し元によって保持されているものと想定されます。そうでない場合は、IllegalMonitorStateException がスローされる可能性があります。intdrainTo(CollectionSE<? super Message<?>> c) intdrainTo(CollectionSE<? super Message<?>> collection, int maxElements) protected BasicMessageGroupStoreストアを取得します。protected CollectionSE<Message<?>> protected ConditionSE空ではない状態を取得します。protected ConditionSE完全ではない状態になります。protected LockSEストアロックを取得します。IteratorSE<Message<?>> iterator()booleanbooleanoffer(Message<?> message, long timeout, TimeUnitSE unit) @Nullable Message<?> peek()@Nullable Message<?> poll()@Nullable Message<?> poll(long timeout, TimeUnitSE unit) voidintvoidsetPriority(boolean priority) true の場合、メッセージストアが優先度をサポートしていることを確認します。intsize()stream()Message<?> take()クラス AbstractCollectionSE から継承されたメソッド
containsSE, containsAllSE, isEmpty, removeSE, removeAllSE, retainAllSE, toArray, toArraySE, toStringクラス ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSEインターフェース BlockingQueueSE から継承されたメソッド
addSE, containsSE, removeSEインターフェース CollectionSE から継承されたメソッド
addAllSE, clear, containsAllSE, equalsSE, hashCode, isEmpty, parallelStream, removeAllSE, removeIfSE, retainAllSE, spliterator, toArray, toArraySE, toArraySEインターフェース IterableSE から継承されたメソッド
forEachSE
コンストラクターの詳細
MessageGroupQueue
MessageGroupQueue
MessageGroupQueue
public MessageGroupQueue(BasicMessageGroupStore messageGroupStore, ObjectSE groupId, LockSE storeLock) MessageGroupQueue
public MessageGroupQueue(BasicMessageGroupStore messageGroupStore, ObjectSE groupId, int capacity, LockSE storeLock)
方法の詳細
setPriority
public void setPriority(boolean priority) true の場合、メッセージストアが優先度をサポートしていることを確認します。false の場合メッセージストアが優先度を使用して受信時にメッセージの順序を決定する場合に警告します。- パラメーター:
priority- 優先度が使用されると予想される場合は true。
iterator
- 次で指定:
- インターフェース
CollectionSE<Message<?>>内のiterator - 次で指定:
- インターフェース
IterableSE<Message<?>>内のiterator - 次で指定:
- クラス
AbstractCollectionSE<Message<?>>のiterator
getMessageGroupStore
getStoreLock
getMessageStoreNotFull
getMessageStoreNotEmpty
size
public int size()- 次で指定:
- インターフェース
CollectionSE<Message<?>>内のsize - 次で指定:
- クラス
AbstractCollectionSE<Message<?>>のsize
peek
poll
- 次で指定:
- インターフェース
BlockingQueueSE<Message<?>>内のpollSE - 例外:
InterruptedExceptionSE
poll
drainTo
- 次で指定:
- インターフェース
BlockingQueueSE<Message<?>>内のdrainToSE
drainTo
- 次で指定:
- インターフェース
BlockingQueueSE<Message<?>>内のdrainToSE
offer
offer
public boolean offer(Message<?> message, long timeout, TimeUnitSE unit) throws InterruptedExceptionSE - 次で指定:
- インターフェース
BlockingQueueSE<Message<?>>内のofferSE - 例外:
InterruptedExceptionSE
put
- 次で指定:
- インターフェース
BlockingQueueSE<Message<?>>内のputSE - 例外:
InterruptedExceptionSE
remainingCapacity
public int remainingCapacity()- 次で指定:
- インターフェース
BlockingQueueSE<Message<?>>内のremainingCapacity
take
- 次で指定:
- インターフェース
BlockingQueueSE<Message<?>>内のtake - 例外:
InterruptedExceptionSE
getMessages
stream
- 次で指定:
- インターフェース
CollectionSE<Message<?>>内のstream
doPoll
'storeLock' は呼び出し元によって保持されているものと想定されます。そうでない場合は、IllegalMonitorStateException がスローされる可能性があります。- 戻り値:
- メッセージ
doOffer
'storeLock' は呼び出し元によって保持されているものと想定されます。そうでない場合は、IllegalMonitorStateException がスローされる可能性があります。- パラメーター:
message- 提供するメッセージ。- 戻り値:
- 提供された場合は true。