public interface DataSourceUpdateSinkV2 extends TransactionalDataSourceUpdateSink
This interface extends TransactionalDataSourceUpdateSink to add status tracking
and status update capabilities required for FDv2 data sources.
This interface 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
TransactionalDataSourceUpdateSink,
DataSource| Modifier and Type | Method and Description |
|---|---|
DataStoreStatusProvider |
getDataStoreStatusProvider()
An object that provides status tracking for the data store, if applicable.
|
void |
updateStatus(DataSourceStatusProvider.State newState,
DataSourceStatusProvider.ErrorInfo newError)
Informs the SDK of a change in the data source's status.
|
applyDataStoreStatusProvider getDataStoreStatusProvider()
This may be useful if the data source needs to be aware of storage problems that might require it to take some special action: for instance, if a database outage may have caused some data to be lost and therefore the data should be re-requested from LaunchDarkly.
DataStoreStatusProvidervoid updateStatus(DataSourceStatusProvider.State newState, DataSourceStatusProvider.ErrorInfo newError)
Data source implementations should use this method if they have any concept of being in a valid state, a temporarily disconnected state, or a permanently stopped state.
If newState is different from the previous state, and/or newError is non-null, the
SDK will start returning the new status (adding a timestamp for the change) from
DataSourceStatusProvider.getStatus(), and will trigger status change events to any
registered listeners.
A special case is that if newState is DataSourceStatusProvider.State.INTERRUPTED,
but the previous state was DataSourceStatusProvider.State.INITIALIZING, the state will
remain at DataSourceStatusProvider.State.INITIALIZING because DataSourceStatusProvider.State.INTERRUPTED
is only meaningful after a successful startup.
newState - the data source statenewError - information about a new error, if anyDataSourceStatusProvider