sealed abstract class CHub[F[+_], -A, +B] extends Serializable
A CHub[F, A, B] is an asynchronous message hub. Publishers can publish
messages of type A to the hub and subscribers can subscribe to take
messages of type B from the hub within the context of the effect F.
- Alphabetic
- By Inheritance
- CHub
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def awaitShutdown: F[Unit]
Waits for the hub to be shut down.
- abstract def capacity: Int
The maximum capacity of the hub.
- abstract def contramap[C](f: (C) => A): CHub[F, C, B]
Transforms messages published to the hub using the specified function.
- abstract def contramapM[C](f: (C) => F[A]): CHub[F, C, B]
Transforms messages published to the hub using the specified effectual function.
- abstract def dimap[C, D](f: (C) => A, g: (B) => D): CHub[F, C, D]
Transforms messages published to and taken from the hub using the specified functions.
- abstract def dimapM[C, D](f: (C) => F[A], g: (B) => F[D]): CHub[F, C, D]
Transforms messages published to and taken from the hub using the specified effectual functions.
- abstract def filterInput[A1 <: A](f: (A1) => Boolean): CHub[F, A1, B]
Filters messages published to the hub using the specified function.
- abstract def filterInputM[A1 <: A](f: (A1) => F[Boolean]): CHub[F, A1, B]
Filters messages published to the hub using the specified effectual function.
- abstract def filterOutput(f: (B) => Boolean): CHub[F, A, B]
Filters messages taken from the hub using the specified function.
- abstract def filterOutputM(f: (B) => F[Boolean]): CHub[F, A, B]
Filters messages taken from the hub using the specified effectual function.
- abstract def isShutdown: F[Boolean]
Checks whether the hub is shut down.
- abstract def map[C](f: (B) => C): CHub[F, A, C]
Transforms messages taken from the hub using the specified function.
- abstract def mapM[C](f: (B) => F[C]): CHub[F, A, C]
Transforms messages taken from the hub using the specified effectual function.
- abstract def publish(a: A): F[Boolean]
Publishes a message to the hub, returning whether the message was published to the hub.
- abstract def publishAll(as: Iterable[A]): F[Boolean]
Publishes all of the specified messages to the hub, returning whether they were published to the hub.
- abstract def shutdown: F[Unit]
Shuts down the hub.
- abstract def size: F[Int]
The current number of messages in the hub.
- abstract def subscribe: Resource[F, Dequeue[F, B]]
Subscribes to receive messages from the hub.
Subscribes to receive messages from the hub. The resulting subscription can be evaluated multiple times within the scope of the resource to take a message from the hub each time.
- abstract def toQueue: Enqueue[F, A]
Views the hub as a queue that can only be written to.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()