PravegaStream

zio.pravega.PravegaStream
See thePravegaStream companion object

Pravega Stream API.

This API is a wrapper around the Pravega Java API. *

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Grouped members

Read

These methods are used to read from a stream.

def eventStream[A](readerGroupName: String, settings: ReaderSettings[A]): Stream[Throwable, EventRead[A]]

Stream (source) of events of elements.

Stream (source) of events of elements.

Attributes

def stream[A](readerGroupName: String, settings: ReaderSettings[A]): Stream[Throwable, A]

Stream (source) of elements.

Stream (source) of elements.

Attributes

Write

These methods are used to write to a stream, in atomic (transactional) or best effort mode.

def joinTransaction[A](streamName: String, settings: WriterSettings[A], txUUID: UUID, commitOnExit: Boolean): Sink[Throwable, A, Nothing, Unit]

Sink that writes to a transactional stream, transaction stays open after the sink is closed.

Sink that writes to a transactional stream, transaction stays open after the sink is closed.

The transaction id is provided by the caller.

The transaction may be committed by the writer.

Attributes

def sink[A](streamName: String, settings: WriterSettings[A]): Sink[Throwable, A, Nothing, Unit]

Sink that writes to a stream.

Sink that writes to a stream.

Attributes

def sinkAtomic[A](streamName: String, settings: WriterSettings[A]): Sink[Throwable, A, Nothing, Unit]

Sink that writes to a transactional stream.

Sink that writes to a transactional stream.

Transaction is created by the writer, and committed or aborted by the writer regarding of the status of the stream scope.

Attributes

def sinkUncommited[A](streamName: String, settings: WriterSettings[A]): Sink[Throwable, A, Nothing, UUID]

Sink that writes to a transactional stream, transaction stays open after the sink is closed.

Sink that writes to a transactional stream, transaction stays open after the sink is closed.

The transaction id is generated by the writer, once the transaction is effectively created, and materialized when the sink is closed.

The transaction is not committed or aborted by the writer, and can be used by other writers, localy or remotely.

Attributes

Returns

The transaction id.

def write[A](streamName: String, settings: WriterSettings[A], a: List[A]): ZIO[Any, Throwable, Unit]

Writes atomicaly events to a stream.

Writes atomicaly events to a stream.

Attributes

def writeFlow[A](streamName: String, settings: WriterSettings[A]): ZPipeline[Any, Throwable, A, A]

Creates a ZPipeline that writes to a stream.

Creates a ZPipeline that writes to a stream.

Attributes

def writeUncommited[A](streamName: String, settings: WriterSettings[A], as: List[A]): ZIO[Any, Throwable, UUID]

Writes events to a transactional stream, transaction is created but not committed.

Writes events to a transactional stream, transaction is created but not committed.

The transaction:

  • is aborted in case of failure
  • must be committed by the caller

Attributes

Returns

transaction id