public final class RemotePublisher<T,M> extends net.openhft.chronicle.network.connection.AbstractStatelessClient<PublisherHandler.EventId> implements Publisher<M>
Constructor and Description |
---|
RemotePublisher(@NotNull RequestContext context,
@NotNull Asset asset) |
Modifier and Type | Method and Description |
---|---|
void |
publish(M event)
Publish an event
|
void |
registerSubscriber(boolean bootstrap,
int throttlePeriodMs,
@NotNull Subscriber<? super M> subscriber,
boolean endSubscriptionAfterBootstrap)
Registers the provided
subscriber as a subscription to this specific topic. |
int |
subscriberCount() |
void |
unregisterSubscriber(Subscriber<? super M> subscriber)
Unregisters the provided
subscriber . |
attempt, performClose, proxyReturnBoolean, proxyReturnBooleanWithArgs, proxyReturnBooleanWithSequence, proxyReturnByte, proxyReturnByte, proxyReturnInt, proxyReturnInt, proxyReturnLong, proxyReturnLongWithArgs, proxyReturnTypedObject, proxyReturnTypedObject, proxyReturnTypedObject, proxyReturnUint16, proxyReturnVoid, proxyReturnVoid, proxyReturnWireConsumer, proxyReturnWireConsumerInOut, proxyReturnWireTypedObject, readBoolean, readInt, sendBytes, sendEvent, sendEventAsync, toParameters, toParameters, writeMetaDataForKnownTID
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
referenceId, referenceName, temporary
public RemotePublisher(@NotNull @NotNull RequestContext context, @NotNull @NotNull Asset asset)
public void registerSubscriber(boolean bootstrap, int throttlePeriodMs, @NotNull @NotNull Subscriber<? super M> subscriber, boolean endSubscriptionAfterBootstrap)
Publisher
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.
registerSubscriber
in interface Publisher<M>
bootstrap
- to bootstrapthrottlePeriodMs
- 0
for no throttling, otherwise the period of
throttling in millisecondssubscriber
- to registerendSubscriptionAfterBootstrap
- if the subscriptions should be ended automatically after bootstrappublic void unregisterSubscriber(Subscriber<? super M> subscriber)
Publisher
subscriber
.unregisterSubscriber
in interface Publisher<M>
subscriber
- to removepublic int subscriberCount()
subscriberCount
in interface Publisher<M>
Copyright © 2021. All rights reserved.