Class Commit
java.lang.Object
org.apache.cassandra.service.paxos.Commit
- Direct Known Subclasses:
Commit.Proposal
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classCommit.CommitSerializer<T extends Commit>static classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Ballotstatic final Commit.CommitSerializer<Commit>final PartitionUpdate -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.cassandra.service.paxos.Commit.CompareResultcompareWith(Commit that) static CommitemptyCommit(DecoratedKey partitionKey, TableMetadata metadata) booleanbooleaninthashCode()booleanhasSameBallot(Commit other) booleanstatic booleanstatic booleanbooleanstatic booleanstatic booleanbooleanbooleanisReproposalOf(Commit older) We can witness reproposals of the latest successful commit; we can detect this by comparing the timestamp of the update with our ballot; if it is the same, we are not a reproposal.booleanisSameOrAfter(Ballot otherBallot) static <C extends Commit>
Clatest(C a, C b) the latest of two ballots, or the first ballot if equal timestampsstatic Ballotthe latest of two ballots, or the first ballot if equal timestampsstatic Ballotthe latest of two ballots, or the first ballot if equal timestampsstatic CommitnewPrepare(DecoratedKey partitionKey, TableMetadata metadata, Ballot ballot) static CommitnewProposal(Ballot ballot, PartitionUpdate update) Deprecated.See CASSANDRA-17164static booleantimestampsClash(Ballot a, Ballot b) static booleantimestampsClash(Commit a, Ballot b) unequal ballots with same timestamptoString()
-
Field Details
-
serializer
-
ballot
-
update
-
-
Constructor Details
-
Commit
-
-
Method Details
-
newPrepare
-
emptyCommit
-
newProposal
Deprecated.See CASSANDRA-17164 -
isAfter
-
isSameOrAfter
-
isAfter
-
isBefore
-
hasBallot
-
hasSameBallot
-
makeMutation
-
equals
-
hashCode
public int hashCode() -
toString
-
toString
-
isReproposalOf
We can witness reproposals of the latest successful commit; we can detect this by comparing the timestamp of the update with our ballot; if it is the same, we are not a reproposal. If it is the same as either the ballot timestamp or update timestamp of the latest committed proposal, then we are reproposing it and can instead simpy commit it. -
compareWith
-
isAfter
- Returns:
- testIfAfter.isAfter(testIfBefore), with non-null > null
-
isAfter
- Returns:
- testIfAfter.isAfter(testIfBefore), with non-null > null
-
isAfter
- Returns:
- testIfAfter.isAfter(testIfBefore), with non-null > null
-
isAfter
- Returns:
- testIfAfter.isAfter(testIfBefore), with non-null > null
-
latest
the latest of two ballots, or the first ballot if equal timestamps -
latest
the latest of two ballots, or the first ballot if equal timestamps -
latest
the latest of two ballots, or the first ballot if equal timestamps -
timestampsClash
unequal ballots with same timestamp -
timestampsClash
-