Class TableLocationUpdateSubscriptionBuffer
java.lang.Object
io.deephaven.engine.table.impl.locations.impl.TableLocationUpdateSubscriptionBuffer
- All Implemented Interfaces:
BasicTableDataListener
,TableLocation.Listener
Intermediates between push-based subscription to a TableLocation and polling on update source refresh.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleException
(@NotNull TableDataException exception) Notify the listener that an exception was encountered while initiating or maintaining the subscription.void
Notify the listener that the table location has been updated.boolean
Subscribe if needed, and return whether there was a pending update to the table location, or throw a pending exception.void
reset()
Unsubscribe and clear any state pending processing.
-
Constructor Details
-
TableLocationUpdateSubscriptionBuffer
-
-
Method Details
-
processPending
public boolean processPending()Subscribe if needed, and return whether there was a pending update to the table location, or throw a pending exception. If a pending exception is thrown, this signals that the subscription is no longer valid and no subsequent pending updates will be returned.- Returns:
- Whether there was a pending update
-
reset
public void reset()Unsubscribe and clear any state pending processing. -
handleUpdate
public void handleUpdate()Description copied from interface:TableLocation.Listener
Notify the listener that the table location has been updated. This may be called "spuriously," i.e. in cases where there has been no substantive update since the last handleUpdate() invocation. Implementations should use appropriate measures to avoid reacting to spurious updates.- Specified by:
handleUpdate
in interfaceTableLocation.Listener
-
handleException
Description copied from interface:BasicTableDataListener
Notify the listener that an exception was encountered while initiating or maintaining the subscription. Delivery of an exception implies that the subscription is no longer valid. This might happen during subscription establishment, and consequently should be checked for after subscribe completes.- Specified by:
handleException
in interfaceBasicTableDataListener
- Parameters:
exception
- The exception
-