Record Class TierAction.Write

java.lang.Object
java.lang.Record
network.ike.plugin.scaffold.TierAction.Write
Record Components:
entry - the manifest entry
resolvedDest - absolute destination path
newContent - bytes to write (full file content — for tracked-block this is the fully-rendered combined file, not just the managed block)
appliedSha - hash of newContent (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 write
reason - 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().
  • Constructor Details

  • 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

      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.
    • entry

      public ManifestEntry entry()
      Returns the value of the entry record component.
      Specified by:
      entry in interface TierAction
      Returns:
      the value of the entry record component
    • resolvedDest

      public Path resolvedDest()
      Returns the value of the resolvedDest record component.
      Specified by:
      resolvedDest in interface TierAction
      Returns:
      the value of the resolvedDest record component
    • appliedSha

      public String appliedSha()
      Returns the value of the appliedSha record component.
      Returns:
      the value of the appliedSha record component
    • templateSha

      public String templateSha()
      Returns the value of the templateSha record component.
      Returns:
      the value of the templateSha record component
    • kind

      public TierAction.Write.Kind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • reason

      public String reason()
      Returns the value of the reason record component.
      Specified by:
      reason in interface TierAction
      Returns:
      the value of the reason record component