- if(serializable instanceof ReadDataReply) {
- return (ReadDataReply) serializable;
- } else {
- ShardTransactionMessages.ReadDataReply o =
- (ShardTransactionMessages.ReadDataReply) serializable;
- return new ReadDataReply(new NormalizedNodeToNodeCodec(null).decode(o.getNormalizedNode()));
- }
- }
-
- public static ByteString fromSerializableAsByteString(Object serializable) {
- if(serializable instanceof ReadDataReply) {
- ReadDataReply r = (ReadDataReply)serializable;
- return toSerializableReadDataReply(r.getNormalizedNode()).toByteString();
- } else {
- ShardTransactionMessages.ReadDataReply o =
- (ShardTransactionMessages.ReadDataReply) serializable;
- return o.getNormalizedNode().toByteString();
- }