Package land.oras.auth
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 Summary
ConstructorsConstructorDescriptionMirrorConfig(@Nullable String location, @Nullable Boolean insecure, @Nullable RegistriesConf.PullFromMirror pullFromMirror) Creates an instance of aMirrorConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturn the effective pull-from-mirror setting, defaulting toRegistriesConf.PullFromMirror.ALL.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Booleaninsecure()Returns the value of theinsecurerecord component.booleanReturn true if this mirror should be accessed over plain HTTP or with unverified TLS.@Nullable Stringlocation()Returns the value of thelocationrecord component.@Nullable RegistriesConf.PullFromMirrorReturns the value of thepullFromMirrorrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MirrorConfig
public MirrorConfig(@Nullable String location, @Nullable Boolean insecure, @Nullable RegistriesConf.PullFromMirror pullFromMirror) Creates an instance of aMirrorConfigrecord class.- Parameters:
location- the value for thelocationrecord componentinsecure- the value for theinsecurerecord componentpullFromMirror- the value for thepullFromMirrorrecord 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
Return the effective pull-from-mirror setting, defaulting toRegistriesConf.PullFromMirror.ALL.- Returns:
- the pull-from-mirror setting
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
insecure
Returns the value of theinsecurerecord component.- Returns:
- the value of the
insecurerecord component
-
pullFromMirror
Returns the value of thepullFromMirrorrecord component.- Returns:
- the value of the
pullFromMirrorrecord component
-