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

cloud.eppo.ConfigurationStore Maven / Gradle / Ivy

There is a newer version: 3.3.2
Show newest version
package cloud.eppo;

import cloud.eppo.api.Configuration;
import java.util.concurrent.CompletableFuture;
import org.jetbrains.annotations.NotNull;

/** Memory-only configuration store. */
public class ConfigurationStore implements IConfigurationStore {

  // this is the fallback value if no configuration is provided (i.e. by fetch or initial config).
  @NotNull private volatile Configuration configuration = Configuration.emptyConfig();

  public ConfigurationStore() {}

  public CompletableFuture saveConfiguration(@NotNull final Configuration configuration) {
    this.configuration = configuration;
    return CompletableFuture.completedFuture(null);
  }

  @NotNull public Configuration getConfiguration() {
    return configuration;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy