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