Record Class ConsensusLogEntryStatus
java.lang.Object
java.lang.Record
org.j7m.middleware.api.consensus.ConsensusLogEntryStatus
- Record Components:
index- log indexterm- entry termcommandId- safe command idpayloadBytes- payload byte countcommitted- whether the entry is committed on the reporting nodeapplied- whether the entry has been applied on the reporting node
- All Implemented Interfaces:
Serializable
public record ConsensusLogEntryStatus(LogIndex index, ConsensusTerm term, String commandId, long payloadBytes, boolean committed, boolean applied)
extends Record
implements Serializable
Redacted public status metadata for a consensus log entry.
This record is immutable and safe to expose through status APIs. It never
contains the raw ConsensusCommand.payload() bytes. The command id is
treated as caller-supplied safe metadata; sensitive data must not be embedded
in command ids.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConsensusLogEntryStatus(LogIndex index, ConsensusTerm term, String commandId, long payloadBytes, boolean committed, boolean applied) Creates redacted log entry status. -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplied()Returns the value of theappliedrecord component.Returns the value of thecommandIdrecord component.booleanReturns the value of thecommittedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.index()Returns the value of theindexrecord component.longReturns the value of thepayloadBytesrecord component.term()Returns the value of thetermrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConsensusLogEntryStatus
public ConsensusLogEntryStatus(LogIndex index, ConsensusTerm term, String commandId, long payloadBytes, boolean committed, boolean applied) Creates redacted log entry status.
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
index
-
term
-
commandId
-
payloadBytes
public long payloadBytes()Returns the value of thepayloadBytesrecord component.- Returns:
- the value of the
payloadBytesrecord component
-
committed
-
applied
-