|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvnet.hk2.config.provider.internal.ConfigTransactionImpl
@Service public class ConfigTransactionImpl
Implementation for ConfigTransaction.
| Method Summary | ||
|---|---|---|
void |
commit()
Locks changes, calls prepare (if not yet performed), followed by commit if no prepare errors. |
|
void |
commit(Map<Object,Object> beanReplacements)
Same basic behavior as ConfigTransaction.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 createdConfigBean,
String name,
MultiMap<String,String> metadata)
Add configuration beans to the transaction. |
|
void |
deleted(Collection<?> deletedConfigBeans)
|
|
void |
deleted(Object deleted)
Marks configuration beans as having been deleted. |
|
|
getValue(Object component,
Inhabitant<?> onBehalfOf,
AnnotatedElement annotated,
Type genericType,
Class<V> type)
override of InjectionResolverQuery to provide view of changes
scoped to this txn context. |
|
void |
prepare()
Locks changes, calls prepare. |
|
void |
rollback()
Cancels the transaction, locking it out from further changes. |
|
void |
updated(Collection<?> updatedConfigBeans)
|
|
void |
updated(Object updated,
PropertyChangeEvent event)
Mark configuration beans as having been updated (note that name and metadata cannot change here). |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void prepare()
throws ConfigTransactionException
ConfigTransaction
prepare in interface ConfigTransactionConfigTransactionException
public void commit()
throws ConfigTransactionException
ConfigTransaction
commit in interface ConfigTransactionConfigTransactionException
public void commit(Map<Object,Object> beanReplacements)
throws ConfigTransactionException
ConfigTransactionConfigTransaction.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.
commit in interface ConfigTransactionbeanReplacements - mapping from the bean instance used in prepare, with the final version that should be managed
ConfigTransactionExceptionpublic void rollback()
ConfigTransaction
rollback in interface ConfigTransaction
public void created(Object createdConfigBean,
String name,
MultiMap<String,String> metadata)
ConfigTransaction
created in interface ConfigTransactioncreatedConfigBean - - the configuration bean instance being createdname - - optionally the name for the configurationmetadata - - name,value(s)public void deleted(Collection<?> deletedConfigBeans)
deleted in interface ConfigTransactionpublic void deleted(Object deleted)
ConfigTransaction
deleted in interface ConfigTransactionpublic void updated(Collection<?> updatedConfigBeans)
updated in interface ConfigTransaction
public void updated(Object updated,
PropertyChangeEvent event)
ConfigTransaction
updated in interface ConfigTransaction
public <V> V getValue(Object component,
Inhabitant<?> onBehalfOf,
AnnotatedElement annotated,
Type genericType,
Class<V> type)
throws ComponentException
InjectionResolverQuery to provide view of changes
scoped to this txn context.
getValue in interface InjectionResolverQueryComponentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||