Constructor and Description |
---|
MapReference(@NotNull RequestContext context,
@NotNull Asset asset,
MapView<String,E> underlying) |
MapReference(String name,
Class<E> type,
@NotNull Asset asset,
MapView<String,E> mapView) |
Modifier and Type | Method and Description |
---|---|
E |
get()
Returns the current value for this Reference.
|
Class<E> |
getType()
Returns the type of the underlying reference.
|
void |
registerSubscriber(boolean bootstrap,
int throttlePeriodMs,
@NotNull Subscriber<? super E> 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(E event)
Sets a new value for this Reference.
|
int |
subscriberCount() |
@NotNull String |
toString() |
void |
unregisterSubscriber(@NotNull Subscriber<? super E> subscriber)
Unregisters the provided
subscriber . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAndRemove, getAndSet, publish
applyTo, applyTo, asyncUpdate, asyncUpdate, syncUpdate, syncUpdate
public MapReference(@NotNull @NotNull RequestContext context, @NotNull @NotNull Asset asset, MapView<String,E> underlying)
public long set(E event)
Reference
@Nullable public E get()
Reference
public void remove()
Reference
public void registerSubscriber(boolean bootstrap, int throttlePeriodMs, @NotNull @NotNull Subscriber<? super E> 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<E>
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(@NotNull @NotNull Subscriber<? super E> subscriber)
Publisher
subscriber
.unregisterSubscriber
in interface Publisher<E>
subscriber
- to removepublic int subscriberCount()
subscriberCount
in interface Publisher<E>
public Class<E> getType()
Reference
Copyright © 2021. All rights reserved.