ZQueueConsumer

zio.temporal.workflow.ZQueueConsumer
class ZQueueConsumer[E]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ZWorkflowQueue[E]

Members list

Value members

Concrete 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

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

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.

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

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

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

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