|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for an object that validates a transaction when it commits. Different implementations are provided for read and for write transactions.
ReadOnlyValidatorImpl
,
ReadWriteValidatorImpl
,
Transaction.commit()
Field Summary | |
---|---|
static TransactionValidator |
NULL
A "null" instance that is suitable for use when there is no active transaction. |
Method Summary | |
---|---|
void |
add(InternalTransaction transaction)
Adds a transaction for eventual validation. |
void |
dispose()
Disposes me by clearing my state and cleaning up any resources that I am retaining. |
java.util.List |
getNotificationsForPostcommit(Transaction tx)
Obtains the notifications that I need to broadcast in a post-commit resource-change event for the specified transaction. |
java.util.List |
getNotificationsForPrecommit(Transaction tx)
Obtains the notifications that I need to broadcast in a pre-commit resource-change event for the specified transaction. |
java.util.List |
getNotificationsForValidation(Transaction tx)
Obtains the notifications received, in order, during the execution of the (possibly nested) transaction(s) that I am validating. |
void |
remove(InternalTransaction transaction)
Removes a transaction that has rolled back. |
org.eclipse.core.runtime.IStatus |
validate(Transaction tx)
Performs the validation step of a commit. |
Field Detail |
public static final TransactionValidator NULL
Method Detail |
public void add(InternalTransaction transaction)
transaction
- the transaction (root or a nested transaction) to addpublic void remove(InternalTransaction transaction)
Note that, for efficiency, transactions that have successfully committed should also be removed after they have been deactivated. This ensures that they are no longer referenced by validator and can, therefore, be reclaimed (the validator retains the notifications, only).
transaction
- the transaction (root or a nested transaction) to removepublic org.eclipse.core.runtime.IStatus validate(Transaction tx)
tx
- the transaction to validate
Transaction.commit()
,
RollbackException
public java.util.List getNotificationsForValidation(Transaction tx)
tx
- the transaction to be validated
null
if the
transaction has not started yetpublic java.util.List getNotificationsForPrecommit(Transaction tx)
tx
- the transaction to be broadcast
null
if the transaction has not startedpublic java.util.List getNotificationsForPostcommit(Transaction tx)
tx
- the transaction to be broadcast
null
if the transaction has not startedpublic void dispose()
|
Copyright 2002, 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |