@Beta public static interface BrooklynObjectInternal.ConfigurationSupportInternal extends Configurable.ConfigurationSupport
Modifier and Type | Method and Description |
---|---|
java.util.Map<ConfigKey<?>,java.lang.Object> |
getAllLocalRaw()
Returns all config defined here, in
getLocalRaw(ConfigKey) format |
ConfigBag |
getBag()
Returns a read-only view of all the config key/value pairs on this entity, backed by a string-based map,
including config names that did not match anything on this entity.
|
ConfigMap.ConfigMapWithInheritance<? extends BrooklynObject> |
getInternalConfigMap()
This is currently the only way to get some rolled up collections and raw,
and also to test for the presence of a value (without any default).
|
ConfigBag |
getLocalBag()
Returns a read-only view of the local (i.e.
|
Maybe<java.lang.Object> |
getLocalRaw(ConfigKey.HasConfigKey<?> key) |
Maybe<java.lang.Object> |
getLocalRaw(ConfigKey<?> key)
Returns the uncoerced value for this config key, if available,
not following any inheritance chains and not taking any default.
|
<T> Maybe<T> |
getNonBlocking(ConfigKey.HasConfigKey<T> key) |
<T> Maybe<T> |
getNonBlocking(ConfigKey<T> key)
Attempts to coerce the value for this config key, if available,
taking a default and
absent if the uncoerced
cannot be resolved within a short timeframe. |
Maybe<java.lang.Object> |
getRaw(ConfigKey.HasConfigKey<?> key) |
Maybe<java.lang.Object> |
getRaw(ConfigKey<?> key)
Returns the uncoerced value for this config key, if available, not taking any default.
|
void |
putAll(java.util.Map<?,?> vals)
Adds keys or strings, making anonymous keys from strings; throws on other keys
|
void |
refreshInheritedConfig() |
void |
refreshInheritedConfigOfChildren() |
void |
removeAllLocalConfig()
Clears all local config, e.g.
|
void |
removeKey(ConfigKey<?> key) |
void |
removeKey(java.lang.String key) |
void |
set(java.util.Map<?,?> vals)
Deprecated.
since 0.10.0 use
putAll(Map) instead |
@Beta ConfigBag getBag()
ConfigKey.getInheritanceByContext()
cannot be respected
if an anonymous key (not matching a declared config key) is set but the
strongly typed key is accessed.
It does not identify the container where it is defined, meaning URLs and deferred config values cannot be resolved in the context of the appropriate ancestor.
For these reasons it is recommended to use a different accessor, and callers should be advised this beta method may be removed.
@Beta ConfigBag getLocalBag()
java.util.Map<ConfigKey<?>,java.lang.Object> getAllLocalRaw()
getLocalRaw(ConfigKey)
format@Beta Maybe<java.lang.Object> getRaw(ConfigKey<?> key)
Maybe.absent()
if the key is not explicitly set on this object or an ancestor.
See also {@link #getLocalRaw(ConfigKey).
@Beta Maybe<java.lang.Object> getRaw(ConfigKey.HasConfigKey<?> key)
#getRaw(ConfigKey)}
@Beta Maybe<java.lang.Object> getLocalRaw(ConfigKey<?> key)
Maybe.absent()
if the key is not explicitly set on this object.
See also {@link #getRaw(ConfigKey).
@Beta Maybe<java.lang.Object> getLocalRaw(ConfigKey.HasConfigKey<?> key)
#getLocalRaw(ConfigKey)}
@Beta <T> Maybe<T> getNonBlocking(ConfigKey<T> key)
absent
if the uncoerced
cannot be resolved within a short timeframe.
Note: if no value for the key is available, not even as a default,
this returns a Maybe.isPresent()
containing null
(following the semantics of Configurable.ConfigurationSupport.get(ConfigKey)
rather than getRaw(ConfigKey)
).
@Beta <T> Maybe<T> getNonBlocking(ConfigKey.HasConfigKey<T> key)
#getNonBlocking(ConfigKey)}
@Beta void putAll(java.util.Map<?,?> vals)
@Deprecated void set(java.util.Map<?,?> vals)
putAll(Map)
instead@Beta void removeKey(java.lang.String key)
@Beta void removeKey(ConfigKey<?> key)
@Beta void refreshInheritedConfig()
@Beta void refreshInheritedConfigOfChildren()
@Beta ConfigMap.ConfigMapWithInheritance<? extends BrooklynObject> getInternalConfigMap()
Configurable.ConfigurationSupport.findKeys(com.google.common.base.Predicate)
if that isn't too inefficient.void removeAllLocalConfig()