Record Class TwoPhaseCommands.CoordDecide
java.lang.Object
java.lang.Record
com.loomcache.server.transaction.twopc.TwoPhaseCommands.CoordDecide
- Record Components:
txId- transaction id (non-null)decision- COMMIT or ABORT (non-null)
- All Implemented Interfaces:
TwoPhaseCommands
- Enclosing interface:
TwoPhaseCommands
public static record TwoPhaseCommands.CoordDecide(@NonNull UUID txId, @NonNull TwoPhaseCommands.Decision decision)
extends Record
implements TwoPhaseCommands
Durable coordinator DECIDE record, replicated through raft-0's own log
BEFORE the coordinator fans TX_DECIDE_GROUP out to the participant groups.
On new-leader startup, any pending
TwoPhaseCommands.CoordPrepare with a matching
TwoPhaseCommands.CoordDecide in the log replay gets re-broadcast as DECIDE_GROUP —
honouring the coordinator's original decision rather than defaulting to
ABORT and losing the TX.-
Nested Class Summary
Nested classes/interfaces inherited from interface TwoPhaseCommands
TwoPhaseCommands.CoordDecide, TwoPhaseCommands.CoordPrepare, TwoPhaseCommands.DecideAck, TwoPhaseCommands.DecideGroup, TwoPhaseCommands.DecideQuery, TwoPhaseCommands.Decision, TwoPhaseCommands.FrameWriter, TwoPhaseCommands.Kind, TwoPhaseCommands.PrepareAck, TwoPhaseCommands.PrepareGroup, TwoPhaseCommands.Vote -
Field Summary
Fields inherited from interface TwoPhaseCommands
MAX_OPERATION_PAYLOAD_BYTES, MAX_PARTICIPANT_GROUP_COUNT, MAX_REASON_UTF_BYTES -
Constructor Summary
ConstructorsConstructorDescriptionCoordDecide(@NonNull UUID txId, @NonNull TwoPhaseCommands.Decision decision) Creates an instance of aCoordDeciderecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull TwoPhaseCommands.Decisiondecision()Returns the value of thedecisionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.byte @NonNull []final StringtoString()Returns a string representation of this record class.@NonNull UUIDtxId()Returns the value of thetxIdrecord component.
-
Constructor Details
-
Method Details
-
serialize
public byte @NonNull [] serialize() -
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). -
txId
-
decision
-