Package com.gencior.triton.config
Class TritonClientConfig.Builder
java.lang.Object
com.gencior.triton.config.TritonClientConfig.Builder
- Enclosing class:
TritonClientConfig
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 Summary
Constructors -
Method Summary
-
Constructor Details
-
Builder
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
Sets whether verbose logging should be enabled for this client.- Parameters:
verbose-trueto enable verbose logging,falseotherwise- Returns:
- this builder instance for method chaining
-
timeout
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
Builds and returns a newTritonClientConfiginstance with the configured settings.- Returns:
- a new TritonClientConfig instance
- Throws:
IllegalArgumentException- if the URL is null or emptyIllegalArgumentException- if the timeout is not greater than 0
-