Package io.grpc

Class MethodDescriptor.Builder<ReqT,​RespT>

    • Method Detail

      • setSchemaDescriptor

        public MethodDescriptor.Builder<ReqT,​RespT> setSchemaDescriptor​(@Nullable
                                                                              java.lang.Object schemaDescriptor)
        Sets the schema descriptor for this builder. A schema descriptor is an object that is not used by gRPC core but includes information related to the methods. The type of the object is specific to the consumer, so both the code calling this and the code calling MethodDescriptor.getSchemaDescriptor() must coordinate.
        schemaDescriptor - an object that describes the service structure. Should be immutable.
      • setIdempotent

        public MethodDescriptor.Builder<ReqT,​RespT> setIdempotent​(boolean idempotent)
        Sets whether the method is idempotent. If true, calling this method more than once doesn't have additional side effects. If false, method is also not safe. Note that implies calling builder.setIdempotent(false).setIdempotent(true) will leave isSafe() == false.
      • setSafe

        public MethodDescriptor.Builder<ReqT,​RespT> setSafe​(boolean safe)
        Sets whether this method is safe. If true, calling this method any number of times doesn't have side effects. If true, method is also idempotent. Note that implies calling builder.setSafe(true).setSafe(false) will leave isIdempotent() == true.
      • setSampledToLocalTracing

        public MethodDescriptor.Builder<ReqT,​RespT> setSampledToLocalTracing​(boolean value)
        Sets whether RPCs for this method may be sampled into the local tracing store. If true, sampled traces of this method may be kept in memory by tracing libraries.