Record Class ManagedEventDelivery

java.lang.Object
java.lang.Record
org.j7m.middleware.application.distributed.ManagedEventDelivery
Record Components:
kind - explicit replacement snapshot or individual source event
cursor - exact snapshot barrier or event identity
operation - exact event operation, empty for snapshots
payload - copied versioned source bytes; snapshots replace the whole application projection

public record ManagedEventDelivery(ManagedEventDelivery.Kind kind, org.j7m.middleware.distributed.EventJournal.Cursor cursor, String operation, byte[] payload) extends Record
Immutable data-only input for a generated subscription callback. Cursor is the deduplication identity, not authority or proof that an external application effect committed atomically.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Distinguishes complete projection replacement from an incremental delivery.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ManagedEventDelivery(ManagedEventDelivery.Kind kind, org.j7m.middleware.distributed.EventJournal.Cursor cursor, String operation, byte[] payload)
    Validates and copies a bounded delivery without decoding application types.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.j7m.middleware.distributed.EventJournal.Cursor
    Returns the value of the cursor record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the kind record component.
    Returns the value of the operation record component.
    byte[]
    Returns independent source bytes.
    Omits source payload, scope and event identifiers from incidental diagnostics.

    Methods inherited from class Object

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

    • ManagedEventDelivery

      public ManagedEventDelivery(ManagedEventDelivery.Kind kind, org.j7m.middleware.distributed.EventJournal.Cursor cursor, String operation, byte[] payload)
      Validates and copies a bounded delivery without decoding application types.
      Parameters:
      kind - explicit delivery kind
      cursor - stable source position
      operation - event operation or empty for snapshot
      payload - bounded source bytes
      Throws:
      IllegalArgumentException - for an invalid operation or payload bound
      NullPointerException - for null fields
  • Method Details

    • payload

      public byte[] payload()
      Returns independent source bytes.
      Returns:
      copied payload
    • toString

      public String toString()
      Omits source payload, scope and event identifiers from incidental diagnostics.
      Specified by:
      toString in class Record
      Returns:
      fixed safe label
    • 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.
    • kind

      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • cursor

      public org.j7m.middleware.distributed.EventJournal.Cursor cursor()
      Returns the value of the cursor record component.
      Returns:
      the value of the cursor record component
    • operation

      public String operation()
      Returns the value of the operation record component.
      Returns:
      the value of the operation record component