@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.vitess.proto.Vtrpc.CallerID parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.vitess.proto.Vtrpc.CallerID) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
public Builder mergeFrom(io.vitess.proto.Vtrpc.CallerID other) { if (other == io.vitess.proto.Vtrpc.CallerID.getDefaultInstance()) return this; if (!other.getPrincipal().isEmpty()) { principal_ = other.principal_; onChanged(); } if (!other.getComponent().isEmpty()) { component_ = other.component_; onChanged(); } if (!other.getSubcomponent().isEmpty()) { subcomponent_ = other.subcomponent_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * <pre> * principal is the effective user identifier. It is usually filled in * with whoever made the request to the appserver, if the request * came from an automated job or another system component. * If the request comes directly from the Internet, or if the Vitess client * takes action on its own accord, it is okay for this field to be absent. * </pre> * * <code>string principal = 1;</code> */ public Builder setPrincipalBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); principal_ = value; onChanged(); return this; }
/** * <pre> * principal is the effective user identifier. It is usually filled in * with whoever made the request to the appserver, if the request * came from an automated job or another system component. * If the request comes directly from the Internet, or if the Vitess client * takes action on its own accord, it is okay for this field to be absent. * </pre> * * <code>string principal = 1;</code> */ public Builder setPrincipalBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); principal_ = value; onChanged(); return this; }
/** * <pre> * principal is the effective user identifier. It is usually filled in * with whoever made the request to the appserver, if the request * came from an automated job or another system component. * If the request comes directly from the Internet, or if the Vitess client * takes action on its own accord, it is okay for this field to be absent. * </pre> * * <code>string principal = 1;</code> */ public Builder setPrincipal( java.lang.String value) { if (value == null) { throw new NullPointerException(); } principal_ = value; onChanged(); return this; } /**
/** * <pre> * component describes the running process of the effective caller. * It can for instance be the hostname:port of the servlet initiating the * database call, or the container engine ID used by the servlet. * </pre> * * <code>string component = 2;</code> */ public Builder setComponent( java.lang.String value) { if (value == null) { throw new NullPointerException(); } component_ = value; onChanged(); return this; } /**
/** * <pre> * component describes the running process of the effective caller. * It can for instance be the hostname:port of the servlet initiating the * database call, or the container engine ID used by the servlet. * </pre> * * <code>string component = 2;</code> */ public Builder setComponent( java.lang.String value) { if (value == null) { throw new NullPointerException(); } component_ = value; onChanged(); return this; } /**
/** * Create context used to create grpc client and executing query. * * @param username * @param timeout * @return */ public static Context createContext(String username, long timeout) { Context context = Context.getDefault(); Vtrpc.CallerID callerID = null; if (null != username) { callerID = Vtrpc.CallerID.newBuilder().setPrincipal(username).build(); } if (null != callerID) { context = context.withCallerId(callerID); } if (timeout > 0) { context = context.withDeadlineAfter(Duration.millis(timeout)); } return context; } }
/** * <pre> * principal is the effective user identifier. It is usually filled in * with whoever made the request to the appserver, if the request * came from an automated job or another system component. * If the request comes directly from the Internet, or if the Vitess client * takes action on its own accord, it is okay for this field to be absent. * </pre> * * <code>string principal = 1;</code> */ public Builder setPrincipal( java.lang.String value) { if (value == null) { throw new NullPointerException(); } principal_ = value; onChanged(); return this; } /**
/** * <pre> * subcomponent describes a component inisde the immediate caller which * is responsible for generating is request. Suggested values are a * servlet name or an API endpoint name. * </pre> * * <code>string subcomponent = 3;</code> */ public Builder setSubcomponentBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); subcomponent_ = value; onChanged(); return this; } @java.lang.Override
/** * <pre> * subcomponent describes a component inisde the immediate caller which * is responsible for generating is request. Suggested values are a * servlet name or an API endpoint name. * </pre> * * <code>string subcomponent = 3;</code> */ public Builder setSubcomponentBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); subcomponent_ = value; onChanged(); return this; } @java.lang.Override
/** * <pre> * subcomponent describes a component inisde the immediate caller which * is responsible for generating is request. Suggested values are a * servlet name or an API endpoint name. * </pre> * * <code>string subcomponent = 3;</code> */ public Builder setSubcomponent( java.lang.String value) { if (value == null) { throw new NullPointerException(); } subcomponent_ = value; onChanged(); return this; } /**
/** * <pre> * subcomponent describes a component inisde the immediate caller which * is responsible for generating is request. Suggested values are a * servlet name or an API endpoint name. * </pre> * * <code>string subcomponent = 3;</code> */ public Builder setSubcomponent( java.lang.String value) { if (value == null) { throw new NullPointerException(); } subcomponent_ = value; onChanged(); return this; } /**
/** * <pre> * component describes the running process of the effective caller. * It can for instance be the hostname:port of the servlet initiating the * database call, or the container engine ID used by the servlet. * </pre> * * <code>string component = 2;</code> */ public Builder setComponentBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); component_ = value; onChanged(); return this; }
/** * <pre> * component describes the running process of the effective caller. * It can for instance be the hostname:port of the servlet initiating the * database call, or the container engine ID used by the servlet. * </pre> * * <code>string component = 2;</code> */ public Builder setComponentBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); component_ = value; onChanged(); return this; }
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.vitess.proto.Vtrpc.CallerID parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.vitess.proto.Vtrpc.CallerID) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * <pre> * principal is the effective user identifier. It is usually filled in * with whoever made the request to the appserver, if the request * came from an automated job or another system component. * If the request comes directly from the Internet, or if the Vitess client * takes action on its own accord, it is okay for this field to be absent. * </pre> * * <code>string principal = 1;</code> */ public Builder clearPrincipal() { principal_ = getDefaultInstance().getPrincipal(); onChanged(); return this; } /**
public Builder mergeFrom(io.vitess.proto.Vtrpc.CallerID other) { if (other == io.vitess.proto.Vtrpc.CallerID.getDefaultInstance()) return this; if (!other.getPrincipal().isEmpty()) { principal_ = other.principal_; onChanged(); } if (!other.getComponent().isEmpty()) { component_ = other.component_; onChanged(); } if (!other.getSubcomponent().isEmpty()) { subcomponent_ = other.subcomponent_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * <pre> * subcomponent describes a component inisde the immediate caller which * is responsible for generating is request. Suggested values are a * servlet name or an API endpoint name. * </pre> * * <code>string subcomponent = 3;</code> */ public Builder clearSubcomponent() { subcomponent_ = getDefaultInstance().getSubcomponent(); onChanged(); return this; } /**
/** * <pre> * component describes the running process of the effective caller. * It can for instance be the hostname:port of the servlet initiating the * database call, or the container engine ID used by the servlet. * </pre> * * <code>string component = 2;</code> */ public Builder clearComponent() { component_ = getDefaultInstance().getComponent(); onChanged(); return this; } /**