public class MessageGroupQueue extends AbstractQueueSE<Message<?>> implements BlockingQueueSE<Message<?>>
MessageGroupStore による BlockingQueueSE。トランザクションのロールバックに直面した場合の確実な配信(ストアがトランザクションであると想定)、およびプロセスが停止した場合にメッセージが失われないようにする(ストアが永続的であると想定)ために使用できます。プロセスの再起動全体でキューを使用するには、同じグループ ID を指定する必要があるため、キューの単一の論理インスタンスで一意であるが識別可能である必要があります。| コンストラクターと説明 |
|---|
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 | doOffer(Message<?> message)'storeLock' は呼び出し側によって保持されているものと想定されます。そうでない場合は、IllegalMonitorStateException がスローされる可能性があります。 |
protected Message<?> | doPoll()'storeLock' は呼び出し側によって保持されているものと想定されます。そうでない場合は、IllegalMonitorStateException がスローされる可能性があります。 |
int | drainTo(CollectionSE<? super Message<?>> c) |
int | drainTo(CollectionSE<? super Message<?>> collection, int maxElements) |
protected BasicMessageGroupStore | getMessageGroupStore() ストアを取得します。 |
protected CollectionSE<Message<?>> | getMessages() |
protected ConditionSE | getMessageStoreNotEmpty() 空ではない状態を取得します。 |
protected ConditionSE | getMessageStoreNotFull() 完全ではない状態になります。 |
protected LockSE | getStoreLock() ストアロックを取得します。 |
IteratorSE<Message<?>> | iterator() |
boolean | offer(Message<?> message) |
boolean | offer(Message<?> message, long timeout, TimeUnitSE unit) |
Message<?> | peek() |
Message<?> | poll() |
Message<?> | poll(long timeout, TimeUnitSE unit) |
void | put(Message<?> message) |
int | remainingCapacity() |
void | setPriority(boolean priority)true の場合、メッセージストアが優先度をサポートしていることを確認します。 |
int | size() |
Message<?> | take() |
containsSE, containsAllSE, isEmptySE, removeSE, removeAllSE, retainAllSE, toArraySE, toArraySE, toStringSEcloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSEaddSE, containsSE, removeSEaddAllSE, clearSE, containsAllSE, equalsSE, hashCodeSE, isEmptySE, parallelStreamSE, removeAllSE, removeIfSE, retainAllSE, spliteratorSE, streamSE, toArraySE, toArraySEforEachSEpublic MessageGroupQueue(BasicMessageGroupStore messageGroupStore, ObjectSE groupId)
public MessageGroupQueue(BasicMessageGroupStore messageGroupStore, ObjectSE groupId, int capacity)
public MessageGroupQueue(BasicMessageGroupStore messageGroupStore, ObjectSE groupId, LockSE storeLock)
public MessageGroupQueue(BasicMessageGroupStore messageGroupStore, ObjectSE groupId, int capacity, LockSE storeLock)
public void setPriority(boolean priority)
priority - 優先度が使用されると予想される場合は true。public IteratorSE<Message<?>> iterator()
IterableSE<Message<?>> の iteratorSE CollectionSE<Message<?>> の iteratorSE AbstractCollectionSE<Message<?>> の iteratorSE protected BasicMessageGroupStore getMessageGroupStore()
protected LockSE getStoreLock()
protected ConditionSE getMessageStoreNotFull()
protected ConditionSE getMessageStoreNotEmpty()
public int size()
CollectionSE<Message<?>> の sizeSE AbstractCollectionSE<Message<?>> の sizeSE public Message<?> poll(long timeout, TimeUnitSE unit) throws InterruptedExceptionSE
BlockingQueueSE<Message<?>> の pollSE InterruptedExceptionSEpublic int drainTo(CollectionSE<? super Message<?>> c)
BlockingQueueSE<Message<?>> の drainToSE public int drainTo(CollectionSE<? super Message<?>> collection, int maxElements)
BlockingQueueSE<Message<?>> の drainToSE public boolean offer(Message<?> message)
public boolean offer(Message<?> message, long timeout, TimeUnitSE unit) throws InterruptedExceptionSE
BlockingQueueSE<Message<?>> の offerSE InterruptedExceptionSEpublic void put(Message<?> message) throws InterruptedExceptionSE
BlockingQueueSE<Message<?>> の putSE InterruptedExceptionSEpublic int remainingCapacity()
BlockingQueueSE<Message<?>> の remainingCapacitySE public Message<?> take() throws InterruptedExceptionSE
BlockingQueueSE<Message<?>> の takeSE InterruptedExceptionSEprotected CollectionSE<Message<?>> getMessages()
protected Message<?> doPoll()
protected boolean doOffer(Message<?> message)
message - 提供するメッセージ。