Interface ColumnSourceManager

All Superinterfaces:
LivenessReferent
All Known Implementing Classes:
RegionedColumnSourceManager

public interface ColumnSourceManager extends LivenessReferent
Manager for ColumnSources in a Table.
  • Method Details

    • getColumnSources

      Map<String,? extends ColumnSource<?>> getColumnSources()
      Get a map of name to ColumnSource for the column sources maintained by this manager.
      Returns:
      An unmodifiable view of the column source map maintained by this manager.
    • addLocation

      void addLocation(@NotNull @NotNull TableLocation tableLocation)
      Add a table location to the list to be checked in run().
      Parameters:
      tableLocation - The table location to be added
    • initialize

      Observe initial sizes for the previously added table locations, and update the managed column sources accordingly. Create any data indexes that may be derived from the locations.
      Returns:
      The initial set of initially-available row keys, to be owned by the caller. This row set will have a data indexer populated with any data indexes that were created.
    • refresh

      WritableRowSet refresh()
      Observe size changes in the previously added table locations, and update the managed column sources accordingly.
      Returns:
      The set of added row keys, to be owned by the caller
    • deliverError

      void deliverError(@NotNull @NotNull Throwable error, @Nullable TableListener.Entry entry)
      Advise this ColumnSourceManager that an error has occurred, and that it will no longer be refreshed. This method should ensure that the error is delivered to downstream listeners if appropriate.
      Parameters:
      error - The error that occurred
      entry - The failing node's entry, if known
    • allLocations

      Collection<TableLocation> allLocations()
      Get the added locations, first the ones that have been "included" (found to exist with non-zero size) in order of inclusion, then the remainder in order of discovery.
      Returns:
      All known locations, ordered as described
    • includedLocations

      Collection<TableLocation> includedLocations()
      Get the added locations that have been found to exist and have non-zero size.
      Returns:
      The added locations that have been found to exist and have non-zero size
    • locationTable

      Table locationTable()
      Get the added locations that have been found to exist and have non-zero size as a table containing the row sets for each location. May only be called after initialize(). The returned table will also have columns corresponding to the partitions found in the locations, for the convenience of many downstream operations.
      Returns:
      The added locations that have been found to exist and have non-zero size
    • locationColumnName

      String locationColumnName()
      Get the name of the column that contains the TableLocation values from locationTable().
      Returns:
      The name of the location column
    • rowSetColumnName

      String rowSetColumnName()
      Get the name of the column that contains the RowSet values from locationTable().
      Returns:
      The name of the row set column
    • isEmpty

      boolean isEmpty()
      Report whether this ColumnSourceManager has no locations that have been "included" (i.e. found to exist with non-zero size).
      Returns:
      True if there are no included locations
    • removeLocationKey

      boolean removeLocationKey(@NotNull @NotNull ImmutableTableLocationKey tableLocationKey)
      Remove a table location key from the sources.
      Parameters:
      tableLocationKey - the location key being removed
      Returns:
      true if the location key was actually removed