Class GrpcCallOptions.Builder

java.lang.Object
com.influxdb.v3.client.internal.GrpcCallOptions.Builder
Enclosing class:
GrpcCallOptions

public static final class GrpcCallOptions.Builder extends Object
Builder for GrpcCallOption.
  • 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

      public GrpcCallOptions.Builder withDeadline(@Nonnull io.grpc.Deadline deadline)
      Sets the absolute deadline for a rpc call.
      Parameters:
      deadline - The deadline
      Returns:
      this
    • withExecutor

      public GrpcCallOptions.Builder withExecutor(@Nonnull Executor executor)
      Sets an executor to be used instead of the default executor specified with ManagedChannelBuilder.executor(java.util.concurrent.Executor).
      Parameters:
      executor - The executor
      Returns:
      this
    • withCompressorName

      public GrpcCallOptions.Builder withCompressorName(@Nonnull String compressorName)
      Sets the compression to use for the call. The compressor must be a valid name known in the CompressorRegistry. 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

      public GrpcCallOptions.Builder 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

      public GrpcCallOptions.Builder withMaxInboundMessageSize(@Nonnull Integer maxInboundMessageSize)
      Sets the maximum allowed message size acceptable from the remote peer. If unset, this will default to the value set on the ManagedChannelBuilder.maxInboundMessageSize(int).
      Parameters:
      maxInboundMessageSize - The max receive message size
      Returns:
      this
    • withMaxOutboundMessageSize

      public GrpcCallOptions.Builder withMaxOutboundMessageSize(@Nonnull Integer maxOutboundMessageSize)
      Sets the maximum allowed message size acceptable sent to the remote peer.
      Parameters:
      maxOutboundMessageSize - The maximum message send size
      Returns:
      this
    • build

      public GrpcCallOptions build()
      Build an instance of GrpcCallOptions.
      Returns:
      the GrpcCallOptions instance