Record Class RegistriesConf.MirrorConfig

java.lang.Object
java.lang.Record
land.oras.auth.RegistriesConf.MirrorConfig
Record Components:
location - The mirror registry location (host[:port][/path]).
insecure - Whether the mirror is insecure.
pullFromMirror - Controls which pull operations may use this mirror (default: RegistriesConf.PullFromMirror.ALL).
Enclosing class:
RegistriesConf

public static record RegistriesConf.MirrorConfig(@Nullable String location, @Nullable Boolean insecure, @Nullable RegistriesConf.PullFromMirror pullFromMirror) extends Record
The model of a mirror entry within a [[registry]] table.
  • Constructor Details

    • MirrorConfig

      public MirrorConfig(@Nullable String location, @Nullable Boolean insecure, @Nullable RegistriesConf.PullFromMirror pullFromMirror)
      Creates an instance of a MirrorConfig record class.
      Parameters:
      location - the value for the location record component
      insecure - the value for the insecure record component
      pullFromMirror - the value for the pullFromMirror record component
  • Method Details

    • isInsecure

      public boolean isInsecure()
      Return true if this mirror should be accessed over plain HTTP or with unverified TLS.
      Returns:
      true if insecure
    • effectivePullFromMirror

      public RegistriesConf.PullFromMirror effectivePullFromMirror()
      Return the effective pull-from-mirror setting, defaulting to RegistriesConf.PullFromMirror.ALL.
      Returns:
      the pull-from-mirror setting
    • toString

      public final 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.
    • location

      public @Nullable String location()
      Returns the value of the location record component.
      Returns:
      the value of the location record component
    • insecure

      public @Nullable Boolean insecure()
      Returns the value of the insecure record component.
      Returns:
      the value of the insecure record component
    • pullFromMirror

      public @Nullable RegistriesConf.PullFromMirror pullFromMirror()
      Returns the value of the pullFromMirror record component.
      Returns:
      the value of the pullFromMirror record component