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

cloud.prefab.client.ConfigClient Maven / Gradle / Ivy

Go to download

API Client for https://prefab.cloud: rate limits, feature flags and semaphores as a service

The newest version!
package cloud.prefab.client;

import cloud.prefab.client.config.ConfigChangeListener;
import cloud.prefab.client.config.ConfigResolver;
import cloud.prefab.client.value.Value;
import cloud.prefab.domain.Prefab;
import java.util.Map;
import java.util.Optional;

public interface ConfigClient {
  ConfigResolver getResolver();

  Value liveString(String key);

  Value liveBoolean(String key);

  Value liveLong(String key);

  Value liveDouble(String key);

  Optional get(String key);

  Optional get(
    String key,
    Map properties
  );

  void upsert(String key, Prefab.ConfigValue configValue);

  void upsert(Prefab.Config config);

  boolean addConfigChangeListener(ConfigChangeListener configChangeListener);

  boolean removeConfigChangeListener(ConfigChangeListener configChangeListener);

  public enum Source {
    REMOTE_API_GRPC,
    STREAMING,
    REMOTE_CDN,
    LOCAL_ONLY,
    INIT_TIMEOUT,
    CLASSPATH,
    OVERRIDE,
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy