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,PythonTableDataService.TableLocationKeyImpl,URITableLocationKey
public abstract class PartitionedTableLocationKey
extends Object
implements ImmutableTableLocationKey
Base
ImmutableTableLocationKey implementation for table locations that may be enclosed by partitions.
Subclasses should consider invoking the partition-map comparator at higher priority than other comparisons when
implementing Comparable.compareTo(Object). Also, should include the partitions in their equals(Object) and
hashCode() implementations if not calling super.equals() and super.hashCode().-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classCompares two maps of partitions by key-value pairs.protected static final classFormats a map of partitions as key-value pairs. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPartitionedTableLocationKey(@Nullable Map<String, Comparable<?>> partitions) Construct a new PartitionedTableLocationKey for the suppliedpartitions. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(@NotNull TableLocationKey other) By default, compare fully qualified class names of the implementing classes.booleanGet the set of available partition keys.final <PARTITION_VALUE_TYPE extends Comparable<PARTITION_VALUE_TYPE>>
PARTITION_VALUE_TYPEgetPartitionValue(@NotNull String partitionKey) Lookup the value of one of the table partitions enclosing the location keyed bythis.inthashCode()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.engine.table.impl.locations.ImmutableTableLocationKey
makeImmutableMethods inherited from interface io.deephaven.base.log.LogOutputAppendable
appendMethods inherited from interface io.deephaven.util.type.NamedImplementation
getImplementationNameMethods inherited from interface io.deephaven.engine.table.impl.locations.TableLocationKey
clear
-
Field Details
-
partitions
-
cachedHashCode
protected int cachedHashCode
-
-
Constructor Details
-
PartitionedTableLocationKey
Construct a new PartitionedTableLocationKey for the suppliedpartitions.- Parameters:
partitions- The table partitions enclosing the table location keyed bythis. Note that if this parameter isnull, 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:TableLocationKeyLookup the value of one of the table partitions enclosing the location keyed bythis.- Specified by:
getPartitionValuein interfaceTableLocationKey- Type Parameters:
PARTITION_VALUE_TYPE- The expected type of the partition value- Parameters:
partitionKey- The name of the partition- Returns:
- The partition value
-
getPartitionKeys
Description copied from interface:TableLocationKeyGet the set of available partition keys.- Specified by:
getPartitionKeysin interfaceTableLocationKey- Returns:
- The set of available partition keys
-
compareTo
Description copied from interface:TableLocationKeyBy default, compare fully qualified class names of the implementing classes. This method is a fallback where the implementing classes are not directly comparable, and should help establish a consistent ordering between distinct implementations.- Specified by:
compareToin interfaceComparable<TableLocationKey>- Specified by:
compareToin interfaceTableLocationKey
-
hashCode
public int hashCode() -
equals
-