Class PollingTableLocationProvider<TK extends TableKey,TLK extends TableLocationKey>
- All Implemented Interfaces:
TableLocationProvider
,NamedImplementation
TableLocationProvider
implementation that delegates location key
discovery to a TableLocationKeyFinder
and location
creation to a
TableLocationFactory
.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.table.impl.locations.TableLocationProvider
TableLocationProvider.Listener
-
Field Summary
Fields inherited from class io.deephaven.engine.table.impl.locations.impl.SubscriptionAggregator
subscriptions
-
Constructor Summary
ConstructorDescriptionPollingTableLocationProvider
(TK tableKey, @NotNull TableLocationKeyFinder<TLK> locationKeyFinder, @NotNull TableLocationFactory<TK, TLK> locationFactory, @Nullable TableDataRefreshService refreshService) -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
Refresh and activate update pushing from the implementing class.protected final void
Deactivate pushed updates from the implementing class.Get a name for the implementing class.protected @NotNull TableLocation
makeTableLocation
(@NotNull TableLocationKey locationKey) Make a new implementation-appropriate TableLocation from the supplied key.protected final <T> boolean
matchSubscriptionToken
(T token) Verify that a notification pertains to a currently-active subscription.void
refresh()
Initialize or refresh state information about the list of existing locations.Methods inherited from class io.deephaven.engine.table.impl.locations.impl.AbstractTableLocationProvider
deliverInitialSnapshot, doInitialization, ensureInitialized, getKey, getTableLocationIfPresent, getTableLocationKeys, handleTableLocationKey, handleTableLocationKeyRemoved, hasTableLocationKey, isInitialized, removeTableLocationKey, setInitialized, toString, visitLocationKey
Methods inherited from class io.deephaven.engine.table.impl.locations.impl.SubscriptionAggregator
activationFailed, activationSuccessful, checkHasSubscribers, postActivationHook, subscribe, supportsSubscriptions, unsubscribe
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.deephaven.engine.table.impl.locations.TableLocationProvider
getName, getTableLocation, subscribe, supportsSubscriptions, unsubscribe
-
Constructor Details
-
PollingTableLocationProvider
public PollingTableLocationProvider(@NotNull TK tableKey, @NotNull @NotNull TableLocationKeyFinder<TLK> locationKeyFinder, @NotNull @NotNull TableLocationFactory<TK, TLK> locationFactory, @Nullable @Nullable TableDataRefreshService refreshService)
-
-
Method Details
-
getImplementationName
Description copied from interface:NamedImplementation
Get a name for the implementing class. Useful for abstract classes that implement
LogOutputAppendable
or overridetoString
.The default implementation is correct, but not suitable for high-frequency usage.
- Returns:
- A name for the implementing class
-
refresh
public void refresh()Description copied from interface:TableLocationProvider
Initialize or refresh state information about the list of existing locations. -
makeTableLocation
@NotNull protected @NotNull TableLocation makeTableLocation(@NotNull @NotNull TableLocationKey locationKey) Description copied from class:AbstractTableLocationProvider
Make a new implementation-appropriate TableLocation from the supplied key.- Specified by:
makeTableLocation
in classAbstractTableLocationProvider
- Parameters:
locationKey
- The table location key- Returns:
- The new TableLocation
-
activateUnderlyingDataSource
protected final void activateUnderlyingDataSource()Description copied from class:SubscriptionAggregator
Refresh and activate update pushing from the implementing class.
If the implementation will deliver notifications in a different thread than the one that calls this method, then this method must be asynchronous - that is, it must not block pending delivery of results. This requirement holds even if that other thread has nothing to do with the initial activation request!
Listeners should guard against duplicate notifications, especially if the implementation delivers synchronous notifications.
The implementation should call activationSuccessful() when done activating and delivering initial run results, unless activationFailed() was called instead.
Must be called under the subscription lock.
- Overrides:
activateUnderlyingDataSource
in classSubscriptionAggregator<TableLocationProvider.Listener>
-
deactivateUnderlyingDataSource
protected final void deactivateUnderlyingDataSource()Description copied from class:SubscriptionAggregator
Deactivate pushed updates from the implementing class. Must be called under the subscription lock.- Overrides:
deactivateUnderlyingDataSource
in classSubscriptionAggregator<TableLocationProvider.Listener>
-
matchSubscriptionToken
protected final <T> boolean matchSubscriptionToken(T token) Description copied from class:SubscriptionAggregator
Verify that a notification pertains to a currently-active subscription. Must be called under the subscription lock.- Overrides:
matchSubscriptionToken
in classSubscriptionAggregator<TableLocationProvider.Listener>
- Parameters:
token
- A subscription-related object that the subclass can use to match a notification- Returns:
- True iff notification delivery should proceed
-