Class/Object

zio

ZHub

Related Docs: object ZHub | package zio

Permalink

sealed abstract class ZHub[-RA, -RB, +EA, +EB, -A, +B] extends Serializable

A ZHub[RA, RB, EA, EB, 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. Publishing messages can require an environment of type RA and fail with an error of type EA. Taking messages can require an environment of type RB and fail with an error of type EB.

Self Type
ZHub[RA, RB, EA, EB, A, B]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZHub
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def awaitShutdown(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Waits for the hub to be shut down.

  2. abstract def capacity: Int

    Permalink

    The maximum capacity of the hub.

  3. abstract def isShutdown(implicit trace: ZTraceElement): UIO[Boolean]

    Permalink

    Checks whether the hub is shut down.

  4. abstract def publish(a: A)(implicit trace: ZTraceElement): ZIO[RA, EA, Boolean]

    Permalink

    Publishes a message to the hub, returning whether the message was published to the hub.

  5. abstract def publishAll(as: Iterable[A])(implicit trace: ZTraceElement): ZIO[RA, EA, Boolean]

    Permalink

    Publishes all of the specified messages to the hub, returning whether they were published to the hub.

  6. abstract def shutdown(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Shuts down the hub.

  7. abstract def size(implicit trace: ZTraceElement): UIO[Int]

    Permalink

    The current number of messages in the hub.

  8. abstract def subscribe(implicit trace: ZTraceElement): ZIO[Scope, Nothing, ZDequeue[RB, EB, B]]

    Permalink

    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 to take a message from the hub each time.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def contramap[C](f: (C) ⇒ A): ZHub[RA, RB, EA, EB, C, B]

    Permalink

    Transforms messages published to the hub using the specified function.

  7. final def contramapZIO[RC <: RA, EC >: EA, C](f: (C) ⇒ ZIO[RC, EC, A]): ZHub[RC, RB, EC, EB, C, B]

    Permalink

    Transforms messages published to the hub using the specified effectual function.

  8. final def dimap[C, D](f: (C) ⇒ A, g: (B) ⇒ D): ZHub[RA, RB, EA, EB, C, D]

    Permalink

    Transforms messages published to and taken from the hub using the specified functions.

  9. final def dimapZIO[RC <: RA, RD <: RB, EC >: EA, ED >: EB, C, D](f: (C) ⇒ ZIO[RC, EC, A], g: (B) ⇒ ZIO[RD, ED, D]): ZHub[RC, RD, EC, ED, C, D]

    Permalink

    Transforms messages published to and taken from the hub using the specified effectual functions.

  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def filterInput[A1 <: A](f: (A1) ⇒ Boolean): ZHub[RA, RB, EA, EB, A1, B]

    Permalink

    Filters messages published to the hub using the specified function.

  13. final def filterInputZIO[RA1 <: RA, EA1 >: EA, A1 <: A](f: (A1) ⇒ ZIO[RA1, EA1, Boolean]): ZHub[RA1, RB, EA1, EB, A1, B]

    Permalink

    Filters messages published to the hub using the specified effectual function.

  14. final def filterOutput(f: (B) ⇒ Boolean): ZHub[RA, RB, EA, EB, A, B]

    Permalink

    Filters messages taken from the hub using the specified function.

  15. final def filterOutputZIO[RB1 <: RB, EB1 >: EB](f: (B) ⇒ ZIO[RB1, EB1, Boolean]): ZHub[RA, RB1, EA, EB1, A, B]

    Permalink

    Filters messages taken from the hub using the specified effectual function.

  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def isEmpty(implicit trace: ZTraceElement): UIO[Boolean]

    Permalink

    Checks whether the hub is currently empty.

  20. final def isFull(implicit trace: ZTraceElement): UIO[Boolean]

    Permalink

    Checks whether the hub is currently full.

  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. final def map[C](f: (B) ⇒ C): ZHub[RA, RB, EA, EB, A, C]

    Permalink

    Transforms messages taken from the hub using the specified function.

  23. final def mapZIO[RC <: RB, EC >: EB, C](f: (B) ⇒ ZIO[RC, EC, C]): ZHub[RA, RC, EA, EC, A, C]

    Permalink

    Transforms messages taken from the hub using the specified effectual function.

  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. final def toQueue: ZEnqueue[RA, EA, A]

    Permalink

    Views the hub as a queue that can only be written to.

  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. final def contramapM[RC <: RA, EC >: EA, C](f: (C) ⇒ ZIO[RC, EC, A]): ZHub[RC, RB, EC, EB, C, B]

    Permalink

    Transforms messages published to the hub using the specified effectual function.

    Transforms messages published to the hub using the specified effectual function.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use contramapZIO

  2. final def dimapM[RC <: RA, RD <: RB, EC >: EA, ED >: EB, C, D](f: (C) ⇒ ZIO[RC, EC, A], g: (B) ⇒ ZIO[RD, ED, D]): ZHub[RC, RD, EC, ED, C, D]

    Permalink

    Transforms messages published to and taken from the hub using the specified effectual functions.

    Transforms messages published to and taken from the hub using the specified effectual functions.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use dimapZIO

  3. final def filterInputM[RA1 <: RA, EA1 >: EA, A1 <: A](f: (A1) ⇒ ZIO[RA1, EA1, Boolean]): ZHub[RA1, RB, EA1, EB, A1, B]

    Permalink

    Filters messages published to the hub using the specified effectual function.

    Filters messages published to the hub using the specified effectual function.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use filterInputZIO

  4. final def filterOutputM[RB1 <: RB, EB1 >: EB](f: (B) ⇒ ZIO[RB1, EB1, Boolean]): ZHub[RA, RB1, EA, EB1, A, B]

    Permalink

    Filters messages taken from the hub using the specified effectual function.

    Filters messages taken from the hub using the specified effectual function.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use filterOutputZIO

  5. final def mapM[RC <: RB, EC >: EB, C](f: (B) ⇒ ZIO[RC, EC, C]): ZHub[RA, RC, EA, EC, A, C]

    Permalink

    Transforms messages taken from the hub using the specified effectual function.

    Transforms messages taken from the hub using the specified effectual function.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use mapZIO

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped