Package com.tangosol.net.topic
Interface Subscriber.Option<V,U>
-
- Type Parameters:
V
- the type of the value on the topicU
- the type of the value returned to the subscriber
- All Known Implementing Classes:
Subscriber.ChannelOwnershipListeners
,Subscriber.CompleteOnEmpty
,Subscriber.Convert
,Subscriber.Filtered
,Subscriber.Name
- Enclosing interface:
- Subscriber<V>
public static interface Subscriber.Option<V,U>
A marker interface to indicate that a class is a validSubscriber.Option
for aSubscriber
.Options to use with NamedTopic.createSubscriber(Subscriber.Option...)
Subscriber Option Description Subscriber.Name.of(String)
Specify subscriber group name.
For each value delivered to a subscriber group, only one member of the group receives the value.Subscriber.Filtered.by(Filter)
Only Subscriber.receive()
values matching this Filter.
Only one Filter per subscription group.Subscriber.Convert.using(ValueExtractor)
Convert topic value using provided ValueExtractor
prior toSubscriber.receive()
.
Only one Converter per subscription group.Subscriber.CompleteOnEmpty.enabled()
When no values left to Subscriber.receive()
, returnedCompletableFuture.get()
returns null Element.
By default, returnedCompletableFuture.get()
blocks until next topic value is available to return.All members of subscriber group share at most a single
Filter
and singleConverter
. The lastSubscriber
joining the group and specifying these option(s) are the ones used by all subscriber group members. Note that when both aSubscriber.Filtered.by(Filter)
andSubscriber.Convert.using(ValueExtractor)
are specified, theFilter
is applied first and onlyNamedTopic
values matching the filter are converted before beingreceived by the Subscriber(s)
.
-
-
Field Summary
Fields Modifier and Type Field Description static Subscriber.Option
NULL_OPTION
-
Method Summary
Static Methods Modifier and Type Method Description static <V,U>
Subscriber.Option<V,U>nullOption()
A null implementation of anSubscriber.Option
.
-
-
-
Field Detail
-
NULL_OPTION
static final Subscriber.Option NULL_OPTION
-
-
Method Detail
-
nullOption
static <V,U> Subscriber.Option<V,U> nullOption()
A null implementation of anSubscriber.Option
.- Type Parameters:
V
- the type of the value on the topicU
- the type of the value returned to the subscriber- Returns:
- a null implementation of an
Subscriber.Option
.
-
-