java.lang.Object
java.lang.Record
com.yahoo.vespa.hosted.controller.api.integration.deployment.OsRelease

public record OsRelease(com.yahoo.component.Version version, OsRelease.Tag tag, Instant taggedAt) extends Record
An OS release and its tag.
Author:
mpolden
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Known release tags
  • Constructor Summary

    Constructors
    Constructor
    Description
    OsRelease(com.yahoo.component.Version version, OsRelease.Tag tag, Instant taggedAt)
    Creates an instance of a OsRelease record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    age(Instant instant)
    Returns the age of this at given instant
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    tag()
    The tag of this
    Returns the time this was tagged
    Returns a string representation of this record class.
    com.yahoo.component.Version
    The version number

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • OsRelease

      public OsRelease(com.yahoo.component.Version version, OsRelease.Tag tag, Instant taggedAt)
      Creates an instance of a OsRelease record class.
      Parameters:
      version - the value for the version record component
      tag - the value for the tag record component
      taggedAt - the value for the taggedAt record component
  • Method Details

    • version

      public com.yahoo.component.Version version()
      The version number
    • tag

      public OsRelease.Tag tag()
      The tag of this
    • taggedAt

      public Instant taggedAt()
      Returns the time this was tagged
    • age

      public Duration age(Instant instant)
      Returns the age of this at given instant
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.