SharedDataStream

interface SharedDataStream

Provide a streaming data from a single producer(Writer) to multiple consumer(Reader)

Types

Link copied to clipboard
interface Reader : Closeable

Provides an interface for reading data from the stream

Link copied to clipboard
interface Writer : Closeable

Provides an interface for writing data into the stream

Functions

Link copied to clipboard
abstract fun createReader(initialPosition: Long? = null): SharedDataStream.Reader

Creates a Reader to the stream.

Link copied to clipboard
abstract fun createWriter(): SharedDataStream.Writer

Creates a Writer to the stream. Should be only one Writer is allowed.

Link copied to clipboard
abstract fun getPosition(): Long

Get last written position of stream