@Test public void testSerialization() { CommitTransaction expected = new CommitTransaction(nextTransactionId(), DataStoreVersions.CURRENT_VERSION); Object serialized = expected.toSerializable(); assertEquals("Serialized type", CommitTransaction.class, serialized.getClass()); CommitTransaction actual = CommitTransaction.fromSerializable( SerializationUtils.clone((Serializable) serialized)); assertEquals("getTransactionID", expected.getTransactionId(), actual.getTransactionId()); assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); }
public static CommitTransaction fromSerializable(Object serializable) { Preconditions.checkArgument(serializable instanceof CommitTransaction); return (CommitTransaction)serializable; }
CommitTransaction extends AbstractThreePhaseCommitMessage { public static CommitTransaction fromSerializable(Object serializable) { Preconditions.checkArgument(serializable instanceof CommitTransaction); return (CommitTransaction)serializable; } }
CommitTransaction extends AbstractThreePhaseCommitMessage { public static CommitTransaction fromSerializable(Object serializable) { Preconditions.checkArgument(serializable instanceof CommitTransaction); return (CommitTransaction)serializable; } CommitTransaction();  CommitTransaction(TransactionIdentifier transactionID, final short version); }
CommitTransaction extends AbstractThreePhaseCommitMessage { public static CommitTransaction fromSerializable(Object serializable) { Preconditions.checkArgument(serializable instanceof CommitTransaction); return (CommitTransaction)serializable; } CommitTransaction();  CommitTransaction(TransactionIdentifier transactionID, final short version); static CommitTransaction fromSerializable(Object serializable); static boolean isSerializedType(Object message); }
CommitTransaction extends AbstractThreePhaseCommitMessage { public static CommitTransaction fromSerializable(Object serializable) { Preconditions.checkArgument(serializable instanceof CommitTransaction); return (CommitTransaction)serializable; } CommitTransaction();  CommitTransaction(TransactionIdentifier transactionID, final short version); static CommitTransaction fromSerializable(Object serializable); static boolean isSerializedType(Object message);  }