public class TransactionAwareSingleton extends TransactionListenerAdapter
private static final TransactionAwareSingleton
All modifications to the singleton via TransactionAwareSingleton.get() and #put(T) are made in a
transaction-local manner and promoted to the shared value in a thread-safe manner upon
transacton completion. Transaction-local changes take precedence over the shared value.
AlfrescoTransactionSupport| Constructor and Description |
|---|
TransactionAwareSingleton() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterCommit()
Promotes the storage value to the single value, if required
|
java.lang.Object |
get() |
void |
put(java.lang.Object value)
Store the value in a transaction- and thread-safe manner.
|
afterRollback, beforeCommit, beforeCompletion, flushpublic java.lang.Object get()
public void put(java.lang.Object value)
value - the value to storepublic void afterCommit()
afterCommit in interface TransactionListenerafterCommit in class TransactionListenerAdapterCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.