public Builder clear() { super.clear(); if (timestampResponseBuilder_ == null) { timestampResponse_ = org.apache.omid.proto.TSOProto.TimestampResponse.getDefaultInstance(); } else { timestampResponseBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); if (commitResponseBuilder_ == null) { commitResponse_ = org.apache.omid.proto.TSOProto.CommitResponse.getDefaultInstance(); } else { commitResponseBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); if (handshakeResponseBuilder_ == null) { handshakeResponse_ = org.apache.omid.proto.TSOProto.HandshakeResponse.getDefaultInstance(); } else { handshakeResponseBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); if (fenceResponseBuilder_ == null) { fenceResponse_ = org.apache.omid.proto.TSOProto.FenceResponse.getDefaultInstance(); } else { fenceResponseBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); return this; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt64(1, startTimestamp_); } getUnknownFields().writeTo(output); }
e.getRequest().success(resp.getTimestampResponse().getStartTimestamp()); if (e.getTimeout() != null) { e.getTimeout().cancel();
private void handleResponse(ResponseEvent response) { TSOProto.Response resp = response.getParam(); if (resp.hasTimestampResponse()) { if (timestampRequests.size() == 0) { LOG.debug("Received timestamp response when no requests outstanding"); return; } RequestAndTimeout e = timestampRequests.remove(); e.getRequest().success(resp.getTimestampResponse().getStartTimestamp()); if (e.getTimeout() != null) { e.getTimeout().cancel(); } } else if (resp.hasCommitResponse()) { long startTimestamp = resp.getCommitResponse().getStartTimestamp(); RequestAndTimeout e = commitRequests.remove(startTimestamp); if (e == null) { LOG.debug("Received commit response for request that doesn't exist. Start TS: {}", startTimestamp); return; } if (e.getTimeout() != null) { e.getTimeout().cancel(); } if (resp.getCommitResponse().getAborted()) { e.getRequest().error(new AbortException()); } else { e.getRequest().success(resp.getCommitResponse().getCommitTimestamp()); } } }
/** * <code>optional .TimestampResponse timestampResponse = 1;</code> */ public Builder mergeTimestampResponse(org.apache.omid.proto.TSOProto.TimestampResponse value) { if (timestampResponseBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && timestampResponse_ != org.apache.omid.proto.TSOProto.TimestampResponse.getDefaultInstance()) { timestampResponse_ = org.apache.omid.proto.TSOProto.TimestampResponse.newBuilder(timestampResponse_).mergeFrom(value).buildPartial(); } else { timestampResponse_ = value; } onChanged(); } else { timestampResponseBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; return this; } /**
public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.omid.proto.TSOProto.TimestampResponse prototype) {
/** * <code>optional .TimestampResponse timestampResponse = 1;</code> */ public Builder clearTimestampResponse() { if (timestampResponseBuilder_ == null) { timestampResponse_ = org.apache.omid.proto.TSOProto.TimestampResponse.getDefaultInstance(); onChanged(); } else { timestampResponseBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } /**
public static Builder newBuilder(org.apache.omid.proto.TSOProto.TimestampResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
public org.apache.omid.proto.TSOProto.TimestampResponse getDefaultInstanceForType() { return org.apache.omid.proto.TSOProto.TimestampResponse.getDefaultInstance(); }
@Override public void sendTimestampResponse(long startTimestamp, Channel c, MonitoringContext monCtx) { TSOProto.Response.Builder builder = TSOProto.Response.newBuilder(); TSOProto.TimestampResponse.Builder respBuilder = TSOProto.TimestampResponse.newBuilder(); respBuilder.setStartTimestamp(startTimestamp); builder.setTimestampResponse(respBuilder.build()); c.write(builder.build()); timestampMeter.mark(); monCtx.timerStop("reply.processor.timestamp.latency"); }
@Override public void sendTimestampResponse(long startTimestamp, Channel c) { TSOProto.Response.Builder builder = TSOProto.Response.newBuilder(); TSOProto.TimestampResponse.Builder respBuilder = TSOProto.TimestampResponse.newBuilder(); respBuilder.setStartTimestamp(startTimestamp); builder.setTimestampResponse(respBuilder.build()); c.write(builder.build()); timestampMeter.mark(); }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, startTimestamp_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public Builder mergeFrom(org.apache.omid.proto.TSOProto.TimestampResponse other) { if (other == org.apache.omid.proto.TSOProto.TimestampResponse.getDefaultInstance()) return this; if (other.hasStartTimestamp()) { setStartTimestamp(other.getStartTimestamp()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
@Override public void sendTimestampResponse(long startTimestamp, Channel c) { TSOProto.Response.Builder builder = TSOProto.Response.newBuilder(); TSOProto.TimestampResponse.Builder respBuilder = TSOProto.TimestampResponse.newBuilder(); respBuilder.setStartTimestamp(startTimestamp); builder.setTimestampResponse(respBuilder.build()); c.write(builder.build()); }
public org.apache.omid.proto.TSOProto.TimestampResponse buildPartial() { org.apache.omid.proto.TSOProto.TimestampResponse result = new org.apache.omid.proto.TSOProto.TimestampResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.startTimestamp_ = startTimestamp_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
private void initFields() { timestampResponse_ = org.apache.omid.proto.TSOProto.TimestampResponse.getDefaultInstance(); commitResponse_ = org.apache.omid.proto.TSOProto.CommitResponse.getDefaultInstance(); handshakeResponse_ = org.apache.omid.proto.TSOProto.HandshakeResponse.getDefaultInstance(); fenceResponse_ = org.apache.omid.proto.TSOProto.FenceResponse.getDefaultInstance(); } private byte memoizedIsInitialized = -1;