All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.launchdarkly.sdk.server.interfaces.DataSource Maven / Gradle / Ivy

There is a newer version: 7.5.0
Show newest version
package com.launchdarkly.sdk.server.interfaces;

import java.io.Closeable;
import java.io.IOException;
import java.util.concurrent.Future;

/**
 * Interface for an object that receives updates to feature flags, user segments, and anything
 * else that might come from LaunchDarkly, and passes them to a {@link DataStore}.
 * 

* The standard implementations are: *

    *
  • {@link com.launchdarkly.sdk.server.Components#streamingDataSource()} (the default), which * maintains a streaming connection to LaunchDarkly; *
  • {@link com.launchdarkly.sdk.server.Components#pollingDataSource()}, which polls for * updates at regular intervals; *
  • {@link com.launchdarkly.sdk.server.Components#externalUpdatesOnly()}, which does nothing * (on the assumption that another process will update the data store); *
  • {@link com.launchdarkly.sdk.server.integrations.FileData}, which reads flag data from * the filesystem. *
* * @since 5.0.0 */ public interface DataSource extends Closeable { /** * Starts the client. * @return {@link Future}'s completion status indicates the client has been initialized. */ Future start(); /** * Returns true once the client has been initialized and will never return false again. * @return true if the client has been initialized */ boolean isInitialized(); /** * Tells the component to shut down and release any resources it is using. * @throws IOException if there is an error while closing */ void close() throws IOException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy