public final class VanillaSubscriber<M> extends AbstractBaseSubscriber<M> implements Subscriber<M>
Constructor and Description |
---|
VanillaSubscriber(@NotNull Runnable endOfSubscriptionHandler,
@NotNull BooleanSupplier tcpBufferFullSupplier,
boolean indexAware,
long index,
M usingMessage,
@NotNull Runnable endOfBootstrapHandler,
SubscriberBuilder.MessageConsumer<? super M> messageHandler) |
Modifier and Type | Method and Description |
---|---|
void |
onEndOfBootStrap()
This method is optionally invoked by Datagrid upon
end of bootstrapping.
|
void |
onMessage(M m)
This method is invoked by DataGrid when there is a new unseen event.
|
index, index, isIndexAware, isTcpBufferFullEnough, onEndOfSubscription, usingMessage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept, builder, indexAware
index, index, isIndexAware, isTcpBufferFullEnough, onEndOfSubscription
usingMessage
public VanillaSubscriber(@NotNull @NotNull Runnable endOfSubscriptionHandler, @NotNull @NotNull BooleanSupplier tcpBufferFullSupplier, boolean indexAware, long index, M usingMessage, @NotNull @NotNull Runnable endOfBootstrapHandler, @NotNull SubscriberBuilder.MessageConsumer<? super M> messageHandler)
public void onMessage(M m) throws InvalidSubscriberException
Subscriber
onMessage
in interface Subscriber<M>
m
- eventInvalidSubscriberException
- is thrown if this subscriber is no longer valid.public void onEndOfBootStrap()
Subscriber
Currently, only a TopologySubscription
support this call-back.
onEndOfBootStrap
in interface Subscriber<M>
Copyright © 2021. All rights reserved.