ZWorkflowQueue

zio.temporal.workflow.ZWorkflowQueue
final class ZWorkflowQueue[E] extends ZQueueConsumer[E], ZQueueProducer[E]

Attributes

Graph
Supertypes
trait ZQueueProducer[E]
class ZQueueConsumer[E]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def cancellableOffer(e: E, timeout: Duration): Boolean

Inserts the specified element into this queue, waiting up to the specified wait time if necessary for space to become available.

Inserts the specified element into this queue, waiting up to the specified wait time if necessary for space to become available.

Value parameters

e

the element to add

timeout

how long to wait before giving up

Attributes

Returns

true if successful, or false if the specified waiting time elapses before space is available

Throws
ClassCastException

if the class of the specified element prevents it from being added to this queue

IllegalArgumentException

if some property of the specified element prevents it from being added to this queue

NullPointerException

if the specified element is null

io.temporal.failure.CanceledFailure

if surrounding io.temporal.workflow.CancellationScope is canceled while waiting

Definition Classes
override def cancellablePut(e: E): Unit

Inserts the specified element into this queue, waiting if necessary for space to become available.

Inserts the specified element into this queue, waiting if necessary for space to become available.

Value parameters

e

the element to add

Attributes

Throws
ClassCastException

if the class of the specified element prevents it from being added to this queue

IllegalArgumentException

if some property of the specified element prevents it from being added to this queue

NullPointerException

if the specified element is null

io.temporal.failure.CanceledFailure

if surrounding io.temporal.workflow.CancellationScope is canceled while waiting

Definition Classes
override def offer(e: E): Boolean

Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions, returning true upon success and false if no space is currently available.

Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions, returning true upon success and false if no space is currently available.

Value parameters

e

the element to add

Attributes

Returns

true if the element was added to this queue, else false

Throws
ClassCastException

if the class of the specified element prevents it from being added to this queue

IllegalArgumentException

if some property of the specified element prevents it from being added to this queue

NullPointerException

if the specified element is null

Definition Classes
override def offer(e: E, timeout: Duration): Boolean

Inserts the specified element into this queue, waiting up to the specified wait time if necessary for space to become available. It is not unblocked in case of the enclosing CancellationScope cancellation. Use cancellableOffer instead.

Inserts the specified element into this queue, waiting up to the specified wait time if necessary for space to become available. It is not unblocked in case of the enclosing CancellationScope cancellation. Use cancellableOffer instead.

Value parameters

e

the element to add

timeout

how long to wait before giving up

Attributes

Returns

true if successful, or false if the specified waiting time elapses before space is available

Throws
ClassCastException

if the class of the specified element prevents it from being added to this queue

IllegalArgumentException

if some property of the specified element prevents it from being added to this queue

NullPointerException

if the specified element is null

Definition Classes
override def put(e: E): Unit

Inserts the specified element into this queue, waiting if necessary for space to become available. It is not unblocked in case of the enclosing CancellationScope cancellation. Use cancellablePut instead.

Inserts the specified element into this queue, waiting if necessary for space to become available. It is not unblocked in case of the enclosing CancellationScope cancellation. Use cancellablePut instead.

Value parameters

e

the element to add

Attributes

Throws
ClassCastException

if the class of the specified element prevents it from being added to this queue

IllegalArgumentException

if some property of the specified element prevents it from being added to this queue

NullPointerException

if the specified element is null

Definition Classes

Inherited methods

def cancellablePoll(timeout: Duration): Option[E]

Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element to become available.

Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element to become available.

Value parameters

timeout

how long to wait before giving up

Attributes

Returns

the head of this queue wrapped in Some, or None if the specified waiting time elapses before an element is available

Throws
io.temporal.failure.CanceledFailure

if surrounding io.temporal.workflow.CancellationScope is canceled while waiting

Inherited from:
ZQueueConsumer
def cancellableTake(): E

Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.

Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.

Attributes

Returns

the head of this queue

Throws
io.temporal.failure.CanceledFailure

if surrounding io.temporal.workflow.CancellationScope is canceled while waiting

Inherited from:
ZQueueConsumer
def map[R](f: E => R): ZQueueConsumer[R]

Returns a queue consisting of the results of applying the given function to the elements of this queue.

Returns a queue consisting of the results of applying the given function to the elements of this queue.

Value parameters

f

a non-interfering, stateless function to apply to each element

Attributes

Returns

the new queue backed by this one.

Inherited from:
ZQueueConsumer
def peek(): Option[E]

Retrieves the head of this queue keeping it in the queue if it is not empty without blocking.

Retrieves the head of this queue keeping it in the queue if it is not empty without blocking.

Attributes

Returns

the head of this queue wrapped in Some, or None if the queue is empty

Inherited from:
ZQueueConsumer
def poll(timeout: Duration): Option[E]

Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element to become available. It is not unblocked in case of the enclosing CancellationScope cancellation. Use cancellablePoll instead.

Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element to become available. It is not unblocked in case of the enclosing CancellationScope cancellation. Use cancellablePoll instead.

Value parameters

timeout

how long to wait before giving up.

Attributes

Returns

the head of this queue wrapped in Some, or None if the specified waiting time elapses before an element is available

Inherited from:
ZQueueConsumer
def poll(): Option[E]

Retrieves and removes the head of this queue if it is not empty without blocking.

Retrieves and removes the head of this queue if it is not empty without blocking.

Attributes

Returns

the head of this queue wrapped in Some, or None if the queue is empty

Inherited from:
ZQueueConsumer
def take(): E

Retrieves and removes the head of this queue, waiting if necessary until an element becomes available. It is not unblocked in case of the enclosing * CancellationScope cancellation. Use cancellableTake instead.

Retrieves and removes the head of this queue, waiting if necessary until an element becomes available. It is not unblocked in case of the enclosing * CancellationScope cancellation. Use cancellableTake instead.

Attributes

Returns

the head of this queue

Inherited from:
ZQueueConsumer

Concrete fields

val toJava: WorkflowQueue[E]