brooklyn.config
Interface ConfigMap

All Known Subinterfaces:
StringConfigMap

public interface ConfigMap


Method Summary
 Map<String,Object> asMapWithStringKeys()
          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
 Map<ConfigKey<?>,Object> getAllConfig()
          returns a map of all config keys to their raw (unresolved+uncoerced) contents
<T> T
getConfig(ConfigKey.HasConfigKey<T> key)
           
<T> T
getConfig(ConfigKey.HasConfigKey<T> key, T defaultValue)
           
<T> T
getConfig(ConfigKey<T> key)
           
<T> T
getConfig(ConfigKey<T> 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
 Object getRawConfig(ConfigKey<?> key)
          returns the value stored against the given key, not any default, not resolved (and guaranteed non-blocking) and not type-coerced
 ConfigMap submap(com.google.common.base.Predicate<ConfigKey<?>> filter)
          returns submap matching the given filter predicate; see ConfigPredicates for common predicates
 

Method Detail

getConfig

<T> T getConfig(ConfigKey<T> key)
See Also:
#getConfig(ConfigKey, Object), with default value as per the key, or null

getConfig

<T> T getConfig(ConfigKey.HasConfigKey<T> key)
See Also:
#getConfig(ConfigKey, Object), with default value as per the key, or null

getConfig

<T> T getConfig(ConfigKey.HasConfigKey<T> key,
                T defaultValue)
See Also:
#getConfig(ConfigKey, Object), with provided default value if not set

getConfig

<T> T getConfig(ConfigKey<T> 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


getRawConfig

Object getRawConfig(ConfigKey<?> key)
returns the value stored against the given key, not any default, not resolved (and guaranteed non-blocking) and not type-coerced

Returns:
raw, unresolved, uncoerced value of key in map, locally or inherited, but not any default on the key

getAllConfig

Map<ConfigKey<?>,Object> getAllConfig()
returns a map of all config keys to their raw (unresolved+uncoerced) contents


submap

ConfigMap submap(com.google.common.base.Predicate<ConfigKey<?>> filter)
returns submap matching the given filter predicate; see ConfigPredicates for common predicates


asMapWithStringKeys

Map<String,Object> asMapWithStringKeys()
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



Copyright © 2013. All Rights Reserved.