public class SynchronizationManager extends Object implements Synchronization
| Modifier and Type | Field and Description |
|---|---|
protected static int |
defaultCapacity
The default capacity of the List of Synchronizations.
|
protected List |
synchronizations
The list of instances to synchronize.
|
| Modifier | Constructor and Description |
|---|---|
|
SynchronizationManager()
Creates new SynchronizationManager instance with a default
capacity of the List of Synchronization instances.
|
|
SynchronizationManager(int initialCapacity)
Creates new SynchronizationManager instance specifying the initial
capacity of the list of Synchronization instances.
|
protected |
SynchronizationManager(PersistenceManager pm)
Creates new SynchronizationManager instance and registers it with
the persistence manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterCompletion(int status)
This method will be called during transaction completion.
|
void |
beforeCompletion()
This method will be called during transaction completion.
|
protected static SynchronizationManager |
getSynchronizationManager(PersistenceManager pm)
Get the synchronization manager already registered with this persistence manager.
|
protected void |
registerSynchronization(Synchronization instance)
Register an instance with this synchronization manager.
|
static void |
registerSynchronization(Synchronization instance,
PersistenceManager pm)
Register a new Synchronization with the current transaction.
|
static void |
setDefaultCapacity(int capacity)
Specify the default capacity of the list of Synchronizations.
|
protected static int defaultCapacity
protected final List synchronizations
public SynchronizationManager(int initialCapacity)
initialCapacity - the initial capacity of the List of Synchronization instancespublic SynchronizationManager()
protected SynchronizationManager(PersistenceManager pm)
pm - the persistence manager managing this transactionpublic static void registerSynchronization(Synchronization instance, PersistenceManager pm)
instance - the instance to be registeredpm - the persistence manager which manages this transactionpublic static void setDefaultCapacity(int capacity)
capacity - the default capacity of the List of Synchronizationsprotected static SynchronizationManager getSynchronizationManager(PersistenceManager pm)
pm - the persistence managerpublic void beforeCompletion()
beforeCompletion in interface Synchronizationpublic void afterCompletion(int status)
afterCompletion in interface Synchronizationstatus - the completion status of the transactionprotected void registerSynchronization(Synchronization instance)
instance - the instance to be registeredCopyright © 2017–2019 Eclipse Foundation. All rights reserved.