public interface UnlaunchClientBuilder
Implementations of this interface are mutable hence not thread-safe.
Modifier and Type | Method | Description |
---|---|---|
UnlaunchClient |
build() |
|
UnlaunchClientBuilder |
connectionTimeout(long timeout,
TimeUnit unit) |
Sets the default connect timeout for HTTP connections.
|
UnlaunchClientBuilder |
enableLazyLoading() |
|
UnlaunchClientBuilder |
eventsFlushInterval(long interval,
TimeUnit unit) |
This controls how frequently tracking events are sent to the server.
|
UnlaunchClientBuilder |
eventsQueueSize(int maxQueueSize) |
The maximum number of events to keep in memory.
|
UnlaunchClientBuilder |
host(String host) |
Unlaunch server to connect to for downloading feature flags, submitting events, etc.
|
UnlaunchClientBuilder |
metricsFlushInterval(long interval,
TimeUnit unit) |
The SDK periodically sends events like metrics and diagnostics data to our servers.
|
UnlaunchClientBuilder |
metricsQueueSize(int maxQueueSize) |
The maximum number of metrics (impressions) to keep in memory.
|
UnlaunchClientBuilder |
offlineMode() |
This is intended for testing purposes.
|
UnlaunchClientBuilder |
offlineModeWithLocalFeatures(String yamlFeaturesFilePath) |
This is intended for testing, including unit testing.
|
UnlaunchClientBuilder |
pollingInterval(long interval,
TimeUnit unit) |
This is for controlling how often the SDK download flags from the servers if the data has changed.
|
UnlaunchClientBuilder |
readTimeout(long timeout,
TimeUnit unit) |
Sets the default read timeout for HTTP connections.
|
UnlaunchClientBuilder |
sdkKey(String sdkKey) |
UnlaunchClient build()
UnlaunchClientBuilder sdkKey(String sdkKey)
UnlaunchClientBuilder offlineMode()
controlvariation and no data is sent to server.
For more information read this.
UnlaunchClientBuilder offlineModeWithLocalFeatures(String yamlFeaturesFilePath)
For more information and a template,read this
yamlFeaturesFilePath
- UnlaunchClientBuilder pollingInterval(long interval, TimeUnit unit)
The default interval is 60 seconds for production, and 20 seconds for non-production environments.
interval
- unit
- UnlaunchClientBuilder
UnlaunchClientBuilder connectionTimeout(long timeout, TimeUnit unit)
This is the time to establish the connection with remote Unlaunch servers.
The default value is 10 seconds. The minimum value allowed is 1 second.
timeout
- unit
- UnlaunchClientBuilder
UnlaunchClientBuilder readTimeout(long timeout, TimeUnit unit)
Specifies the time to wait for data to arrive after establishing the connection.
The default value is 10 seconds. The minimum value allowed is 1 second.
timeout
- unit
- UnlaunchClientBuilder
UnlaunchClientBuilder host(String host)
Use this if you are running Unlaunch backend service on-premise or are enterprise customer. The default value is https://api.unlaunch.io
host
- - Unlaunch backend service to connect toUnlaunchClientBuilder
UnlaunchClientBuilder metricsFlushInterval(long interval, TimeUnit unit)
When the SDK is shutdown using the UnlaunchClient.shutdown()
, all buffered data is automatically
sent.
The default value is 30 seconds for production and 10 seconds for non-production environments.
interval
- unit
- UnlaunchClientBuilder
UnlaunchClientBuilder eventsFlushInterval(long interval, TimeUnit unit)
When the SDK is shutdown using the UnlaunchClient.shutdown()
, all buffered data is automatically
sent.
The default value is 60 seconds for production and 15 seconds for non-production environments.
interval
- unit
- UnlaunchClientBuilder
UnlaunchClientBuilder eventsQueueSize(int maxQueueSize)
Events are sent to the server when either the queue size or events flush interval is reached, whichever comes first.
maxQueueSize
- UnlaunchClientBuilder
UnlaunchClientBuilder metricsQueueSize(int maxQueueSize)
Metrics are sent to the server when either the queue size or the flush interval is reached, whichever comes first.
maxQueueSize
- UnlaunchClientBuilder
UnlaunchClientBuilder enableLazyLoading()
Copyright © 2020 CodeAhoy. All rights reserved.