Package org.alfresco.repo.policy
Class TransactionBehaviourQueue
- java.lang.Object
-
- org.alfresco.repo.policy.TransactionBehaviourQueue
-
- All Implemented Interfaces:
TransactionListener,org.alfresco.util.transaction.TransactionListener
public class TransactionBehaviourQueue extends java.lang.Object implements TransactionListener
Transaction Behaviour Queue. Responsible for keeping a record of behaviours to execute at the end of a transaction.
-
-
Constructor Summary
Constructors Constructor Description TransactionBehaviourQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterCommit()Invoked after transaction commit.voidafterRollback()Invoked after transaction rollback.voidbeforeCommit(boolean readOnly)Called before a transaction is committed.voidbeforeCompletion()Invoked before transaction commit/rollback.booleanequals(java.lang.Object obj)voidflush()inthashCode()<P extends Policy>
voidqueue(Behaviour behaviour, PolicyDefinition<P> definition, P policyInterface, java.lang.reflect.Method method, java.lang.Object[] args)Queue a behaviour for end-of-transaction execution
-
-
-
Method Detail
-
queue
public <P extends Policy> void queue(Behaviour behaviour, PolicyDefinition<P> definition, P policyInterface, java.lang.reflect.Method method, java.lang.Object[] args)
Queue a behaviour for end-of-transaction execution- Type Parameters:
P- P extends Policy- Parameters:
behaviour- Behaviourdefinition- PolicyDefinitionpolicyInterface- Pmethod- Methodargs- Object[]
-
flush
public void flush()
- Specified by:
flushin interfaceTransactionListener
-
beforeCommit
public void beforeCommit(boolean readOnly)
Description copied from interface:TransactionListenerCalled before a transaction is committed.All transaction resources are still available.
- Specified by:
beforeCommitin interfaceTransactionListener- Specified by:
beforeCommitin interfaceorg.alfresco.util.transaction.TransactionListener- Parameters:
readOnly- true if the transaction is read-only
-
beforeCompletion
public void beforeCompletion()
Description copied from interface:TransactionListenerInvoked before transaction commit/rollback. Will be called afterTransactionListener.beforeCommit(boolean)even ifTransactionListener.beforeCommit(boolean)failed.All transaction resources are still available.
- Specified by:
beforeCompletionin interfaceTransactionListener- Specified by:
beforeCompletionin interfaceorg.alfresco.util.transaction.TransactionListener
-
afterCommit
public void afterCommit()
Description copied from interface:TransactionListenerInvoked after transaction commit.Any exceptions generated here will only be logged and will have no effect on the state of the transaction.
Although all transaction resources are still available, this method should be used only for cleaning up resources after a commit has occured.
- Specified by:
afterCommitin interfaceTransactionListener- Specified by:
afterCommitin interfaceorg.alfresco.util.transaction.TransactionListener
-
afterRollback
public void afterRollback()
Description copied from interface:TransactionListenerInvoked after transaction rollback.Any exceptions generated here will only be logged and will have no effect on the state of the transaction.
Although all transaction resources are still available, this method should be used only for cleaning up resources after a rollback has occured.
- Specified by:
afterRollbackin interfaceTransactionListener- Specified by:
afterRollbackin interfaceorg.alfresco.util.transaction.TransactionListener
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
-