Class TrackingPluginConfig.TrackingPluginConfigBuilder
java.lang.Object
growthbook.sdk.java.plugin.tracking.TrackingPluginConfig.TrackingPluginConfigBuilder
- Enclosing class:
- TrackingPluginConfig
-
Method Summary
Modifier and TypeMethodDescriptionMax events buffered before an eager flush.batchTimeout(Duration batchTimeout) Max time an event sits in the buffer before a scheduled flush.build()Client key (SDK connection key).closeTimeout(Duration closeTimeout) Time budget forGrowthBookTrackingPlugin.close().flushExecutor(Executor flushExecutor) Optional executor used to POST batches off the caller thread.httpClient(okhttp3.OkHttpClient httpClient) Optional HTTP client override.ingestorHost(String ingestorHost) Base URL of the ingest endpoint.toString()
-
Method Details
-
ingestorHost
Base URL of the ingest endpoint. Events POST to/events.- Returns:
this.
-
clientKey
Client key (SDK connection key). If blank the plugin becomes a no-op — it will not make HTTP requests butGrowthBookTrackingPlugin.close()still completes cleanly.- Returns:
this.
-
batchSize
Max events buffered before an eager flush.- Returns:
this.
-
batchTimeout
public TrackingPluginConfig.TrackingPluginConfigBuilder batchTimeout(@Nullable Duration batchTimeout) Max time an event sits in the buffer before a scheduled flush.- Returns:
this.
-
closeTimeout
public TrackingPluginConfig.TrackingPluginConfigBuilder closeTimeout(@Nullable Duration closeTimeout) Time budget forGrowthBookTrackingPlugin.close(). It bounds both the synchronous final POST (applied as an OkHttp call timeout on a client derived from the configured one) and the wait for any already-submitted async batches to complete.- Returns:
this.
-
httpClient
public TrackingPluginConfig.TrackingPluginConfigBuilder httpClient(@Nullable okhttp3.OkHttpClient httpClient) Optional HTTP client override. Defaults to a fresh OkHttpClient.- Returns:
this.
-
flushExecutor
public TrackingPluginConfig.TrackingPluginConfigBuilder flushExecutor(@Nullable Executor flushExecutor) Optional executor used to POST batches off the caller thread. Defaults to a single-thread daemon executor created by the plugin.- Returns:
this.
-
build
-
toString
-