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.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Compares two maps of partitions by key-value pairs.protected static final class
Formats a map of partitions as key-value pairs. -
Field Summary
Fields inherited from interface io.deephaven.engine.table.impl.locations.ImmutableTableLocationKey
ZERO_LENGTH_IMMUTABLE_TABLE_LOCATION_KEY_ARRAY
-
Constructor Summary
ModifierConstructorDescriptionprotected
PartitionedTableLocationKey
(@Nullable Map<String, Comparable<?>> partitions) Construct a new PartitionedTableLocationKey for the suppliedpartitions
. -
Method Summary
Modifier and TypeMethodDescriptionGet 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
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface io.deephaven.engine.table.impl.locations.ImmutableTableLocationKey
makeImmutable
Methods inherited from interface io.deephaven.base.log.LogOutputAppendable
append
Methods inherited from interface io.deephaven.util.type.NamedImplementation
getImplementationName
-
Field Details
-
partitions
-
-
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:TableLocationKey
Lookup the value of one of the table partitions enclosing the location keyed bythis
.- Specified by:
getPartitionValue
in 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:TableLocationKey
Get the set of available partition keys.- Specified by:
getPartitionKeys
in interfaceTableLocationKey
- Returns:
- The set of available partition keys
-