Package io.streamnative.oxia.client.api
Interface OxiaClientBuilder
public interface OxiaClientBuilder
-
Method Summary
Modifier and TypeMethodDescriptionauthentication(Authentication authentication) authentication(String authPluginClassName, String authParamsString) Configure the authentication plugin and its parameters.batchLinger(Duration batchLinger) clientIdentifier(String clientIdentifier) clientIdentifier(Supplier<String> clientIdentifier) connectionBackoff(Duration minDelay, Duration maxDelay) connectionKeepAliveTime(Duration connectionKeepAlive) connectionKeepAliveTimeout(Duration connectionKeepAliveTimeout) static OxiaClientBuilderenableTls(boolean enableTls) loadConfig(File configFile) Load the configuration from the specified configuration file.loadConfig(String configPath) Load the configuration from the specified configuration file.loadConfig(Properties properties) Load the configuration from the specified properties.maxConnectionPerNode(int connections) maxRequestsPerBatch(int maxRequestsPerBatch) openTelemetry(io.opentelemetry.api.OpenTelemetry openTelemetry) requestTimeout(Duration requestTimeout) sessionTimeout(Duration sessionTimeout)
-
Method Details
-
create
-
syncClient
- Throws:
OxiaException
-
asyncClient
CompletableFuture<AsyncOxiaClient> asyncClient() -
requestTimeout
-
batchLinger
-
maxRequestsPerBatch
-
namespace
-
sessionTimeout
-
clientIdentifier
-
clientIdentifier
-
openTelemetry
-
authentication
-
connectionBackoff
-
maxConnectionPerNode
-
connectionKeepAliveTimeout
-
connectionKeepAliveTime
-
authentication
OxiaClientBuilder authentication(String authPluginClassName, String authParamsString) throws UnsupportedAuthenticationException Configure the authentication plugin and its parameters.- Parameters:
authPluginClassName- the class name of the authentication pluginauthParamsString- the parameters of the authentication plugin- Returns:
- the OxiaClientBuilder instance
- Throws:
UnsupportedAuthenticationException- if the authentication plugin is not supported
-
enableTls
-
loadConfig
Load the configuration from the specified configuration file.- Parameters:
configPath- the path of the configuration file- Returns:
- the OxiaClientBuilder instance
-
loadConfig
Load the configuration from the specified configuration file.- Parameters:
configFile- the configuration file- Returns:
- the OxiaClientBuilder instance
-
loadConfig
Load the configuration from the specified properties.- Parameters:
properties- the properties- Returns:
- the OxiaClientBuilder instance
-