/** * <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; } /**
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); } 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()); }