Class PartitionedTableLocationKey

java.lang.Object
io.deephaven.engine.table.impl.locations.impl.PartitionedTableLocationKey
All Implemented Interfaces:
LogOutputAppendable, ImmutableTableLocationKey, TableLocationKey, NamedImplementation, Comparable<TableLocationKey>
Direct Known Subclasses:
FileTableLocationKey, URITableLocationKey

public abstract class PartitionedTableLocationKey extends Object implements ImmutableTableLocationKey
Base ImmutableTableLocationKey implementation for table locations that may be enclosed by partitions. Sub-classes should be sure to invoke the partition-map comparator at higher priority than other comparisons when implementing Comparable.compareTo(Object), and to include the partitions in their Object.equals(Object) implementations.
  • Field Details

  • Constructor Details

    • PartitionedTableLocationKey

      protected PartitionedTableLocationKey(@Nullable @Nullable Map<String,Comparable<?>> partitions)
      Construct a new PartitionedTableLocationKey for the supplied partitions.
      Parameters:
      partitions - The table partitions enclosing the table location keyed by this. Note that if this parameter is null, the location will be a member of no partitions. An ordered copy of the map will be made, so the calling code is free to mutate the map after this call completes, but the partition keys and values themselves must be effectively immutable.
  • Method Details

    • getPartitionValue

      public final <PARTITION_VALUE_TYPE extends Comparable<PARTITION_VALUE_TYPE>> PARTITION_VALUE_TYPE getPartitionValue(@NotNull @NotNull String partitionKey)
      Description copied from interface: TableLocationKey
      Lookup the value of one of the table partitions enclosing the location keyed by this.
      Specified by:
      getPartitionValue in interface TableLocationKey
      Type Parameters:
      PARTITION_VALUE_TYPE - The expected type of the partition value
      Parameters:
      partitionKey - The name of the partition
      Returns:
      The partition value
    • getPartitionKeys

      public final Set<String> getPartitionKeys()
      Description copied from interface: TableLocationKey
      Get the set of available partition keys.
      Specified by:
      getPartitionKeys in interface TableLocationKey
      Returns:
      The set of available partition keys