public interface ConfigTransaction
Configured
. 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.Modifier and Type | Method and Description |
---|---|
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).
|
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 managedConfigTransactionException
void rollback()
Copyright © 2009–2018 Oracle Corporation. All rights reserved.