Class TableLocationUpdateSubscriptionBuffer

java.lang.Object
io.deephaven.engine.table.impl.locations.impl.TableLocationUpdateSubscriptionBuffer
All Implemented Interfaces:
BasicTableDataListener, TableLocation.Listener

public class TableLocationUpdateSubscriptionBuffer extends Object implements TableLocation.Listener
Intermediates between push-based subscription to a TableLocation and polling on update source refresh.
  • Constructor Details

    • TableLocationUpdateSubscriptionBuffer

      public TableLocationUpdateSubscriptionBuffer(@NotNull @NotNull TableLocation tableLocation)
  • 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 interface TableLocation.Listener
    • handleException

      public void handleException(@NotNull @NotNull TableDataException exception)
      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 interface BasicTableDataListener
      Parameters:
      exception - The exception