Package com.snowflake.ingest.streaming
Class SnowflakeStreamingIngestClientFactory.Builder
java.lang.Object
com.snowflake.ingest.streaming.SnowflakeStreamingIngestClientFactory.Builder
- Enclosing class:
- SnowflakeStreamingIngestClientFactory
Builder class to build a
SnowflakeStreamingIngestClient-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aSnowflakeStreamingIngestClientwith the provided parameterssetExecutorService(ExecutorService executorService) Set an optional ExecutorService for asynchronous operations.setParameterOverrides(Map<String, Object> parameterOverrides) Set the parameter overrides for the clientsetProperties(Properties prop) Set the properties for the client
-
Method Details
-
setProperties
Set the properties for the client- Parameters:
prop- the properties. Includesapplicationkey that sets the partner app name in the User-Agent header. Format: 1–64 visible ASCII chars (0x21–0x7E), excluding(,),\. Regex:^[!-'*-\[-\]-~]{1,64}$- Returns:
- the builder
-
setParameterOverrides
public SnowflakeStreamingIngestClientFactory.Builder setParameterOverrides(Map<String, Object> parameterOverrides) Set the parameter overrides for the client- Parameters:
parameterOverrides- the parameter overrides- Returns:
- the builder
-
setExecutorService
public SnowflakeStreamingIngestClientFactory.Builder setExecutorService(ExecutorService executorService) Set an optional ExecutorService for asynchronous operations.If not provided, the client will create and manage its own ExecutorService internally. The provided executor will be used for operations like
waitForCommitthat require background task execution.Important: If you provide your own executor, you are responsible for shutting it down. The client will not automatically shut down user-provided executors when
close()is called.- Parameters:
executorService- the ExecutorService to use for async operations- Returns:
- the builder
-
build
Builds aSnowflakeStreamingIngestClientwith the provided parameters- Returns:
- a new
SnowflakeStreamingIngestClient
-