Package com.influxdb.v3.client.internal
Class GrpcCallOptions.Builder
java.lang.Object
com.influxdb.v3.client.internal.GrpcCallOptions.Builder
- Enclosing class:
- GrpcCallOptions
Builder for GrpcCallOption.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build an instance of GrpcCallOptions.withCompressorName
(String compressorName) Sets the compression to use for the call.withDeadline
(io.grpc.Deadline deadline) Sets the absolute deadline for a rpc call.withExecutor
(Executor executor) Sets anexecutor
to be used instead of the default executor specified withManagedChannelBuilder.executor(java.util.concurrent.Executor)
.withMaxInboundMessageSize
(Integer maxInboundMessageSize) Sets the maximum allowed message size acceptable from the remote peer.withMaxOutboundMessageSize
(Integer maxOutboundMessageSize) Sets the maximum allowed message size acceptable sent to the remote peer.Enables 'wait for ready' for the call.
-
Constructor Details
-
Builder
public Builder()Constructs a new instance of the Builder with default values. By default, the maximum inbound message size is set to the largest possible value.
-
-
Method Details
-
withDeadline
Sets the absolute deadline for a rpc call.- Parameters:
deadline
- The deadline- Returns:
- this
-
withExecutor
Sets anexecutor
to be used instead of the default executor specified withManagedChannelBuilder.executor(java.util.concurrent.Executor)
.- Parameters:
executor
- The executor- Returns:
- this
-
withCompressorName
Sets the compression to use for the call. The compressor must be a valid name known in theCompressorRegistry
. By default, the "gzip" compressor will be available.It is only safe to call this if the server supports the compression format chosen. There is no negotiation performed; if the server does not support the compression chosen, the call will fail.
- Parameters:
compressorName
- The compressor name- Returns:
- this
-
withWaitForReady
Enables 'wait for ready' for the call. Wait-for-ready queues the RPC until a connection is available. This may dramatically increase the latency of the RPC, but avoids failing "unnecessarily." The default queues the RPC until an attempt to connect has completed, but fails RPCs without sending them if unable to connect.- Returns:
- this
-
withMaxInboundMessageSize
Sets the maximum allowed message size acceptable from the remote peer. If unset, this will default to the value set on theManagedChannelBuilder.maxInboundMessageSize(int)
.- Parameters:
maxInboundMessageSize
- The max receive message size- Returns:
- this
-
withMaxOutboundMessageSize
Sets the maximum allowed message size acceptable sent to the remote peer.- Parameters:
maxOutboundMessageSize
- The maximum message send size- Returns:
- this
-
build
Build an instance of GrpcCallOptions.- Returns:
- the GrpcCallOptions instance
-