Strategy
- Companion
- object
Value members
Inherited methods
def unsubscribe(selector: Selector, state: S): S
When strategy supports long-term subscriptions, this is used by interpreter
to cancel a previous subscription, indicating the subscriber is no longer interested
in getting more data.
to cancel a previous subscription, indicating the subscriber is no longer interested
in getting more data.
- Value Params
- selector
-
selector whose selection shall be canceled
- Inhertied from
- Strategy
def get(selector: Selector, state: S): (S, Option[O])
Gets
O
, selected by selector
.Yields to
Yields to
None
, if subscriber cannot be satisfied, causing the subscriber to hold, until next successful publish
Yields to
Some((s,o))
if the subscriber may be satisfied.- Value Params
- selector
-
specifies which
O
thisget
is interested in. In case of a subscription
based strategy, theSelector
shall hold the identity of the subscriber.
- Inhertied from
- Strategy
def transformSelector[Sel2](f: (Sel2, S) => Selector): Strategy[I, O, S, Sel2]
Transforms selector to selector of this state by applying the
f
to Sel2
and state of this strategy. *- Inhertied from
- Strategy
def subscribe(selector: Selector, state: S): (S, Boolean)
Consulted by interpreter to subscribe the given selector.
A subscriptions manages context/state across multiple
Yields to false if the subscription cannot be satisfied.
A subscriptions manages context/state across multiple
get
requests.Yields to false if the subscription cannot be satisfied.
- Value Params
- selector
-
selector that shall be used with mulitple subsequent
get
operations
- Inhertied from
- Strategy
def accepts(i: I, state: S): Boolean
Verifies if
I
can be accepted.If this yields to true, then the pubsub can accept this element, and interpreter is free to invoke
If this yields to false, then interpreter holds the publisher, until there is at least one
(either successsful or not) in which case this is consulted again.
publish
.If this yields to false, then interpreter holds the publisher, until there is at least one
get
(either successsful or not) in which case this is consulted again.
- Value Params
- i
-
I
to publish
- Inhertied from
- Strategy