|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConfigTransaction
Represents a configuration transaction from an outside configuration system.
In all of the methods that take configuration beans, it is expected that those objects are annotated withConfigured
. Additionally, the object identity
of the bean must be unique; so that a call to delete
a bean must correspond to some previous addition of
the bean from earlier by object identity.
Method Summary | |
---|---|
void |
commit()
Locks changes, calls prepare (if not yet performed), followed by commit if no prepare errors. |
void |
commit(Map<Object,Object> finalBeanMapping)
Same basic behavior as commit() with the added ability to substitute configuration
beans used in the prepare phase with the final bean object replacements that should be managed. |
void |
created(Object created,
String name,
MultiMap<String,String> metadata)
Add configuration beans to the transaction. |
void |
deleted(Collection<?> deletedConfigBeans)
|
void |
deleted(Object deletedConfigBean)
Marks configuration beans as having been deleted. |
void |
prepare()
Locks changes, calls prepare. |
void |
rollback()
Cancels the transaction, locking it out from further changes. |
void |
updated(Collection<?> updatedConfigBeans)
|
void |
updated(Object updatedConfigBean,
PropertyChangeEvent event)
Mark configuration beans as having been updated (note that name and metadata cannot change here). |
Method Detail |
---|
void created(Object created, String name, MultiMap<String,String> metadata)
created
- - the configuration bean instance being createdname
- - optionally the name for the configurationmetadata
- - name,value(s)void updated(Object updatedConfigBean, PropertyChangeEvent event)
void updated(Collection<?> updatedConfigBeans)
void deleted(Object deletedConfigBean)
void deleted(Collection<?> deletedConfigBeans)
void prepare() throws ConfigTransactionException
ConfigTransactionException
void commit() throws ConfigTransactionException
ConfigTransactionException
void commit(Map<Object,Object> finalBeanMapping) throws ConfigTransactionException
commit()
with the added ability to substitute configuration
beans used in the prepare phase with the final bean object replacements that should be managed.
This is an important variant when the configuration beans in the prepare phase are transient
in nature.
finalBeanMapping
- mapping from the bean instance used in prepare, with the final version that should be managed
ConfigTransactionException
void rollback()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |