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.