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]
- Alphabetic
- By Inheritance
- ZTQueue
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
capacity: Int
The maximum capacity of the queue.
-
abstract
def
isShutdown: USTM[Boolean]
Checks whether the queue is shut down.
-
abstract
def
offer(a: A): ZSTM[RA, EA, Boolean]
Offers a value to the queue, returning whether the value was offered to the queue.
-
abstract
def
offerAll(as: Iterable[A]): ZSTM[RA, EA, Boolean]
Offers all of the specified values to the queue, returning whether they were offered to the queue.
-
abstract
def
peek: ZSTM[RB, EB, B]
Views the next element in the queue without removing it, retrying if the queue is empty.
-
abstract
def
peekOption: ZSTM[RB, EB, Option[B]]
Views the next element in the queue without removing it, returning
None
if the queue is empty. -
abstract
def
shutdown: USTM[Unit]
Shuts down the queue.
-
abstract
def
size: USTM[Int]
The current number of values in the queue.
-
abstract
def
take: ZSTM[RB, EB, B]
Takes a value from the queue.
-
abstract
def
takeAll: ZSTM[RB, EB, Chunk[B]]
Takes all the values from the queue.
-
abstract
def
takeUpTo(max: Int): ZSTM[RB, EB, Chunk[B]]
Takes up to the specified number of values from the queue.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
final
def
awaitShutdown: USTM[Unit]
Waits for the queue to be shut down.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
contramap[C](f: (C) ⇒ A): ZTQueue[RA, RB, EA, EB, C, B]
Transforms values offered to the queue using the specified function.
-
final
def
contramapSTM[RC <: RA, EC >: EA, C](f: (C) ⇒ ZSTM[RC, EC, A]): ZTQueue[RC, RB, EC, EB, C, B]
Transforms values offered to the queue using the specified transactional function.
-
final
def
dimap[C, D](f: (C) ⇒ A, g: (B) ⇒ D): ZTQueue[RA, RB, EA, EB, C, D]
Transforms values offered to and taken from the queue using the specified functions.
-
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]
Transforms messages published to and taken from the queue using the specified transactional functions.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
filterInput[A1 <: A](f: (A1) ⇒ Boolean): ZTQueue[RA, RB, EA, EB, A1, B]
Filters values offered to the queue using the specified function.
-
final
def
filterInputSTM[RA1 <: RA, EA1 >: EA, A1 <: A](f: (A1) ⇒ ZSTM[RA1, EA1, Boolean]): ZTQueue[RA1, RB, EA1, EB, A1, B]
Filters values offered to the queue using the specified transactional function.
-
final
def
filterOutput(f: (B) ⇒ Boolean): ZTQueue[RA, RB, EA, EB, A, B]
Filters values taken from the queue using the specified function.
-
final
def
filterOutputSTM[RB1 <: RB, EB1 >: EB](f: (B) ⇒ ZSTM[RB1, EB1, Boolean]): ZTQueue[RA, RB1, EA, EB1, A, B]
Filters values taken from the queue using the specified transactional function.
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isEmpty: USTM[Boolean]
Checks if the queue is empty.
-
final
def
isFull: USTM[Boolean]
Checks if the queue is at capacity.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
map[C](f: (B) ⇒ C): ZTQueue[RA, RB, EA, EB, A, C]
Transforms values taken from the queue using the specified function.
-
final
def
mapSTM[RC <: RB, EC >: EB, C](f: (B) ⇒ ZSTM[RC, EC, C]): ZTQueue[RA, RC, EA, EC, A, C]
Transforms values taken from the queue using the specified transactional function.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
poll: ZSTM[RB, EB, Option[B]]
Takes a single element from the queue, returning
None
if the queue is empty. -
final
def
seek(f: (B) ⇒ Boolean): ZSTM[RB, EB, B]
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.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
takeBetween(min: Int, max: Int): ZSTM[RB, EB, Chunk[B]]
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.
-
final
def
takeN(n: Int): ZSTM[RB, EB, Chunk[B]]
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.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()