public abstract class FDv2StreamingSynchronizerBuilder 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.streamingSynchronizer() returns an instance of this builder.
.synchronizers(DataSystemComponents.streamingSynchronizer()
.initialReconnectDelay(Duration.ofSeconds(5)), DataSystemComponents.pollingSynchronizer())
.fDv1FallbackSynchronizer(DataSystemComponents.fDv1Polling()));
| Modifier and Type | Field and Description |
|---|---|
static java.time.Duration |
DEFAULT_INITIAL_RECONNECT_DELAY
The default value for
initialReconnectDelay(Duration): 1000 milliseconds. |
protected java.time.Duration |
initialReconnectDelay |
protected java.lang.String |
payloadFilter |
protected ServiceEndpoints |
serviceEndpointsOverride |
| Constructor and Description |
|---|
FDv2StreamingSynchronizerBuilder() |
| Modifier and Type | Method and Description |
|---|---|
LDValue |
describeConfiguration(ClientContext context)
Used internally by the SDK to inspect the configuration.
|
FDv2StreamingSynchronizerBuilder |
initialReconnectDelay(java.time.Duration initialReconnectDelay)
Sets the initial reconnect delay for the streaming connection.
|
FDv2StreamingSynchronizerBuilder |
payloadFilter(java.lang.String payloadFilter)
Sets the Payload Filter that will be used to filter the objects (flags, segments, etc.)
from this synchronizer.
|
FDv2StreamingSynchronizerBuilder |
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_INITIAL_RECONNECT_DELAY
initialReconnectDelay(Duration): 1000 milliseconds.protected java.time.Duration initialReconnectDelay
protected ServiceEndpoints serviceEndpointsOverride
protected java.lang.String payloadFilter
public FDv2StreamingSynchronizerBuilder initialReconnectDelay(java.time.Duration initialReconnectDelay)
The streaming service uses a backoff algorithm (with jitter) every time the connection needs to be reestablished. The delay for the first reconnection will start near this value, and then increase exponentially for any subsequent connection failures.
The default value is DEFAULT_INITIAL_RECONNECT_DELAY.
initialReconnectDelay - the reconnect time base valuepublic FDv2StreamingSynchronizerBuilder serviceEndpointsOverride(ServiceEndpointsBuilder serviceEndpointsOverride)
serviceEndpointsOverride - the service endpoints to override the base endpointspublic FDv2StreamingSynchronizerBuilder 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