gopher.impl

package gopher.impl

Type members

Classlikes

case class AppendReadChannel[F[_], A](x: ReadChannel[F, A], y: ReadChannel[F, A]) extends ReadChannel[F, A]

Input, which reed from the first channel, and after first channel is closed - from second

Input, which reed from the first channel, and after first channel is closed - from second

can be created with 'append' operator.

 val x = read(x|y)
class ChFlatMappedChannel[F[_], W, RA, RB](internal: Channel[F, W, RA], f: RA => ReadChannel[F, RB]) extends ChFlatMappedReadChannel[F, RA, RB] with Channel[F, W, RB]
class ChFlatMappedReadChannel[F[_], A, B](prev: ReadChannel[F, A], f: A => ReadChannel[F, B]) extends ReadChannel[F, B]
trait Expirable[A]

Object, which can be expired (usually - reader or writer in SelectGroup) Usage protocol is next: capture if A inside is used, call markUsed and use A if A inside is unused for some reason -- call markFree

Object, which can be expired (usually - reader or writer in SelectGroup) Usage protocol is next: capture if A inside is used, call markUsed and use A if A inside is unused for some reason -- call markFree

class FilteredAsyncChannel[F[_], W, R](internal: Channel[F, W, R], p: R => F[Boolean]) extends FilteredAsyncReadChannel[F, R] with Channel[F, W, R]
class FilteredAsyncReadChannel[F[_], A](internal: ReadChannel[F, A], p: A => F[Boolean]) extends ReadChannel[F, A]
class FilteredChannel[F[_], W, R](internal: Channel[F, W, R], p: R => Boolean) extends FilteredReadChannel[F, R] with Channel[F, W, R]
class FilteredReadChannel[F[_], A](internal: ReadChannel[F, A], p: A => Boolean) extends ReadChannel[F, A]
abstract class GuardedSPSCBaseChannel[F[_], A](val gopherApi: JVMGopher[F], controlExecutor: ExecutorService, taskExecutor: ExecutorService)(`evidence$1`: CpsAsyncMonad[F]) extends Channel[F, A, A]

Guarded channel work in the next way: reader and writer asynchronically added to readers and writers and force evaluation of internal step function or ensure that currently running step function will see the chanes in readers/writers. Step functions is executed in some thread loop, and in the same time, only one instance of step function is running. (which is ensured by guard)

Guarded channel work in the next way: reader and writer asynchronically added to readers and writers and force evaluation of internal step function or ensure that currently running step function will see the chanes in readers/writers. Step functions is executed in some thread loop, and in the same time, only one instance of step function is running. (which is ensured by guard)

Companion
object
class GuardedSPSCBufferedChannel[F[_], A](gopherApi: JVMGopher[F], bufSize: Int, controlExecutor: ExecutorService, taskExecutor: ExecutorService)(`evidence$1`: CpsAsyncMonad[F]) extends GuardedSPSCBaseChannel[F, A]
class GuardedSPSCUnbufferedChannel[F[_], A](gopherApi: JVMGopher[F], controlExecutor: ExecutorService, taskExecutor: ExecutorService)(`evidence$1`: CpsAsyncMonad[F]) extends GuardedSPSCBaseChannel[F, A]
class MappedAsyncChannel[F[_], W, RA, RB](internal: Channel[F, W, RA], f: RA => F[RB]) extends MappedAsyncReadChannel[F, RA, RB] with Channel[F, W, RB]
class MappedAsyncReadChannel[F[_], A, B](internal: ReadChannel[F, A], f: A => F[B]) extends ReadChannel[F, B]
class MappedChannel[F[_], W, RA, RB](internal: Channel[F, W, RA], f: RA => RB) extends MappedReadChannel[F, RA, RB] with Channel[F, W, RB]
class MappedReadChannel[F[_], A, B](internal: ReadChannel[F, A], f: A => B) extends ReadChannel[F, B]
class NesteWriterWithExpireTime[A](nested: Writer[A], expireTimeMillis: Long) extends Writer[A]
class NestedWriterWithExpireTimeThrowing[F[_], A](nested: Writer[A], expireTimeMillis: Long, gopherApi: Gopher[F]) extends Writer[A]
case class OrReadChannel[F[_], A](x: ReadChannel[F, A], y: ReadChannel[F, A]) extends ReadChannel[F, A]

Input, which combine two other inputs.

Input, which combine two other inputs.

can be created with '|' operator.

 val x = read(x|y)
class PromiseChannel[F[_], A](val gopherApi: JVMGopher[F], taskExecutor: ExecutorService) extends Channel[F, A, A]

Channel is closed immediatly after successfull write.

Channel is closed immediatly after successfull write.

trait Reader[A] extends Expirable[Try[A] => Unit]
trait SPSCBuffer[A]

Buffer. access to buffer is exclusive by owner channel, different loops can start in different threads but only one loop can be active at the samw time

Buffer. access to buffer is exclusive by owner channel, different loops can start in different threads but only one loop can be active at the samw time

class SimpleWriter[A](a: A, f: Try[Unit] => Unit) extends Writer[A]
class SimpleWriterWithExpireTime[A](a: A, f: Try[Unit] => Unit, expireTimeMillis: Long) extends Writer[A]
trait Writer[A] extends Expirable[(A, Try[Unit] => Unit)]