Class SourcePartitionedTable

All Implemented Interfaces:
LogOutputAppendable, LivenessManager, LivenessNode, LivenessReferent, PartitionedTable, Serializable

public class SourcePartitionedTable extends PartitionedTableImpl
PartitionedTable of single-location SourceTables keyed by TableLocationKey. Refer to TableLocationKey for an explanation of partitioning.
See Also:
  • Constructor Details

    • SourcePartitionedTable

      public SourcePartitionedTable(@NotNull @NotNull TableDefinition constituentDefinition, @Nullable @Nullable UnaryOperator<Table> constituentTransformer, @NotNull @NotNull TableLocationProvider tableLocationProvider, boolean subscribeToTableLocationProvider, boolean subscribeToTableLocations, @Nullable @Nullable Predicate<ImmutableTableLocationKey> locationKeyMatcher)
      Construct a SourcePartitionedTable from the supplied parameters, excluding empty locations.

      Note that subscribeToTableLocationProvider and subscribeToTableLocations are distinct because there may be use cases that supply their own RowSet for constituents. Others might care to observe changes to constituent rows, but only the initially-available set of locations.

      Parameters:
      constituentDefinition - The TableDefinition expected of constituent tables
      constituentTransformer - Function to apply to each "raw" constituent before making the result available to downstream consumers. This may be used, for example, in order to correctly restrict the visible result rows in constituent tables. May be null if no transformations are needed. Must not return null tables, or tables with a definition that does not match constituentDefinition.
      tableLocationProvider - Source for table locations
      subscribeToTableLocationProvider - Whether changes to the set of available locations after instantiation should be reflected in the result SourcePartitionedTable; that is, whether constituents should be added or removed
      subscribeToTableLocations - Whether constituents should be updated to reflect changes in their available rows
      locationKeyMatcher - Function to filter desired location keys; only locations for which test returns true will be included; may be null to include all