Package ai.mindconnect.adminui.service
Record Class StreamBus.Event
java.lang.Object
java.lang.Record
ai.mindconnect.adminui.service.StreamBus.Event
- Enclosing class:
StreamBus
One past event held in the ring buffer.
seq starts at 1 and
grows monotonically per stream. name is the SSE event name
(e.g. "patch", "error", "done"); data
is the JSON-serialised payload.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.longseq()Returns the value of theseqrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Event
Creates an instance of aEventrecord class.- Parameters:
seq- the value for theseqrecord componentname- the value for thenamerecord componentdata- the value for thedatarecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
seq
public long seq()Returns the value of theseqrecord component.- Returns:
- the value of the
seqrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-