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