Record Class ManagedEventDelivery
java.lang.Object
java.lang.Record
org.j7m.middleware.application.distributed.ManagedEventDelivery
- Record Components:
kind- explicit replacement snapshot or individual source eventcursor- exact snapshot barrier or event identityoperation- exact event operation, empty for snapshotspayload- 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 ClassesModifier and TypeClassDescriptionstatic enumDistinguishes complete projection replacement from an incremental delivery. -
Constructor Summary
ConstructorsConstructorDescriptionManagedEventDelivery(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 TypeMethodDescriptionorg.j7m.middleware.distributed.EventJournal.Cursorcursor()Returns the value of thecursorrecord 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.Returns the value of theoperationrecord component.byte[]payload()Returns independent source bytes.toString()Omits source payload, scope and event identifiers from incidental diagnostics.
-
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 kindcursor- stable source positionoperation- event operation or empty for snapshotpayload- bounded source bytes- Throws:
IllegalArgumentException- for an invalid operation or payload boundNullPointerException- for null fields
-
-
Method Details
-
payload
public byte[] payload()Returns independent source bytes.- Returns:
- copied payload
-
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). -
kind
-
cursor
-
operation
-