Class DefaultRecord

java.lang.Object
com.arpnetworking.metrics.mad.model.DefaultRecord
All Implemented Interfaces:
Record

public final class DefaultRecord extends Object implements Record
Default implementation of the Record interface. IMPORTANT: Instances are only hashed and compare based on their identifier, and are considered interchangeable if their identifiers match irregardless of their content.
Author:
Brandon Arp (brandon dot arp at inscopemetrics dot io), Ville Koskela (ville dot koskela at inscopemetrics dot io), Ryan Ascheman (rascheman at groupon dot com)
  • Method Details

    • getId

      public String getId()
      Description copied from interface: Record
      Gets the unique identifier of the record.
      Specified by:
      getId in interface Record
      Returns:
      the identifier.
    • getTime

      public ZonedDateTime getTime()
      Description copied from interface: Record
      Gets the time stamp of the record.
      Specified by:
      getTime in interface Record
      Returns:
      the time stamp.
    • getRequestTime

      public Optional<ZonedDateTime> getRequestTime()
      Description copied from interface: Record
      Gets the "received at" time stamp of the record.
      Specified by:
      getRequestTime in interface Record
      Returns:
      the time stamp
    • getMetrics

      public com.google.common.collect.ImmutableMap<String,? extends Metric> getMetrics()
      Description copied from interface: Record
      Gets metrics.
      Specified by:
      getMetrics in interface Record
      Returns:
      the metrics
    • getAnnotations

      public com.google.common.collect.ImmutableMap<String,String> getAnnotations()
      Description copied from interface: Record
      Gets annotations.
      Specified by:
      getAnnotations in interface Record
      Returns:
      the annotations
    • getDimensions

      public com.google.common.collect.ImmutableMap<String,String> getDimensions()
      Description copied from interface: Record
      Gets dimensions.
      Specified by:
      getDimensions in interface Record
      Returns:
      the dimensions
    • 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