Class DeferredTableLocation.DataDriven

java.lang.Object
com.illumon.iris.db.v2.locations.DeferredTableLocation
com.illumon.iris.db.v2.locations.DeferredTableLocation.DataDriven
All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable, TableLocation, TableLocationKey, TableLocationState, NamedImplementation
Enclosing class:
DeferredTableLocation

public static final class DeferredTableLocation.DataDriven extends DeferredTableLocation
DeferredTableLocation that needs to initialize its inner location for all non-key methods.
  • Constructor Details

  • Method Details

    • getStateLock

      @NotNull public Object getStateLock()
      Returns:
      The Object that accessors should synchronize on if they want to invoke multiple getters with consistent results.
    • getSize

      public long getSize()
      Returns:
      The size of a table location:
      NULL_SIZE : Size information is unknown or does not exist for this table location
      >= 0 : The table location exists and has (possibly empty) data
    • getLastModifiedTimeMillis

      public long getLastModifiedTimeMillis()
      Returns:
      The last modified time for a table location, in milliseconds from the epoch:
      NULL_TIME : Modification time information is unknown or does not exist for this table location
      >= 0L : The time this table was last modified, in milliseconds from the UTC epoch
    • getFormat

      @NotNull public TableLocation.Format getFormat()
      Description copied from interface: TableLocation
      Get the format that was used to persist this table location.
      Returns:
      The format for this table location
    • supportsSubscriptions

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

      public void subscribe(@NotNull TableLocation.Listener listener)
      Description copied from interface: TableLocation

      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

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

      public void refresh()
      Description copied from interface: TableLocation
      Initialize or refresh state information.
    • getSortedColumns

      @NotNull public List<SortPair> getSortedColumns()
      Description copied from interface: TableLocation
      Get an ordered list of columns this location is sorted by.
      Returns:
      a non-null ordered list of SortPairs
    • hasDataIndexFor

      public boolean hasDataIndexFor(@NotNull String... columns)
      Description copied from interface: TableLocation
      Check if this location has a data index for the specified columns.
      Parameters:
      columns - the set of columns to check for.
      Returns:
      true if the table has a Data Index for the specified columns
    • getDataIndex

      @Nullable public Table getDataIndex(@NotNull String... columns)
      Description copied from interface: TableLocation
      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.