public interface Publisher<E>
Modifier and Type | Method and Description |
---|---|
void |
publish(E event)
Publish an event
|
void |
registerSubscriber(boolean bootstrap,
int throttlePeriodMs,
Subscriber<? super E> subscriber,
boolean endSubscriptionAfterBootstrap)
Registers the provided
subscriber as a subscription to this specific topic. |
int |
subscriberCount() |
void |
unregisterSubscriber(Subscriber<? super E> subscriber)
Unregisters the provided
subscriber . |
void publish(E event)
event
- to publishvoid registerSubscriber(boolean bootstrap, int throttlePeriodMs, Subscriber<? super E> subscriber, boolean endSubscriptionAfterBootstrap)
subscriber
as a subscription to this specific topic.
Any given instance of a subscriber must at most be registered once with a DataGrid instance at any given time.
bootstrap
- to bootstrapthrottlePeriodMs
- 0
for no throttling, otherwise the period of
throttling in millisecondssubscriber
- to registerendSubscriptionAfterBootstrap
- if the subscriptions should be ended automatically after bootstrapAssetNotFoundException
- if the topic no longer existsvoid unregisterSubscriber(Subscriber<? super E> subscriber)
subscriber
.subscriber
- to removeint subscriberCount()
Copyright © 2021. All rights reserved.