/** * <code>optional .HandshakeResponse handshakeResponse = 3;</code> */ public Builder setHandshakeResponse( org.apache.omid.proto.TSOProto.HandshakeResponse.Builder builderForValue) { if (handshakeResponseBuilder_ == null) { handshakeResponse_ = builderForValue.build(); onChanged(); } else { handshakeResponseBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /**
subBuilder.mergeFrom(handshakeResponse_); handshakeResponse_ = subBuilder.buildPartial();
/** * <code>optional .HandshakeResponse handshakeResponse = 3;</code> */ public Builder mergeHandshakeResponse(org.apache.omid.proto.TSOProto.HandshakeResponse value) { if (handshakeResponseBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && handshakeResponse_ != org.apache.omid.proto.TSOProto.HandshakeResponse.getDefaultInstance()) { handshakeResponse_ = org.apache.omid.proto.TSOProto.HandshakeResponse.newBuilder(handshakeResponse_).mergeFrom(value).buildPartial(); } else { handshakeResponse_ = value; } onChanged(); } else { handshakeResponseBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /**
public Builder mergeFrom(org.apache.omid.proto.TSOProto.HandshakeResponse other) { if (other == org.apache.omid.proto.TSOProto.HandshakeResponse.getDefaultInstance()) return this; if (other.hasClientCompatible()) { setClientCompatible(other.getClientCompatible()); } if (other.hasServerCapabilities()) { mergeServerCapabilities(other.getServerCapabilities()); } if (other.hasLowLatency()) { setLowLatency(other.getLowLatency()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder clone() { return create().mergeFrom(buildPartial()); }
private static Builder create() { return new Builder(); }
private void checkHandshake(final ChannelHandlerContext ctx, TSOProto.HandshakeRequest request) { TSOProto.HandshakeResponse.Builder response = TSOProto.HandshakeResponse.newBuilder(); if (request.hasClientCapabilities()) { response.setClientCompatible(true) .setServerCapabilities(TSOProto.Capabilities.newBuilder().build()); TSOChannelContext tsoCtx = new TSOChannelContext(); tsoCtx.setHandshakeComplete(); ctx.setAttachment(tsoCtx); } else { response.setClientCompatible(false); } ctx.getChannel().write(TSOProto.Response.newBuilder().setHandshakeResponse(response.build()).build()); }
private void checkHandshake(final ChannelHandlerContext ctx, TSOProto.HandshakeRequest request) { TSOProto.HandshakeResponse.Builder response = TSOProto.HandshakeResponse.newBuilder(); if (request.hasClientCapabilities()) { response.setClientCompatible(true) .setServerCapabilities(TSOProto.Capabilities.newBuilder().build()); TSOChannelContext tsoCtx = new TSOChannelContext(); tsoCtx.setHandshakeComplete(); ctx.setAttachment(tsoCtx); } else { response.setClientCompatible(false); } response.setLowLatency(config.getLowLatency()); ctx.getChannel().write(TSOProto.Response.newBuilder().setHandshakeResponse(response.build()).build()); }
private void checkHandshake(final ChannelHandlerContext ctx, TSOProto.HandshakeRequest request) { TSOProto.HandshakeResponse.Builder response = TSOProto.HandshakeResponse.newBuilder(); if (request.hasClientCapabilities()) { response.setClientCompatible(true) .setServerCapabilities(TSOProto.Capabilities.newBuilder().build()); TSOChannelContext tsoCtx = new TSOChannelContext(); tsoCtx.setHandshakeComplete(); ctx.setAttachment(tsoCtx); } else { response.setClientCompatible(false); } ctx.getChannel().write(TSOProto.Response.newBuilder().setHandshakeResponse(response.build()).build()); }
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
public org.apache.omid.proto.TSOProto.HandshakeResponse build() { org.apache.omid.proto.TSOProto.HandshakeResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }