Class InstrumentedTableListenerBase

All Implemented Interfaces:
LogOutputAppendable, LivenessManager, LivenessNode, LivenessReferent, TableListener, NotificationQueue.Dependency, Serializable
Direct Known Subclasses:
InstrumentedTableUpdateListener, ShiftObliviousInstrumentedListener

public abstract class InstrumentedTableListenerBase extends LivenessArtifact implements TableListener, NotificationQueue.Dependency
See Also:
  • Field Details

    • failed

      protected boolean failed
  • Method Details

    • getUpdateGraph

      public UpdateGraph getUpdateGraph()
      Specified by:
      getUpdateGraph in interface NotificationQueue.Dependency
      Returns:
      the update graph that this dependency is a part of
    • toString

      public String toString()
      Overrides:
      toString in class ReferenceCounted
    • setVerboseLogging

      public static boolean setVerboseLogging(boolean enableVerboseLogging)
    • getEntry

      @Nullable public @Nullable PerformanceEntry getEntry()
    • getErrorNotification

      public NotificationQueue.ErrorNotification getErrorNotification(Throwable originalException, TableListener.Entry sourceEntry)
      Description copied from interface: TableListener
      Creates a notification for the exception.
      Specified by:
      getErrorNotification in interface TableListener
      Parameters:
      originalException - exception
      sourceEntry - performance tracking
      Returns:
      exception notification
    • append

      public LogOutput append(@NotNull @NotNull LogOutput logOutput)
      Specified by:
      append in interface LogOutputAppendable
      Overrides:
      append in class ReferenceCounted
    • canExecute

      public boolean canExecute(long step)
    • satisfied

      public boolean satisfied(long step)
      Description copied from interface: NotificationQueue.Dependency
      Is this ancestor satisfied? Note that this method must be safe to call on any thread.
      Specified by:
      satisfied in interface NotificationQueue.Dependency
      Parameters:
      step - The step for which we are testing satisfaction
      Returns:
      Whether the dependency is satisfied on step (and will not fire subsequent notifications)
    • onFailure

      public void onFailure(Throwable originalException, @Nullable @Nullable TableListener.Entry sourceEntry)
      Description copied from interface: TableListener
      Notification of exceptions.
      Specified by:
      onFailure in interface TableListener
      Parameters:
      originalException - exception
      sourceEntry - performance tracking
    • logUncaughtException

      protected final void logUncaughtException(@NotNull @NotNull Exception e, @NotNull @NotNull TableUpdate update)
      Log an exception that escaped this listener's processing of update, identifying the listener by its description (or by its full performance entry when verbose logging is enabled).

      Listeners that complete their update asynchronously (e.g., on a JobScheduler) must call this themselves before failing, because the exception does not propagate out of onUpdate.

      Parameters:
      e - the exception
      update - the update being processed when the exception occurred
    • onFailureInternal

      protected abstract void onFailureInternal(Throwable originalException, @Nullable @Nullable TableListener.Entry sourceEntry)
    • onFailureInternalWithDependent

      protected final void onFailureInternalWithDependent(BaseTable<?> dependent, Throwable originalException, TableListener.Entry sourceEntry)