Class FullDrainMpscQueue<T>
java.lang.Object
pl.allegro.tech.hermes.consumers.queue.FullDrainMpscQueue<T>
- All Implemented Interfaces:
MpscQueue<T>
-
Constructor Details
-
FullDrainMpscQueue
public FullDrainMpscQueue(int capacity)
-
-
Method Details
-
offer
-
drain
TheMpscArrayQueue.drain(MessagePassingQueue.Consumer)method may skip items with allocated slots by producers (who won CAS) but were not added to the queue yet. This may happen to broken elements chain. See explanation here.This is an alternative approach which waits for all items to become available by using
MpscArrayQueue.poll()underneath (which spin-waits when getting next item). -
size
public int size() -
capacity
public int capacity()
-