Class TritonClientConfig.Builder

java.lang.Object
com.gencior.triton.config.TritonClientConfig.Builder
Enclosing class:
TritonClientConfig

public static class TritonClientConfig.Builder extends Object
Builder class for constructing TritonClientConfig instances.

This builder follows the fluent builder pattern, allowing method chaining to construct configuration objects with a clean and readable syntax.

Example:


 TritonClientConfig config = new TritonClientConfig.Builder("http://localhost:8000")
     .verbose(true)
     .timeout(30000)
     .build();
 
Since:
1.0.0
  • Constructor Details

    • Builder

      public Builder(String url)
      Creates a new builder for TritonClientConfig.
      Parameters:
      url - the base URL of the Triton Inference Server (required) Examples: "http://localhost:8000", "grpc://localhost:8001"
      Throws:
      IllegalArgumentException - if url is null or empty
  • Method Details

    • verbose

      public TritonClientConfig.Builder verbose(boolean verbose)
      Sets whether verbose logging should be enabled for this client.
      Parameters:
      verbose - true to enable verbose logging, false otherwise
      Returns:
      this builder instance for method chaining
    • timeout

      public TritonClientConfig.Builder timeout(long timeoutMs)
      Sets the default timeout for client operations.
      Parameters:
      timeoutMs - the timeout in milliseconds (must be greater than 0)
      Returns:
      this builder instance for method chaining
      Throws:
      IllegalArgumentException - if timeoutMs is not greater than 0 during build()
    • build

      public TritonClientConfig build()
      Builds and returns a new TritonClientConfig instance with the configured settings.
      Returns:
      a new TritonClientConfig instance
      Throws:
      IllegalArgumentException - if the URL is null or empty
      IllegalArgumentException - if the timeout is not greater than 0