- Companion:
- object
Value members
Inherited methods
- Returns:
the number of elements that have ever been taken from the queue.
- Note:
if you know how much time the queue is alive, you can calculate the rate at which elements are being dequeued.
- Definition Classes
- RingBuffer -> MutableConcurrentQueue
- Inherited from:
- RingBuffer
- Returns:
the number of elements that have ever been added to the queue.
- Note:
that scala.Long is used here, since scala.Int will be overflowed really quickly for busy queues.
if you know how much time the queue is alive, you can calculate the rate at which elements are being enqueued.
- Definition Classes
- RingBuffer -> MutableConcurrentQueue
- Inherited from:
- RingBuffer
A non-blocking enqueue.
A non-blocking enqueue.
- Returns:
whether the enqueue was successful or not.
- Definition Classes
- RingBuffer -> MutableConcurrentQueue
- Inherited from:
- RingBuffer
A non-blocking enqueue of multiple elements.
A non-blocking enqueue of multiple elements.
- Definition Classes
- RingBuffer -> MutableConcurrentQueue
- Inherited from:
- RingBuffer
A non-blocking dequeue.
A non-blocking dequeue.
- Returns:
either an element from the queue, or the
defaultparam.- Note:
that if there's no meaningful default for your type, you can always use
poll(null). Not the best, but reasonable price to pay for lower heap churn from not using scala.Option here.- Definition Classes
- RingBuffer -> MutableConcurrentQueue
- Inherited from:
- RingBuffer
A non-blocking dequeue of multiple elements.
A non-blocking dequeue of multiple elements.
- Definition Classes
- RingBuffer -> MutableConcurrentQueue
- Inherited from:
- RingBuffer
- Returns:
the '''current''' number of elements inside the queue.
- Note:
that this method can be non-atomic and return the approximate number in a concurrent setting.
- Definition Classes
- RingBuffer -> MutableConcurrentQueue
- Inherited from:
- RingBuffer
Concrete fields
Inherited fields
The '''maximum''' number of elements that a queue can hold.
The '''maximum''' number of elements that a queue can hold.
- Note:
that unbounded queues can still implement this interface with
capacity = MAX_INT.- Inherited from:
- RingBuffer