public final class ClientCalls extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static io.prometheus.client.Histogram |
asyncUnaryRequestCallDuration |
static io.prometheus.client.Histogram |
blockingUnaryRequestWaitDuration |
| 限定符和类型 | 方法和说明 |
|---|---|
static <ReqT,RespT> |
asyncBidiStreamingCall(io.grpc.ClientCall<ReqT,RespT> call,
io.grpc.stub.StreamObserver<RespT> responseObserver)
Executes a bidirectional-streaming call.
|
static <ReqT,RespT> |
asyncClientStreamingCall(io.grpc.ClientCall<ReqT,RespT> call,
io.grpc.stub.StreamObserver<RespT> responseObserver)
Executes a client-streaming call returning a
StreamObserver for the request messages. |
static <ReqT,RespT> |
asyncServerStreamingCall(io.grpc.ClientCall<ReqT,RespT> call,
ReqT req,
io.grpc.stub.StreamObserver<RespT> responseObserver)
Executes a server-streaming call with a response
StreamObserver. |
static <ReqT,RespT> |
asyncUnaryCall(io.grpc.ClientCall<ReqT,RespT> call,
ReqT req,
io.grpc.stub.StreamObserver<RespT> responseObserver)
Executes a unary call with a response
StreamObserver. |
static <ReqT,RespT> |
blockingServerStreamingCall(io.grpc.Channel channel,
io.grpc.MethodDescriptor<ReqT,RespT> method,
io.grpc.CallOptions callOptions,
ReqT req)
Executes a server-streaming call returning a blocking
Iterator over the response
stream. |
static <ReqT,RespT> |
blockingServerStreamingCall(io.grpc.ClientCall<ReqT,RespT> call,
ReqT req)
Executes a server-streaming call returning a blocking
Iterator over the response
stream. |
static <ReqT,RespT> |
blockingUnaryCall(io.grpc.Channel channel,
io.grpc.MethodDescriptor<ReqT,RespT> method,
io.grpc.CallOptions callOptions,
ReqT req)
Executes a unary call and blocks on the response.
|
static <ReqT,RespT> |
blockingUnaryCall(io.grpc.ClientCall<ReqT,RespT> call,
ReqT req)
Executes a unary call and blocks on the response.
|
static <ReqT,RespT> |
futureUnaryCall(io.grpc.ClientCall<ReqT,RespT> call,
ReqT req)
Executes a unary call and returns a
ListenableFuture to the response. |
public static final io.prometheus.client.Histogram asyncUnaryRequestCallDuration
public static final io.prometheus.client.Histogram blockingUnaryRequestWaitDuration
public static <ReqT,RespT> void asyncUnaryCall(io.grpc.ClientCall<ReqT,RespT> call,
ReqT req,
io.grpc.stub.StreamObserver<RespT> responseObserver)
StreamObserver. The call should not be
already started. After calling this method, call should no longer be used.
If the provided responseObserver is an instance of ClientResponseObserver,
beforeStart() will be called.
public static <ReqT,RespT> void asyncServerStreamingCall(io.grpc.ClientCall<ReqT,RespT> call,
ReqT req,
io.grpc.stub.StreamObserver<RespT> responseObserver)
StreamObserver. The call
should not be already started. After calling this method, call should no longer be
used.
If the provided responseObserver is an instance of ClientResponseObserver,
beforeStart() will be called.
public static <ReqT,RespT> io.grpc.stub.StreamObserver<ReqT> asyncClientStreamingCall(io.grpc.ClientCall<ReqT,RespT> call,
io.grpc.stub.StreamObserver<RespT> responseObserver)
StreamObserver for the request messages.
The call should not be already started. After calling this method, call should
no longer be used.
If the provided responseObserver is an instance of ClientResponseObserver,
beforeStart() will be called.
ClientCallStreamObserverpublic static <ReqT,RespT> io.grpc.stub.StreamObserver<ReqT> asyncBidiStreamingCall(io.grpc.ClientCall<ReqT,RespT> call,
io.grpc.stub.StreamObserver<RespT> responseObserver)
call should not be already started. After
calling this method, call should no longer be used.
If the provided responseObserver is an instance of ClientResponseObserver,
beforeStart() will be called.
ClientCallStreamObserverpublic static <ReqT,RespT> RespT blockingUnaryCall(io.grpc.ClientCall<ReqT,RespT> call,
ReqT req)
call should not be already
started. After calling this method, call should no longer be used.io.grpc.StatusRuntimeException - on errorpublic static <ReqT,RespT> RespT blockingUnaryCall(io.grpc.Channel channel,
io.grpc.MethodDescriptor<ReqT,RespT> method,
io.grpc.CallOptions callOptions,
ReqT req)
call should not be already
started. After calling this method, call should no longer be used.io.grpc.StatusRuntimeException - on errorpublic static <ReqT,RespT> Iterator<RespT> blockingServerStreamingCall(io.grpc.ClientCall<ReqT,RespT> call, ReqT req)
Iterator over the response
stream. The call should not be already started. After calling this method, call
should no longer be used.
The returned iterator may throw StatusRuntimeException on error.
public static <ReqT,RespT> Iterator<RespT> blockingServerStreamingCall(io.grpc.Channel channel, io.grpc.MethodDescriptor<ReqT,RespT> method, io.grpc.CallOptions callOptions, ReqT req)
Iterator over the response
stream. The call should not be already started. After calling this method, call
should no longer be used.
The returned iterator may throw StatusRuntimeException on error.
public static <ReqT,RespT> com.google.common.util.concurrent.ListenableFuture<RespT> futureUnaryCall(io.grpc.ClientCall<ReqT,RespT> call,
ReqT req)
ListenableFuture to the response. The call
should not be already started. After calling this method, call should no longer be
used.Copyright © 2023 PingCAP. All rights reserved.