Class DefaultKey

java.lang.Object
com.arpnetworking.tsdcore.model.DefaultKey
All Implemented Interfaces:
Key, Serializable

public final class DefaultKey extends Object implements Key
Default implementation of the Key interface.
Author:
Ville Koskela (ville dot koskela at inscopemetrics dot io)
See Also:
  • Constructor Details

    • DefaultKey

      public DefaultKey(com.google.common.collect.ImmutableMap<String,String> dimensions)
      Public constructor.
      Parameters:
      dimensions - The dimension key-value pairs.
  • Method Details

    • getParameters

      public com.google.common.collect.ImmutableMap<String,String> getParameters()
      Description copied from interface: Key
      Return all the slice parameters.
      Specified by:
      getParameters in interface Key
      Returns:
      ImmutableMap of parameter name to value.
    • getCluster

      public String getCluster()
      Description copied from interface: Key
      The cluster parameter value.
      Specified by:
      getCluster in interface Key
      Returns:
      Cluster parameter value.
    • getService

      public String getService()
      Description copied from interface: Key
      The service parameter value.
      Specified by:
      getService in interface Key
      Returns:
      Service parameter value.
    • getHost

      public String getHost()
      Description copied from interface: Key
      The host parameter value.
      Specified by:
      getHost in interface Key
      Returns:
      Host parameter value.
    • filter

      public Key filter(com.google.common.collect.ImmutableSet<String> keys)
      Description copied from interface: Key
      Create a Key from this key that contains a subset of the parameters by parameter key.
      Specified by:
      filter in interface Key
      Parameters:
      keys - the parameter keys to retain in the returned Key
      Returns:
      instance of Key with only specified parameter keys and values
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object