Class FDv2PollingDataSourceBuilder
Contains methods for configuring the polling data source.
This class is not stable, and not subject to any backwards compatibility guarantees or semantic versioning. It is not suitable for production usage. Do not use it. You have been warned.
Inherited Members
Namespace: LaunchDarkly.Sdk.Server.Integrations
Assembly: LaunchDarkly.ServerSdk.dll
Syntax
public sealed class FDv2PollingDataSourceBuilder : IComponentConfigurer<IDataSource>, IDiagnosticDescription
Examples
var config = Configuration.Builder("my-sdk-key")
.DataSystem(Components.DataSystem().Custom()
// DataSystemComponents.Polling returns an instance to this builder.
.Initializers(DataSystemComponents.Polling()
PollInterval(TimeSpan.FromMinutes(10))
.Synchronizers(DataSystemComponents.Streaming(), DataSystemComponents.Polling())
.FDv1FallbackSynchronizer(DataSystemComponents.FDv1Polling()));
Constructors
View SourceFDv2PollingDataSourceBuilder()
Declaration
public FDv2PollingDataSourceBuilder()
Fields
| Edit this page View SourceDefaultPollInterval
The default value for PollInterval(TimeSpan): 30 seconds.
Declaration
public static readonly TimeSpan DefaultPollInterval
Field Value
| Type | Description |
|---|---|
| TimeSpan |
Methods
| Edit this page View SourceBuild(LdClientContext)
Called internally by the SDK to create an implementation instance. Applications should not need to call this method.
Declaration
public IDataSource Build(LdClientContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| LdClientContext | context | provides configuration properties and other components from the current SDK client instance |
Returns
| Type | Description |
|---|---|
| IDataSource | a instance of the component type |
DescribeConfiguration(LdClientContext)
Called internally by the SDK to inspect the configuration. Applications do not need to call this method.
Declaration
public LdValue DescribeConfiguration(LdClientContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| LdClientContext | context | SDK configuration/component information |
Returns
| Type | Description |
|---|---|
| LdValue | a JSON value |
PollInterval(TimeSpan)
Sets the interval at which the SDK will poll for feature flag updates.
Declaration
public FDv2PollingDataSourceBuilder PollInterval(TimeSpan pollInterval)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | pollInterval | the polling interval |
Returns
| Type | Description |
|---|---|
| FDv2PollingDataSourceBuilder | the builder |
Remarks
The default and minimum value is DefaultPollInterval. Values less than this will be set to the default.
ServiceEndpointsOverride(ServiceEndpointsBuilder)
Sets overrides for the service endpoints. In typical usage, the data source will use the commonly defined service endpoints, but for cases where they need to be controlled at the source level, this method can be used. This data source will only use the endpoints applicable to it.
Declaration
public FDv2PollingDataSourceBuilder ServiceEndpointsOverride(ServiceEndpointsBuilder serviceEndpointsOverride)
Parameters
| Type | Name | Description |
|---|---|---|
| ServiceEndpointsBuilder | serviceEndpointsOverride | the service endpoints to override the base endpoints |
Returns
| Type | Description |
|---|---|
| FDv2PollingDataSourceBuilder | the builder |