Package su.onno.cluster
Record Class ClusterEvent.EntityChanged
java.lang.Object
java.lang.Record
su.onno.cluster.ClusterEvent.EntityChanged
- Record Components:
originNodeId- the publishing node's id, ornullbefore a bus stamps it.changeType-created/updated/deleted/posted/unposted/changed.entityType-catalog/document/register.entityName- the entity's logical name, or*for a non-specific signal.id- the affected row's id as a string, ornull.naturalKey- the business key (catalog code / document number), ornull.
- All Implemented Interfaces:
ClusterEvent
- Enclosing interface:
ClusterEvent
public static record ClusterEvent.EntityChanged(String originNodeId, String changeType, String entityType, String entityName, String id, String naturalKey)
extends Record
implements ClusterEvent
An entity create/update/delete/post notice mirroring the fields of
su.onno.events.EntityChangedEvent. A best-effort live-UI signal: a peer that misses one
re-fetches the affected surface on its next interaction.-
Nested Class Summary
Nested classes/interfaces inherited from interface su.onno.cluster.ClusterEvent
ClusterEvent.EntityChanged, ClusterEvent.Notification, ClusterEvent.Presence, ClusterEvent.ProcessTasksChanged -
Field Summary
Fields inherited from interface su.onno.cluster.ClusterEvent
KIND_ENTITY_CHANGED, KIND_NOTIFICATION, KIND_PRESENCE, KIND_PROCESS_TASKS_CHANGED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechangeTyperecord component.Returns the value of theentityNamerecord component.Returns the value of theentityTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.kind()The payload-shape tag identifying which permitted variant this event is.Returns the value of thenaturalKeyrecord component.Returns the value of theoriginNodeIdrecord component.final StringtoString()Returns a string representation of this record class.withOrigin(String originNodeId) A copy of this event withClusterEvent.originNodeId()set — used by a bus to stamp its identity on send.
-
Constructor Details
-
EntityChanged
public EntityChanged(String originNodeId, String changeType, String entityType, String entityName, String id, String naturalKey) Creates an instance of aEntityChangedrecord class.- Parameters:
originNodeId- the value for theoriginNodeIdrecord componentchangeType- the value for thechangeTyperecord componententityType- the value for theentityTyperecord componententityName- the value for theentityNamerecord componentid- the value for theidrecord componentnaturalKey- the value for thenaturalKeyrecord component
-
-
Method Details
-
kind
Description copied from interface:ClusterEventThe payload-shape tag identifying which permitted variant this event is.- Specified by:
kindin interfaceClusterEvent
-
withOrigin
Description copied from interface:ClusterEventA copy of this event withClusterEvent.originNodeId()set — used by a bus to stamp its identity on send.- Specified by:
withOriginin interfaceClusterEvent
-
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). -
originNodeId
Returns the value of theoriginNodeIdrecord component.- Specified by:
originNodeIdin interfaceClusterEvent- Returns:
- the value of the
originNodeIdrecord component
-
changeType
Returns the value of thechangeTyperecord component.- Returns:
- the value of the
changeTyperecord component
-
entityType
Returns the value of theentityTyperecord component.- Returns:
- the value of the
entityTyperecord component
-
entityName
Returns the value of theentityNamerecord component.- Returns:
- the value of the
entityNamerecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
naturalKey
Returns the value of thenaturalKeyrecord component.- Returns:
- the value of the
naturalKeyrecord component
-