public abstract class FDv2PollingSynchronizerBuilder extends java.lang.Object implements DataSourceBuilder<Synchronizer>, DiagnosticDescription
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
Example:
LDConfig config = new LDConfig.Builder("my-sdk-key")
.dataSystem(Components.dataSystem().custom()
.initializers(DataSystemComponents.pollingInitializer())
// DataSystemComponents.pollingSynchronizer() returns an instance of this builder.
.synchronizers(DataSystemComponents.streamingSynchronizer(),
DataSystemComponents.pollingSynchronizer()
.pollInterval(Duration.ofMinutes(10)))
.fDv1FallbackSynchronizer(DataSystemComponents.fDv1Polling()));
| Modifier and Type | Field and Description |
|---|---|
static java.time.Duration |
DEFAULT_POLL_INTERVAL
The default value for
pollInterval(Duration): 30 seconds. |
protected java.lang.String |
payloadFilter |
protected java.time.Duration |
pollInterval |
protected ServiceEndpoints |
serviceEndpointsOverride |
| Constructor and Description |
|---|
FDv2PollingSynchronizerBuilder() |
| Modifier and Type | Method and Description |
|---|---|
LDValue |
describeConfiguration(ClientContext context)
Used internally by the SDK to inspect the configuration.
|
FDv2PollingSynchronizerBuilder |
payloadFilter(java.lang.String payloadFilter)
Sets the Payload Filter that will be used to filter the objects (flags, segments, etc.)
from this synchronizer.
|
FDv2PollingSynchronizerBuilder |
pollInterval(java.time.Duration pollInterval)
Sets the interval at which the SDK will poll for feature flag updates.
|
FDv2PollingSynchronizerBuilder |
serviceEndpointsOverride(ServiceEndpointsBuilder serviceEndpointsOverride)
Sets overrides for the service endpoints.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildpublic static final java.time.Duration DEFAULT_POLL_INTERVAL
pollInterval(Duration): 30 seconds.protected java.time.Duration pollInterval
protected ServiceEndpoints serviceEndpointsOverride
protected java.lang.String payloadFilter
public FDv2PollingSynchronizerBuilder pollInterval(java.time.Duration pollInterval)
The default and minimum value is DEFAULT_POLL_INTERVAL. Values less than this will
be set to the default.
pollInterval - the polling intervalpublic FDv2PollingSynchronizerBuilder serviceEndpointsOverride(ServiceEndpointsBuilder serviceEndpointsOverride)
serviceEndpointsOverride - the service endpoints to override the base endpointspublic FDv2PollingSynchronizerBuilder payloadFilter(java.lang.String payloadFilter)
payloadFilter - the filter to be usedpublic LDValue describeConfiguration(ClientContext context)
DiagnosticDescriptiondescribeConfiguration in interface DiagnosticDescriptioncontext - allows access to the client configurationLDValue or null