public OmidTransactionContext(byte[] txnBytes) throws InvalidProtocolBufferException { this(); if (txnBytes != null && txnBytes.length > 0) { TSOProto.Transaction transaction = TSOProto.Transaction.parseFrom(txnBytes); tx = new HBaseTransaction(transaction.getTimestamp(), transaction.getEpoch(), new HashSet<HBaseCellId>(), new HashSet<HBaseCellId>(), null, tm.isLowLatency()); } else { tx = null; } }
public Builder mergeFrom(org.apache.omid.proto.TSOProto.Transaction other) { if (other == org.apache.omid.proto.TSOProto.Transaction.getDefaultInstance()) return this; if (other.hasTimestamp()) { setTimestamp(other.getTimestamp()); } if (other.hasReadTimestamp()) { setReadTimestamp(other.getReadTimestamp()); } if (other.hasVisibilityLevel()) { setVisibilityLevel(other.getVisibilityLevel()); } if (other.hasEpoch()) { setEpoch(other.getEpoch()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }