Class DataSourceBuildInputs
java.lang.Object
com.launchdarkly.sdk.android.subsystems.DataSourceBuildInputs
Build inputs (dependencies and configuration) provided to
DataSourceBuilder.build(DataSourceBuildInputs) when constructing
FDv2 initializers and synchronizers.
This class is not stable, and not subject to any backwards compatibility guarantees or semantic versioning. It is in early access. If you want access to this feature please join the EAP. https://launchdarkly.com/docs/sdk/features/data-saving-mode
This consolidates the parameters needed to construct data source components,
providing a narrower contract than the full ClientContext.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDataSourceBuildInputs(LDContext evaluationContext, ServiceEndpoints serviceEndpoints, HttpConfiguration http, boolean evaluationReasons, SelectorSource selectorSource, ScheduledExecutorService sharedExecutor, File cacheDir, LDLogger baseLogger) Constructs a DataSourceBuildInputs. -
Method Summary
Modifier and TypeMethodDescriptionReturns the base logger instance.Returns the platform's cache directory for HTTP-level caching.Returns the current evaluation context.getHttp()Returns the HTTP configuration.Returns the selector source for obtaining the current FDv2 selector.Returns the service endpoint URIs.Returns the shared executor service for scheduling tasks.booleanReturns whether evaluation reasons are enabled.
-
Constructor Details
-
DataSourceBuildInputs
public DataSourceBuildInputs(LDContext evaluationContext, ServiceEndpoints serviceEndpoints, HttpConfiguration http, boolean evaluationReasons, SelectorSource selectorSource, ScheduledExecutorService sharedExecutor, @NonNull File cacheDir, LDLogger baseLogger) Constructs a DataSourceBuildInputs.- Parameters:
evaluationContext- the current evaluation contextserviceEndpoints- the service endpoint URIshttp- the HTTP configurationevaluationReasons- whether evaluation reasons are enabledselectorSource- the source for obtaining the current selectorsharedExecutor- shared executor for scheduling tasks; owned and shut down by the calling data source, so components must not shut it downcacheDir- the platform's cache directory for HTTP-level cachingbaseLogger- the base logger instance
-
-
Method Details
-
getEvaluationContext
Returns the current evaluation context.- Returns:
- the evaluation context
-
getServiceEndpoints
Returns the service endpoint URIs.- Returns:
- the service endpoints
-
getHttp
Returns the HTTP configuration.- Returns:
- the HTTP configuration
-
isEvaluationReasons
public boolean isEvaluationReasons()Returns whether evaluation reasons are enabled.- Returns:
- true if evaluation reasons are enabled
-
getSelectorSource
Returns the selector source for obtaining the current FDv2 selector.- Returns:
- the selector source
-
getCacheDir
Returns the platform's cache directory for HTTP-level caching.- Returns:
- the cache directory
-
getBaseLogger
Returns the base logger instance.- Returns:
- the base logger
-