public interface ConfiguredObject<X extends ConfiguredObject<X>>
Modifier and Type | Field and Description |
---|---|
static String |
CONTEXT |
static String |
CREATED_BY |
static String |
CREATED_TIME |
static String |
DESCRIPTION |
static String |
DESIRED_STATE |
static String |
DURABLE |
static String |
ID |
static String |
LAST_UPDATED_BY |
static String |
LAST_UPDATED_TIME |
static String |
LIFETIME_POLICY |
static String |
NAME |
static String |
OVER_SIZED_ATTRIBUTE_ALTERNATIVE_TEXT |
static String |
STATE |
static String |
TYPE |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ConfigurationChangeListener listener)
Add a listener which will be informed of all changes to this configuration object
|
ConfiguredObjectRecord |
asObjectRecord() |
void |
close() |
com.google.common.util.concurrent.ListenableFuture<Void> |
closeAsync() |
<C extends ConfiguredObject> |
createChild(Class<C> childClass,
Map<String,Object> attributes,
ConfiguredObject... otherParents) |
<C extends ConfiguredObject> |
createChildAsync(Class<C> childClass,
Map<String,Object> attributes,
ConfiguredObject... otherParents) |
void |
decryptSecrets() |
void |
delete() |
com.google.common.util.concurrent.ListenableFuture<Void> |
deleteAsync() |
<C extends ConfiguredObject<C>> |
findConfiguredObject(Class<C> clazz,
String name) |
Map<String,Object> |
getActualAttributes()
Return the map containing only explicitly set attributes
|
<C extends ConfiguredObject> |
getAttainedChildById(Class<C> childClass,
UUID id) |
<C extends ConfiguredObject> |
getAttainedChildByName(Class<C> childClass,
String name) |
Object |
getAttribute(String name)
Return the value for the given attribute name.
|
Collection<String> |
getAttributeNames()
Get the names of attributes that are set on this object
Note that the returned collection is correct at the time the method is called, but will not reflect future
additions or removals when they occur
|
Class<? extends ConfiguredObject> |
getCategoryClass() |
<C extends ConfiguredObject> |
getChildById(Class<C> clazz,
UUID id) |
<C extends ConfiguredObject> |
getChildByName(Class<C> clazz,
String name) |
TaskExecutor |
getChildExecutor() |
<C extends ConfiguredObject> |
getChildren(Class<C> clazz)
Return children of the ConfiguredObject of the given class
|
Map<String,String> |
getContext() |
Set<String> |
getContextKeys(boolean excludeSystem) |
<T> T |
getContextValue(Class<T> clazz,
String propertyName) |
<T> T |
getContextValue(Class<T> clazz,
Type t,
String propertyName) |
String |
getCreatedBy() |
long |
getCreatedTime() |
String |
getDescription() |
State |
getDesiredState()
Get the desired state of the object.
|
UUID |
getId()
Get the universally unique identifier for the object
|
long |
getLastOpenedTime() |
String |
getLastUpdatedBy() |
long |
getLastUpdatedTime() |
LifetimePolicy |
getLifetimePolicy()
Return the lifetime policy for the object
|
Model |
getModel() |
String |
getName()
Get the name of the object
|
ConfiguredObjectFactory |
getObjectFactory() |
<T extends ConfiguredObject> |
getParent(Class<T> clazz)
Get the parent of the given type for this object
|
State |
getState()
Get the actual state of the object.
|
Map<String,Number> |
getStatistics()
Return the statistics for the ConfiguredObject
|
TaskExecutor |
getTaskExecutor() |
String |
getType() |
Class<? extends ConfiguredObject> |
getTypeClass() |
boolean |
isDurable()
Returns whether the the object configuration is durably stored
|
boolean |
managesChildStorage() |
void |
open() |
com.google.common.util.concurrent.ListenableFuture<Void> |
openAsync() |
boolean |
removeChangeListener(ConfigurationChangeListener listener)
Remove a change listener
|
Object |
setAttribute(String name,
Object expected,
Object desired)
Set the value of an attribute
|
void |
setAttributes(Map<String,Object> attributes) |
com.google.common.util.concurrent.ListenableFuture<Void> |
setAttributesAsync(Map<String,Object> attributes) |
static final String OVER_SIZED_ATTRIBUTE_ALTERNATIVE_TEXT
static final String ID
static final String NAME
static final String TYPE
static final String DESCRIPTION
static final String DURABLE
static final String CONTEXT
static final String LIFETIME_POLICY
static final String LAST_UPDATED_BY
static final String LAST_UPDATED_TIME
static final String STATE
static final String DESIRED_STATE
static final String CREATED_BY
static final String CREATED_TIME
UUID getId()
String getName()
String getDescription()
String getType()
String getLastUpdatedBy()
long getLastUpdatedTime()
String getCreatedBy()
long getCreatedTime()
State getDesiredState()
State getState()
long getLastOpenedTime()
void addChangeListener(ConfigurationChangeListener listener)
listener
- the listener to addboolean removeChangeListener(ConfigurationChangeListener listener)
listener
- the listener to remove<T extends ConfiguredObject> T getParent(Class<T> clazz)
clazz
- the class of parent being asked forboolean isDurable()
LifetimePolicy getLifetimePolicy()
Collection<String> getAttributeNames()
Object getAttribute(String name)
name
- the name of the attributeMap<String,Object> getActualAttributes()
Object setAttribute(String name, Object expected, Object desired) throws IllegalStateException, AccessControlException, IllegalArgumentException
name
- the name of the attribute to be setexpected
- the value the caller believes the attribute currently has (or null if it is expected to be unset)desired
- the desired value for the attribute (or null to unset the attribute)IllegalStateException
- if the attribute cannot be set while the object is in its current stateAccessControlException
- if the caller does not have permission to alter the value of the attributeIllegalArgumentException
- if the provided value is not valid for the given argumentMap<String,Number> getStatistics()
<C extends ConfiguredObject> Collection<C> getChildren(Class<C> clazz)
clazz
- the class of the children to returnNullPointerException
- if the supplied class null<C extends ConfiguredObject> C getChildById(Class<C> clazz, UUID id)
<C extends ConfiguredObject> C getChildByName(Class<C> clazz, String name)
<C extends ConfiguredObject> C createChild(Class<C> childClass, Map<String,Object> attributes, ConfiguredObject... otherParents)
<C extends ConfiguredObject> com.google.common.util.concurrent.ListenableFuture<C> getAttainedChildById(Class<C> childClass, UUID id)
<C extends ConfiguredObject> com.google.common.util.concurrent.ListenableFuture<C> getAttainedChildByName(Class<C> childClass, String name)
<C extends ConfiguredObject> com.google.common.util.concurrent.ListenableFuture<C> createChildAsync(Class<C> childClass, Map<String,Object> attributes, ConfiguredObject... otherParents)
void setAttributes(Map<String,Object> attributes) throws IllegalStateException, AccessControlException, IllegalArgumentException
com.google.common.util.concurrent.ListenableFuture<Void> setAttributesAsync(Map<String,Object> attributes) throws IllegalStateException, AccessControlException, IllegalArgumentException
Class<? extends ConfiguredObject> getCategoryClass()
Class<? extends ConfiguredObject> getTypeClass()
boolean managesChildStorage()
<C extends ConfiguredObject<C>> C findConfiguredObject(Class<C> clazz, String name)
ConfiguredObjectRecord asObjectRecord()
void open()
com.google.common.util.concurrent.ListenableFuture<Void> openAsync()
void close()
com.google.common.util.concurrent.ListenableFuture<Void> closeAsync()
com.google.common.util.concurrent.ListenableFuture<Void> deleteAsync()
TaskExecutor getTaskExecutor()
TaskExecutor getChildExecutor()
ConfiguredObjectFactory getObjectFactory()
Model getModel()
void delete()
void decryptSecrets()
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.