BaseChannel

gopher.impl.BaseChannel
abstract class BaseChannel[F[_], A](val gopherApi: JSGopher[F]) extends Channel[F, A, A]

Attributes

Source
BaseChannel.scala
Graph
Supertypes
trait Channel[F, A, A]
trait Closeable
trait AutoCloseable
trait ReadChannel[F, A]
trait WriteChannel[F, A]
class Object
trait Matchable
class Any
Show all
Known subtypes
class BufferedChannel[F, A]
class PromiseChannel[F, A]
class UnbufferedChannel[F, A]

Members list

Type members

Inherited classlikes

class DoneReadChannel extends ReadChannel[F, Unit]

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
Supertypes
trait ReadChannel[F, Unit]
class Object
trait Matchable
class Any
class SimpleReader(f: Try[A] => Unit) extends Reader[A]

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
Supertypes
trait Reader[A]
trait Expirable[Try[A] => Unit]
class Object
trait Matchable
class Any

Inherited types

type done = Unit

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
type read = A

Special type which is used in select statement.

Special type which is used in select statement.

Attributes

See also

[gopher.Select]

Inherited from:
ReadChannel
Source
ReadChannel.scala
type write = A

Attributes

Inherited from:
WriteChannel
Source
WriteChannel.scala

Value members

Abstract methods

protected def isEmpty: Boolean

Attributes

Source
BaseChannel.scala
protected def process(): Unit

Attributes

Source
BaseChannel.scala

Concrete methods

def addDoneReader(reader: Reader[Unit]): Unit

Attributes

Source
BaseChannel.scala
def addReader(reader: Reader[A]): Unit

Attributes

Source
BaseChannel.scala
def addWriter(writer: Writer[A]): Unit

Attributes

Source
BaseChannel.scala
override def close(): Unit

Attributes

Definition Classes
Closeable -> AutoCloseable
Source
BaseChannel.scala
protected def exhauseQueue[T <: Expirable[A], A](queue: Queue[T], action: A => Unit): Unit

Attributes

Source
BaseChannel.scala
override def isClosed: Boolean

Attributes

Definition Classes
Source
BaseChannel.scala
protected def processClose(): Unit

Attributes

Source
BaseChannel.scala
protected def processCloseDone(): Unit

Attributes

Source
BaseChannel.scala
protected def processCloseReaders(): Unit

Attributes

Source
BaseChannel.scala
protected def processCloseWriters(): Unit

Attributes

Source
BaseChannel.scala
protected def submitTask(f: () => Unit): Unit

Attributes

Source
BaseChannel.scala

Inherited methods

transparent inline def !(inline a: A)(using CpsMonadContext[F]): Unit

Attributes

Inherited from:
WriteChannel
Source
WriteChannel.scala
transparent inline def <~(inline a: A)(using CpsMonadContext[F]): Unit

Attributes

Inherited from:
WriteChannel
Source
WriteChannel.scala
transparent inline def ?(using mc: CpsMonadContext[F]): A

Synonim for read.

Synonim for read.

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def aOptRead(): F[Option[A]]

read value and return future with

read value and return future with

  • Some(value) if value is available to read
  • None if stream is closed.

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def afold[S](s0: S)(f: (S, A) => S): F[S]

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def afold_async[S](s0: S)(f: (S, A) => F[S]): F[S]

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def aforeach(f: A => Unit): F[Unit]

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def aforeach_async(f: A => F[Unit]): F[F[Unit]]

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def append(other: ReadChannel[F, A]): ReadChannel[F, A]

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def aread(): F[A]

async version of read. Immediatly return future, which will contains result of read or failur with StreamClosedException in case of stream is closed.

async version of read. Immediatly return future, which will contains result of read or failur with StreamClosedException in case of stream is closed.

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def asyncMonad: CpsSchedulingMonad[F]

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def atake(n: Int): F[IndexedSeq[A]]

return F which contains sequence from first n elements.

return F which contains sequence from first n elements.

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def awrite(a: A): F[Unit]

Attributes

Inherited from:
WriteChannel
Source
WriteChannel.scala
def awriteAll(collection: IterableOnce[A]): F[Unit]

Attributes

Inherited from:
WriteChannel
Source
WriteChannel.scala
def dup(bufSize: Int, expiration: Duration): (ReadChannel[F, A], ReadChannel[F, A])

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
override def filter(p: A => Boolean): Channel[F, W, R]

Attributes

Definition Classes
Inherited from:
Channel
Source
Channel.scala
override def filterAsync(p: A => F[Boolean]): Channel[F, W, R]

Attributes

Definition Classes
Inherited from:
Channel
Source
Channel.scala
def flatMap[R1](f: A => ReadChannel[F, R1]): Channel[F, W, R1]

Attributes

Inherited from:
Channel
Source
Channel.scala
transparent inline def fold[S](inline s0: S)(inline f: (S, A) => S)(using mc: CpsMonadContext[F]): S

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def fold_async[S](s0: S)(f: (S, A) => F[S]): F[S]

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
transparent inline def foreach(inline f: A => Unit)(using CpsMonadContext[F]): Unit

run code each time when new object is arriced. until end of stream is not reached

run code each time when new object is arriced. until end of stream is not reached

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def foreach_async(f: A => F[Unit]): F[Unit]

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
override def map[R1](f: A => R1): Channel[F, W, R1]

Attributes

Definition Classes
Inherited from:
Channel
Source
Channel.scala
override def mapAsync[R1](f: A => F[R1]): Channel[F, W, R1]

Attributes

Definition Classes
Inherited from:
Channel
Source
Channel.scala
transparent inline def optRead()(using CpsMonadContext[F]): Option[A]

read value and return

read value and return

  • Some(value) if value is available to read
  • None if stream is closed.

should be called inside async block.

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def or(other: ReadChannel[F, A]): ReadChannel[F, A]

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
transparent inline def read[G[_]]()(using mc: CpsMonadContext[G], fg: CpsMonadConversion[F, G]): A

blocked read: if currently not element available - wait for one. Can be used only inside async block. If stream is closed and no values to read left in the stream - throws StreamClosedException

blocked read: if currently not element available - wait for one. Can be used only inside async block. If stream is closed and no values to read left in the stream - throws StreamClosedException

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
transparent inline def take(n: Int)(using CpsMonadContext[F]): IndexedSeq[A]

take first n elements. should be called inside async block.

take first n elements. should be called inside async block.

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def withExpiration(ttl: FiniteDuration, throwTimeouts: Boolean): ChannelWithExpiration[F, W, R]

Attributes

Inherited from:
Channel
Source
Channel.scala
def withWriteExpiration(ttl: FiniteDuration, throwTimeouts: Boolean)(using gopherApi: Gopher[F]): WriteChannelWithExpiration[F, A]

Attributes

Inherited from:
WriteChannel
Source
WriteChannel.scala
transparent inline def write(inline a: A)(using CpsMonadContext[F]): Unit

Attributes

Inherited from:
WriteChannel
Source
WriteChannel.scala
transparent inline def writeAll(inline collection: IterableOnce[A])(using mc: CpsMonadContext[F]): Unit

Attributes

Inherited from:
WriteChannel
Source
WriteChannel.scala
def zip[B](x: ReadChannel[F, B]): ReadChannel[F, (A, B)]

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala
def |(other: ReadChannel[F, A]): ReadChannel[F, A]

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala

Concrete fields

protected var closed: Boolean

Attributes

Source
BaseChannel.scala
protected val doneReaders: Queue[Reader[Unit]]

Attributes

Source
BaseChannel.scala
override val gopherApi: JSGopher[F]

Attributes

Source
BaseChannel.scala
protected val readers: Queue[Reader[A]]

Attributes

Source
BaseChannel.scala
protected val writers: Queue[Writer[A]]

Attributes

Source
BaseChannel.scala

Inherited fields

lazy val done: ReadChannel[F, Unit]

Attributes

Inherited from:
ReadChannel
Source
ReadChannel.scala