Class/Object

zio.internal

RingBufferPow2

Related Docs: object RingBufferPow2 | package internal

Permalink

final class RingBufferPow2[A] extends RingBuffer[A]

Linear Supertypes
RingBuffer[A], Serializable, MutableQueueFieldsPadding[A], TailPadding[A], PreTailPadding[A], HeadPadding[A], ClassFieldsPadding[A], Serializable, MutableConcurrentQueue[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RingBufferPow2
  2. RingBuffer
  3. Serializable
  4. MutableQueueFieldsPadding
  5. TailPadding
  6. PreTailPadding
  7. HeadPadding
  8. ClassFieldsPadding
  9. Serializable
  10. MutableConcurrentQueue
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RingBufferPow2(requestedCapacity: Int)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. final val capacity: Int

    Permalink

    The maximum number of elements that a queue can hold.

    The maximum number of elements that a queue can hold.

    Definition Classes
    RingBufferMutableConcurrentQueue
    Note

    that unbounded queues can still implement this interface with capacity = MAX_INT.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def dequeuedCount(): Long

    Permalink

    returns

    the number of elements that have ever been taken from the queue.

    Definition Classes
    RingBufferMutableConcurrentQueue
    Note

    if you know how much time the queue is alive, you can calculate the rate at which elements are being dequeued.

  8. final def enqueuedCount(): Long

    Permalink

    returns

    the number of elements that have ever been added to the queue.

    Definition Classes
    RingBufferMutableConcurrentQueue
    Note

    if you know how much time the queue is alive, you can calculate the rate at which elements are being enqueued.

    ,

    that Long is used here, since Int will be overflowed really quickly for busy queues.

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isEmpty(): Boolean

    Permalink
    Definition Classes
    RingBufferMutableConcurrentQueue
  15. final def isFull(): Boolean

    Permalink
    Definition Classes
    RingBufferMutableConcurrentQueue
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def offer(a: A): Boolean

    Permalink

    A non-blocking enqueue.

    A non-blocking enqueue.

    returns

    whether the enqueue was successful or not.

    Definition Classes
    RingBufferMutableConcurrentQueue
  21. final def offerAll(as: Iterable[A]): Chunk[A]

    Permalink

    A non-blocking enqueue of multiple elements.

    A non-blocking enqueue of multiple elements.

    Definition Classes
    RingBufferMutableConcurrentQueue
  22. final def poll(default: A): A

    Permalink

    A non-blocking dequeue.

    A non-blocking dequeue.

    returns

    either an element from the queue, or the default param.

    Definition Classes
    RingBufferMutableConcurrentQueue
    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 Option here.

  23. final def pollUpTo(n: Int): Chunk[A]

    Permalink

    A non-blocking dequeue of multiple elements.

    A non-blocking dequeue of multiple elements.

    Definition Classes
    RingBufferMutableConcurrentQueue
  24. def posToIdx(pos: Long, capacity: Int): Int

    Permalink
    Attributes
    protected
    Definition Classes
    RingBufferPow2RingBuffer
  25. val requestedCapacity: Int

    Permalink
  26. final def size(): Int

    Permalink

    returns

    the current number of elements inside the queue.

    Definition Classes
    RingBufferMutableConcurrentQueue
    Note

    that this method can be non-atomic and return the approximate number in a concurrent setting.

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from RingBuffer[A]

Inherited from Serializable

Inherited from MutableQueueFieldsPadding[A]

Inherited from TailPadding[A]

Inherited from PreTailPadding[A]

Inherited from HeadPadding[A]

Inherited from ClassFieldsPadding[A]

Inherited from Serializable

Inherited from MutableConcurrentQueue[A]

Inherited from AnyRef

Inherited from Any

Ungrouped