Record Class ConsensusCommand
java.lang.Object
java.lang.Record
org.j7m.middleware.api.consensus.ConsensusCommand
- Record Components:
commandId- safe deterministic command idpayload- command bytes, defensively copied and redacted from string form
- All Implemented Interfaces:
Serializable
public record ConsensusCommand(String commandId, byte[] payload)
extends Record
implements Serializable
Opaque command payload for the replicated metadata log.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecommandIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.byte[]payload()Returns a defensive copy of command payload bytes.toString()
-
Constructor Details
-
ConsensusCommand
Creates a command.
-
-
Method Details
-
payload
public byte[] payload()Returns a defensive copy of command payload bytes.- Returns:
- payload copy
-
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). -
commandId
-