Constructor and Description |
---|
QueueReference(Class<M> type,
@NotNull Asset asset,
@NotNull QueueView<T,M> queueView,
T name) |
QueueReference(@NotNull RequestContext requestContext,
@NotNull Asset asset,
QueueView<T,M> queueView) |
Modifier and Type | Method and Description |
---|---|
M |
get()
Returns the current value for this Reference.
|
Class<M> |
getType()
Returns the type of the underlying reference.
|
void |
registerSubscriber(boolean bootstrap,
int throttlePeriodMs,
@NotNull Subscriber<? super M> subscriber,
boolean endSubscriptionAfterBootstrap)
Registers the provided
subscriber as a subscription to this specific topic. |
void |
remove()
Removes the underlying topic/key for this Reference.
|
long |
set(M event)
Sets a new value for this Reference.
|
int |
subscriberCount() |
void |
unregisterSubscriber(Subscriber<? super M> subscriber)
Unregisters the provided
subscriber . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAndRemove, getAndSet, publish
applyTo, applyTo, asyncUpdate, asyncUpdate, syncUpdate, syncUpdate
public QueueReference(Class<M> type, @NotNull @NotNull Asset asset, @NotNull @NotNull QueueView<T,M> queueView, T name)
public QueueReference(@NotNull @NotNull RequestContext requestContext, @NotNull @NotNull Asset asset, QueueView<T,M> queueView)
public long set(@NotNull M event)
Reference
@Nullable public M get()
Reference
public void remove()
Reference
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.