Trait/Object

zio.stm

ZTQueue

Related Docs: object ZTQueue | package stm

Permalink

trait ZTQueue[-RA, -RB, +EA, +EB, -A, +B] extends Serializable

A ZTQueue[RA, RB, EA, EB, A, B] is a transactional queue. Offerors can offer values of type A to the queue and takers can take values of type B from the queue. Offering values can require an environment of type RA and fail with an error of type EA. Taking values can require an environment of type RB and fail with an error of type EB.

Self Type
ZTQueue[RA, RB, EA, EB, A, B]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZTQueue
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def capacity: Int

    Permalink

    The maximum capacity of the queue.

  2. abstract def isShutdown: USTM[Boolean]

    Permalink

    Checks whether the queue is shut down.

  3. abstract def offer(a: A): ZSTM[RA, EA, Boolean]

    Permalink

    Offers a value to the queue, returning whether the value was offered to the queue.

  4. abstract def offerAll(as: Iterable[A]): ZSTM[RA, EA, Boolean]

    Permalink

    Offers all of the specified values to the queue, returning whether they were offered to the queue.

  5. abstract def peek: ZSTM[RB, EB, B]

    Permalink

    Views the next element in the queue without removing it, retrying if the queue is empty.

  6. abstract def peekOption: ZSTM[RB, EB, Option[B]]

    Permalink

    Views the next element in the queue without removing it, returning None if the queue is empty.

  7. abstract def shutdown: USTM[Unit]

    Permalink

    Shuts down the queue.

  8. abstract def size: USTM[Int]

    Permalink

    The current number of values in the queue.

  9. abstract def take: ZSTM[RB, EB, B]

    Permalink

    Takes a value from the queue.

  10. abstract def takeAll: ZSTM[RB, EB, Chunk[B]]

    Permalink

    Takes all the values from the queue.

  11. abstract def takeUpTo(max: Int): ZSTM[RB, EB, Chunk[B]]

    Permalink

    Takes up to the specified number of values from the queue.

Concrete 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 def awaitShutdown: USTM[Unit]

    Permalink

    Waits for the queue to be shut down.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def contramap[C](f: (C) ⇒ A): ZTQueue[RA, RB, EA, EB, C, B]

    Permalink

    Transforms values offered to the queue using the specified function.

  8. final def contramapSTM[RC <: RA, EC >: EA, C](f: (C) ⇒ ZSTM[RC, EC, A]): ZTQueue[RC, RB, EC, EB, C, B]

    Permalink

    Transforms values offered to the queue using the specified transactional function.

  9. final def dimap[C, D](f: (C) ⇒ A, g: (B) ⇒ D): ZTQueue[RA, RB, EA, EB, C, D]

    Permalink

    Transforms values offered to and taken from the queue using the specified functions.

  10. final def dimapSTM[RC <: RA, RD <: RB, EC >: EA, ED >: EB, C, D](f: (C) ⇒ ZSTM[RC, EC, A], g: (B) ⇒ ZSTM[RD, ED, D]): ZTQueue[RC, RD, EC, ED, C, D]

    Permalink

    Transforms messages published to and taken from the queue using the specified transactional functions.

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def filterInput[A1 <: A](f: (A1) ⇒ Boolean): ZTQueue[RA, RB, EA, EB, A1, B]

    Permalink

    Filters values offered to the queue using the specified function.

  14. final def filterInputSTM[RA1 <: RA, EA1 >: EA, A1 <: A](f: (A1) ⇒ ZSTM[RA1, EA1, Boolean]): ZTQueue[RA1, RB, EA1, EB, A1, B]

    Permalink

    Filters values offered to the queue using the specified transactional function.

  15. final def filterOutput(f: (B) ⇒ Boolean): ZTQueue[RA, RB, EA, EB, A, B]

    Permalink

    Filters values taken from the queue using the specified function.

  16. final def filterOutputSTM[RB1 <: RB, EB1 >: EB](f: (B) ⇒ ZSTM[RB1, EB1, Boolean]): ZTQueue[RA, RB1, EA, EB1, A, B]

    Permalink

    Filters values taken from the queue using the specified transactional function.

  17. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def isEmpty: USTM[Boolean]

    Permalink

    Checks if the queue is empty.

  21. final def isFull: USTM[Boolean]

    Permalink

    Checks if the queue is at capacity.

  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. final def map[C](f: (B) ⇒ C): ZTQueue[RA, RB, EA, EB, A, C]

    Permalink

    Transforms values taken from the queue using the specified function.

  24. final def mapSTM[RC <: RB, EC >: EB, C](f: (B) ⇒ ZSTM[RC, EC, C]): ZTQueue[RA, RC, EA, EC, A, C]

    Permalink

    Transforms values taken from the queue using the specified transactional function.

  25. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  28. final def poll: ZSTM[RB, EB, Option[B]]

    Permalink

    Takes a single element from the queue, returning None if the queue is empty.

  29. final def seek(f: (B) ⇒ Boolean): ZSTM[RB, EB, B]

    Permalink

    Drops elements from the queue while they do not satisfy the predicate, taking and returning the first element that does satisfy the predicate.

    Drops elements from the queue while they do not satisfy the predicate, taking and returning the first element that does satisfy the predicate. Retries if no elements satisfy the predicate.

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

    Permalink
    Definition Classes
    AnyRef
  31. final def takeBetween(min: Int, max: Int): ZSTM[RB, EB, Chunk[B]]

    Permalink

    Takes a number of elements from the queue between the specified minimum and maximum.

    Takes a number of elements from the queue between the specified minimum and maximum. If there are fewer than the minimum number of elements available, retries until at least the minimum number of elements have been collected.

  32. final def takeN(n: Int): ZSTM[RB, EB, Chunk[B]]

    Permalink

    Takes the specified number of elements from the queue.

    Takes the specified number of elements from the queue. If there are fewer than the specified number of elements available, it retries until they become available.

  33. def toString(): String

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

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

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

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

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped