Class SourceTable

All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable, NotificationQueue.Dependency, Deflatable<Table>, Table, LivenessManager, LivenessNode, LivenessReferent, LongSizedDataStructure, DynamicNode, DynamicTable, NotificationStepReceiver, NotificationStepSource, SystemicObject, Serializable
Direct Known Subclasses:
PartitionAwareSourceTable, SimpleSourceTable

public abstract class SourceTable extends RedefinableTable
Basic uncoalesced table that only adds keys.
See Also:
  • Method Details

    • disableGrouping

      public void disableGrouping()
    • refresh

      @TestUseOnly public final void refresh()
      This is only for unit tests, at this time.
    • initializeAvailableLocations

      protected final void initializeAvailableLocations()
    • filterLocations

      protected Collection<TableLocation> filterLocations(@NotNull Collection<TableLocation> foundLocations)
      Hook to allow found locations to be filtered (e.g. according to a where-clause on the partitioning column of a PartitionAwareSourceTable). The default implementation returns its input unmolested.
      Parameters:
      foundLocations - A Collection of TableLocations fetched from the table location provider, but not yet incorporated into the table
      Returns:
      A sub-Collection of the input
    • filterLocationKeys

      protected Collection<TableLocationKey> filterLocationKeys(@NotNull Collection<TableLocationKey> foundLocationKeys)
      Hook to allow found location keys to be filtered (e.g. according to a where-clause on the partitioning columns of a PartitionAwareSourceTable. The default implementation returns its input unmolested.
      Parameters:
      foundLocationKeys - A collection of TableLocationKeys fetched from the TableLocationProvider, but not yet incorporated into the table
      Returns:
      A sub-collection of the input
    • setMapEmptyStringsToNull

      @TestUseOnly public static SafeCloseable setMapEmptyStringsToNull(boolean mapEmptyStringsToNull)
      Temporarily change if the table should replace String columns with ones that will automatically map empty strings to the null value.
      Parameters:
      mapEmptyStringsToNull - the new value.
      Returns:
      a SafeCloseable to reset the original value.
    • doCoalesce

      protected final QueryTable doCoalesce()
      Description copied from class: UncoalescedTable
      Produce the actual coalesced result table, suitable for caching.

      Note that if this table must have listeners registered, etc, setting these up is the implementation's responsibility.

      Also note that the implementation should copy attributes, as in copyAttributes(resultTable, CopyAttributeOperation.Coalesce).

      Specified by:
      doCoalesce in class UncoalescedTable
      Returns:
      The coalesced result table, suitable for caching
    • destroy

      protected void destroy()
      Description copied from class: ReferenceCountedLivenessNode

      Attempt to release (destructively when necessary) resources held by this object. This may render the object unusable for subsequent operations. Implementations should be sure to call super.destroy().

      This is intended to only ever be used as a side effect of decreasing the reference count to 0.

      Overrides:
      destroy in class BaseTable