in src/java/org/apache/cassandra/service/accord/AccordObjectSizes.java [339:383]
private static long emptySize(Command command)
{
switch (command.saveStatus())
{
case Uninitialised:
case NotDefined:
return NOT_DEFINED;
case PreAccepted:
case PreAcceptedWithDeps:
case PreAcceptedWithVote:
return PREACCEPTED;
case AcceptedInvalidate:
return NOTACCEPTED;
case AcceptedInvalidateWithDefinition:
case AcceptedMedium:
case AcceptedMediumWithDefinition:
case AcceptedSlow:
case AcceptedSlowWithDefinition:
case PreCommitted:
case PreCommittedWithDeps:
case PreCommittedWithFixedDeps:
case PreCommittedWithDefinition:
case PreCommittedWithDefAndDeps:
case PreCommittedWithDefAndFixedDeps:
return ACCEPTED;
case Committed:
case ReadyToExecute:
case Stable:
return COMMITTED;
case PreApplied:
case Applying:
case Applied:
return EXECUTED;
case TruncatedApply:
case TruncatedUnapplied:
case TruncatedApplyWithOutcome:
case Vestigial:
case Erased:
return TRUNCATED;
case Invalidated:
return INVALIDATED;
default:
throw new IllegalStateException("Unhandled status " + command.status());
}
}