PubSub

trait PubSub[F[_], I, O, Selector] extends Publish[F, I] with Subscribe[F, O, Selector] with PubSub[F, I, O, Selector]
Companion
object
trait PubSub[F, I, O, Selector]
trait Subscribe[F, O, Selector]
trait Subscribe[F, O, Selector]
trait Publish[F, I]
trait Publish[F, I]
class Object
trait Matchable
class Any

Value members

Inherited methods

def get(selector: Selector): F[O]

Gets elements satisfying the selector, yielding when such an element is available.

Gets elements satisfying the selector, yielding when such an element is available.

Value Params
selector

selector describing which A to receive

Inherited from
Subscribe
def getStream(selector: Selector): Stream[F, O]

A variant of get, that instead of returning one element will return multiple elements in form of stream.

A variant of get, that instead of returning one element will return multiple elements in form of stream.

Value Params
selector

selector describing which A to receive

Inherited from
Subscribe
def publish(a: I): F[Unit]

Publishes one element. This completes after element was successfully published.

Publishes one element. This completes after element was successfully published.

Inherited 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.

Creates a subscription for the supplied selector. If the subscription is not supported or not successful, this yields to false.

Value Params
selector

selector describing which A to receive

Inherited from
Subscribe
def tryGet(selector: Selector): F[Option[O]]

Like get, but instead of semantically blocking for a matching element, returns immediately with None if such an element is not available.

Like get, but instead of semantically blocking for a matching element, returns immediately with None if such an element is not available.

Value Params
selector

selector describing which A to receive

Inherited from
Subscribe
def tryPublish(a: I): F[Boolean]

Tries to publish one element.

Tries to publish one element.

Evaluates to false if element was not published. Evaluates to true if element was published successfully.

Inherited from
Publish
def unsubscribe(selector: Selector): F[Unit]

Cancels a subscription previously registered with subscribe. Must be invoked if the subscriber will no longer consume elements.

Cancels a subscription previously registered with subscribe. Must be invoked if the subscriber will no longer consume elements.

Value Params
selector

selector to unsubscribe

Inherited from
Subscribe