PubSub
trait PubSub[F <: ([_$3] =>> Any), I, O, Selector] extends Publish[F, I] with Subscribe[F, O, Selector] with PubSub[F, I, O, Selector]
- Companion
- object
Value members
Inherited methods
def unsubscribe(selector: Selector): F[Unit]
Cancels a subscription previously registered with subscribe.
Must be invoked if the subscriber will no longer consume elements.
Must be invoked if the subscriber will no longer consume elements.
- Value Params
- selector
-
selector to unsubscribe
- Inhertied from
- Subscribe
def get(selector: Selector): F[A]
Gets elements satisfying the
selector
, yielding when such an element is available.- Value Params
- selector
-
selector describing which
A
to receive
- Inhertied from
- Subscribe
def getStream(selector: Selector): Stream[F, A]
A variant of
in form of stream.
get
, that instead of returning one element will return multiple elementsin form of stream.
- Value Params
- selector
-
selector describing which
A
to receive
- Inhertied from
- Subscribe
def tryPublish(a: A): F[Boolean]
Tries to publish one element.
Evaluates to
Evaluates to
false
if element was not published.Evaluates to
true
if element was published successfully.- Inhertied from
- Publish
def subscribe(selector: Selector): F[Boolean]
Creates a subscription for the supplied selector.
If the subscription is not supported or not successful, this yields to false.
If the subscription is not supported or not successful, this yields to false.
- Value Params
- selector
-
selector describing which
A
to receive
- Inhertied from
- Subscribe