Class FullTableLocationKey

java.lang.Object
com.illumon.iris.db.v2.locations.FullTableLocationKey
All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable, NamedImplementation, Serializable
Direct Known Subclasses:
FullTableLocationKey.AggregateTableLocationKey

public class FullTableLocationKey extends Object implements com.fishlib.base.log.LogOutputAppendable, Serializable, NamedImplementation
Immutable class holding the information necessary to fully identify a table location (TableKey + TableLocationKey)
See Also:
  • Constructor Details

    • FullTableLocationKey

      public FullTableLocationKey(@NotNull String namespace, @NotNull String tableName, @NotNull TableType tableType, @NotNull String internalPartition, @NotNull String columnPartition)
      Construct an immutable FullTableLocationKey from component string values.
      Parameters:
      namespace - the namespace
      tableName - the table name
      tableType - the type of the table
      internalPartition - the internal partition value
      columnPartition - the column partition value
    • FullTableLocationKey

      public FullTableLocationKey(@NotNull TableKey tableKey, @NotNull TableLocationKey locationKey)
      Construct an immutable table identifier from location key values.
      Parameters:
      tableKey - a valid table key
      locationKey - a valid table location key
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • append

      public com.fishlib.base.log.LogOutput append(@NotNull com.fishlib.base.log.LogOutput logOutput)
      Specified by:
      append in interface com.fishlib.base.log.LogOutputAppendable
    • toSimpleString

      public String toSimpleString()
    • getInternalPartition

      @NotNull public String getInternalPartition()
    • getColumnPartition

      @NotNull public String getColumnPartition()
    • getTableType

      @NotNull public TableType getTableType()
    • getTableName

      @NotNull public String getTableName()
    • getNamespace

      @NotNull public String getNamespace()
    • getTableKey

      @NotNull public TableKey getTableKey()
      Get the TableKey portion of this FullTableLocationKey.
      Returns:
      an immutable TableKey
    • getTableLocationKey

      @NotNull public TableLocationKey getTableLocationKey()
      Get the TableLocationKey part of the FullTableLocationKey.
      Returns:
      an immutable TableLocationKey
    • isAggregateKey

      public boolean isAggregateKey()
      FullTableLocationKey.AggregateTableLocationKey isn't as independent as was originally hoped. This method grants a peek into the implementation.
      Returns:
      true if this is an aggregate key, false if a full key (has an internal partition)
    • makeFullKey

      public FullTableLocationKey makeFullKey(@NotNull String internalPartitionValue)
      Construct an immutable FullTableLocationKey from an FullTableLocationKey.AggregateTableLocationKey and an internal partition value.
      Parameters:
      internalPartitionValue - the internal partition value to add
    • hashKey

      public int hashKey()
      Returns the hash code of a key. See KeyedObjectKey.hashKey(Object).
      Returns:
      the hash code of the object's key
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equalKey

      public boolean equalKey(FullTableLocationKey other)
      Compare a key against the key of an object. See KeyedObjectKey.equalKey(Object, Object).
      Parameters:
      other - the other FullTableLocationKey
      Returns:
      true if this key is the same as the other key.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object