Package org.apache.pulsar.client.impl
Class ProducerImpl.OpSendMsgQueue
java.lang.Object
org.apache.pulsar.client.impl.ProducerImpl.OpSendMsgQueue
- All Implemented Interfaces:
Iterable<ProducerImpl.OpSendMsg>
- Enclosing class:
- ProducerImpl<T>
protected static class ProducerImpl.OpSendMsgQueue
extends Object
implements Iterable<ProducerImpl.OpSendMsg>
Queue implementation that is used as the pending messages queue.
This implementation postpones adding of new OpSendMsg entries that happen
while the forEach call is in progress. This is needed for preventing
ConcurrentModificationExceptions that would occur when the forEach action
calls the add method via a callback in user code.
This queue is not thread safe.
-
Constructor Details
-
OpSendMsgQueue
protected OpSendMsgQueue()
-
-
Method Details
-
forEach
- Specified by:
forEachin interfaceIterable<ProducerImpl.OpSendMsg>
-
add
-
clear
public void clear() -
remove
public void remove() -
peek
-
messagesCount
public int messagesCount() -
iterator
- Specified by:
iteratorin interfaceIterable<ProducerImpl.OpSendMsg>
-