+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("CreateTransactionReply [transactionPath=").append(transactionPath).append(", transactionId=")
+ .append(transactionId).append(", version=").append(getVersion()).append("]");
+ return builder.toString();
+ }
+
+ public static CreateTransactionReply fromSerializable(Object serializable) {
+ if(serializable instanceof CreateTransactionReply) {
+ return (CreateTransactionReply)serializable;
+ } else {
+ ShardTransactionMessages.CreateTransactionReply o =
+ (ShardTransactionMessages.CreateTransactionReply) serializable;
+ return new CreateTransactionReply(o.getTransactionActorPath(), o.getTransactionId(),
+ (short)o.getMessageVersion());
+ }
+ }
+
+ public static boolean isSerializedType(Object message) {
+ return message instanceof CreateTransactionReply ||
+ message instanceof ShardTransactionMessages.CreateTransactionReply;
+ }