Record Class TierAction.Write
java.lang.Object
java.lang.Record
network.ike.plugin.scaffold.TierAction.Write
- Record Components:
entry- the manifest entryresolvedDest- absolute destination pathnewContent- bytes to write (full file content — for tracked-block this is the fully-rendered combined file, not just the managed block)appliedSha- hash ofnewContent(for the lockfile update; for tracked-block this is the hash of just the managed block)templateSha- hash of the unbounded template source (used for drift telemetry in the new lockfile entry)kind- whether the file existed before this writereason- draft-output summary
- All Implemented Interfaces:
TierAction
- Enclosing interface:
TierAction
public static record TierAction.Write(ManifestEntry entry, Path resolvedDest, byte[] newContent, String appliedSha, String templateSha, TierAction.Write.Kind kind, String reason)
extends Record
implements TierAction
Publish should write
newContent to resolvedDest().-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumCategory of write, for draft output and ordering.Nested classes/interfaces inherited from interface TierAction
TierAction.Skip, TierAction.UpToDate, TierAction.UserManaged, TierAction.Write -
Constructor Summary
ConstructorsConstructorDescriptionWrite(ManifestEntry entry, Path resolvedDest, byte[] newContent, String appliedSha, String templateSha, TierAction.Write.Kind kind, String reason) Compact constructor validating required fields. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theappliedSharecord component.entry()Returns the value of theentryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.byte[]Accessor that returns a defensive copy of the content bytes so callers cannot mutate the record's state.reason()Returns the value of thereasonrecord component.Returns the value of theresolvedDestrecord component.Returns the value of thetemplateSharecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Write
public Write(ManifestEntry entry, Path resolvedDest, byte[] newContent, String appliedSha, String templateSha, TierAction.Write.Kind kind, String reason) Compact constructor validating required fields.
-
-
Method Details
-
newContent
public byte[] newContent()Accessor that returns a defensive copy of the content bytes so callers cannot mutate the record's state.- Returns:
- a fresh clone of the bytes to write
-
toString
-
hashCode
-
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). -
entry
Returns the value of theentryrecord component.- Specified by:
entryin interfaceTierAction- Returns:
- the value of the
entryrecord component
-
resolvedDest
Returns the value of theresolvedDestrecord component.- Specified by:
resolvedDestin interfaceTierAction- Returns:
- the value of the
resolvedDestrecord component
-
appliedSha
Returns the value of theappliedSharecord component.- Returns:
- the value of the
appliedSharecord component
-
templateSha
Returns the value of thetemplateSharecord component.- Returns:
- the value of the
templateSharecord component
-
kind
-
reason
Returns the value of thereasonrecord component.- Specified by:
reasonin interfaceTierAction- Returns:
- the value of the
reasonrecord component
-