brooklyn.config.ConfigMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of brooklyn-utils-common Show documentation
Show all versions of brooklyn-utils-common Show documentation
Utility classes and methods developed for Brooklyn but not dependendent on Brooklyn or much else
package brooklyn.config;
import java.util.Map;
import brooklyn.config.ConfigKey.HasConfigKey;
import com.google.common.base.Predicate;
public interface ConfigMap {
/** @see #getConfig(ConfigKey, Object), with default value as per the key, or null */
public T getConfig(ConfigKey key);
/** @see #getConfig(ConfigKey, Object), with default value as per the key, or null */
public T getConfig(HasConfigKey key);
/** @see #getConfig(ConfigKey, Object), with provided default value if not set */
public T getConfig(HasConfigKey key, T defaultValue);
/** returns value stored against the given key,
* resolved (if it is a Task, possibly blocking), and coerced to the appropriate type,
* or given default value if not set,
* unless the default value is null in which case it returns the default*/
public T getConfig(ConfigKey key, T defaultValue);
/** returns the value stored against the given key,
* not any default,
* not resolved (and guaranteed non-blocking)
* and not type-coerced
* @return raw, unresolved, uncoerced value of key in map, locally or inherited, but not any default on the key
*/
public Object getRawConfig(ConfigKey> key);
/** returns a map of all config keys to their raw (unresolved+uncoerced) contents */
public Map,Object> getAllConfig();
/** returns submap matching the given filter predicate; see ConfigPredicates for common predicates */
public ConfigMap submap(Predicate> filter);
/** returns a read-only map view which has string keys (corresponding to the config key names);
* callers encouraged to use the typed keys (and so not use this method),
* but in some compatibility areas having a Properties-like view is useful */
public Map asMapWithStringKeys();
public int size();
public boolean isEmpty();
}