cloud.prefab.client.ConfigClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of prefab-cloud-java Show documentation
Show all versions of prefab-cloud-java Show documentation
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,
}
}