public interface ClusterConfigService
Modifier and Type | Method and Description |
---|---|
<T> T |
get(Class<T> type)
Retrieve Java class of a certain type from the cluster configuration.
|
<T> T |
get(String key,
Class<T> type)
Retrieve Java class of a certain type for the given key from the cluster configuration.
|
<T> T |
getOrDefault(Class<T> type,
T defaultValue)
Retrieve Java class of a certain type from the cluster configuration or return a default value
in case that failed.
|
Set<Class<?>> |
list()
List all classes of configuration beans in the database.
|
<T> int |
remove(Class<T> type)
Remove a configuration bean from the cluster configuration.
|
<T> void |
write(T payload)
Write a configuration bean to the cluster configuration.
|
<T> T get(Class<T> type)
T
- The type of the Java configuration bean.type
- The Class
of the Java configuration bean to retrieve.null
if it couldn't be retrieved.<T> T get(String key, Class<T> type)
T
- The type of the Java configuration bean.key
- The key that is used to find the cluster config object in the database.type
- The Class
of the Java configuration bean to retrieve.null
if it couldn't be retrieved.<T> T getOrDefault(Class<T> type, T defaultValue)
T
- The type of the Java configuration bean.type
- The Class
of the Java configuration bean to retrieve.defaultValue
- An instance of T
which is returned as default value.<T> void write(T payload)
T
- The type of the Java configuration bean.payload
- The object to write to the cluster configuration. Must be serializable by Jackson!<T> int remove(Class<T> type)
type
- The Class
of the Java configuration bean to remove.Copyright © 2012–2018 Graylog, Inc.. All rights reserved.