- @Deprecated
- @Override
- protected Object newLegacySerializedInstance() {
- return ThreePhaseCommitCohortMessages.CommitTransaction.newBuilder().setTransactionId(
- getTransactionID()).build();
- }
-
- public static CommitTransaction fromSerializable(Object serializable) {
- if(serializable instanceof CommitTransaction) {
- return (CommitTransaction)serializable;
- } else {
- return new CommitTransaction(((ThreePhaseCommitCohortMessages.CommitTransaction)serializable).
- getTransactionId(), DataStoreVersions.LITHIUM_VERSION);
- }
+ public static CommitTransaction fromSerializable(final Object serializable) {
+ Preconditions.checkArgument(serializable instanceof CommitTransaction);
+ return (CommitTransaction)serializable;