Interface TableLocation

All Superinterfaces:
LivenessReferent, LogOutputAppendable, NamedImplementation, TableLocationState
All Known Implementing Classes:
AbstractTableLocation, NonexistentTableLocation, ParquetTableLocation, PythonTableDataService.TableLocationImpl

Building block for Deephaven "source" tables, with helper methods for discovering locations and their sizes. A location allows access to columns, size, and possibly other metadata for a single partition that may be included in a source table.
  • Method Details

    • getTableKey

      @NotNull @NotNull ImmutableTableKey getTableKey()
      Returns:
      An ImmutableTableKey instance for the enclosing table
    • getKey

      @NotNull @NotNull ImmutableTableLocationKey getKey()
      Returns:
      An ImmutableTableLocationKey instance for this location
    • supportsSubscriptions

      boolean supportsSubscriptions()
      Does this location support subscriptions? That is, can this location ever have ticking data?
      Returns:
      True if this location supports subscriptions
    • subscribe

      void subscribe(@NotNull @NotNull TableLocation.Listener listener)

      Subscribe to pushed location updates. Subscribing more than once with the same listener without an intervening unsubscribe is an error, and may result in undefined behavior.

      This is a possibly asynchronous operation - listener will receive 1 or more handleUpdate callbacks, followed by 0 or 1 handleException callbacks during invocation and continuing after completion, on a thread determined by the implementation. Don't hold a lock that prevents notification delivery while subscribing!

      This method only guarantees eventually consistent state. To force a state update, use refresh() after subscription completes.

      Parameters:
      listener - A listener
    • unsubscribe

      void unsubscribe(@NotNull @NotNull TableLocation.Listener listener)
      Unsubscribe from pushed location updates.
      Parameters:
      listener - The listener to forget about
    • refresh

      void refresh()
      Initialize or run state information.
    • getSortedColumns

      @NotNull @NotNull List<SortColumn> getSortedColumns()
      Get an ordered list of columns this location is sorted by.
      Returns:
      A non-null ordered list of SortColumns
    • getDataIndexColumns

      @NotNull @NotNull List<String[]> getDataIndexColumns()
      Get a list of the columns by which this location is indexed
      Returns:
      A non-null list of String[] arrays containing the key column names for each existing index
    • hasDataIndex

      boolean hasDataIndex(@NotNull @NotNull String... columns)
      Check if this TableLocation has a data index for the specified columns.
      Parameters:
      columns - The set of columns to check for
      Returns:
      Whether the TableLocation has an index for the specified columns
      ApiNote:
      Implementations must guarantee that the result of this method remains constant over the life of an instance, and is consistent with the result of getDataIndex(String...).
    • getDataIndex

      @Nullable @Nullable BasicDataIndex getDataIndex(@NotNull @NotNull String... columns)
      Get the data index table for the specified set of columns. Note that the order of columns does not matter here.
      Parameters:
      columns - The key columns for the index
      Returns:
      The index table or null if one does not exist
      ApiNote:
      If this TableLocation is not static, the returned table must be refreshing, and should be updated to reflect changes in a manner that is consistent with the results provided to a subscriber.
      ImplNote:
      Implementations should attempt to provide a lazily-coalesced result wherever possible, allowing work to be deferred or parallelized.
    • getColumnLocation

      @NotNull @NotNull ColumnLocation getColumnLocation(@NotNull @NotNull CharSequence name)
      Parameters:
      name - The column name
      Returns:
      The ColumnLocation for the defined column under this table location
    • append

      @FinalDefault default LogOutput append(@NotNull @NotNull LogOutput logOutput)
      Specified by:
      append in interface LogOutputAppendable
    • toStringHelper

      @FinalDefault default String toStringHelper()
    • toGenericString

      @FinalDefault default String toGenericString()
      Format the table key without implementation specific bits.
      Returns:
      a formatted string
    • toStringDetailed

      @FinalDefault default String toStringDetailed()
      Optional toString path with more implementation detail.
      Returns:
      detailed conversion to string