|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TransactionValidator
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()
Nested Class Summary | |
---|---|
static interface |
TransactionValidator.Factory
Interface that clients implement to define a validator factory. |
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. |
List<Notification> |
getNotificationsForPostcommit(Transaction tx)
Obtains the notifications that I need to broadcast in a post-commit resource-change event for the specified transaction. |
List<Notification> |
getNotificationsForPrecommit(Transaction tx)
Obtains the notifications that I need to broadcast in a pre-commit resource-change event for the specified transaction. |
List<Notification> |
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. |
IStatus |
validate(Transaction tx)
Performs the validation step of a commit. |
Field Detail |
---|
static final TransactionValidator NULL
Method Detail |
---|
void add(InternalTransaction transaction)
transaction
- the transaction (root or a nested transaction) to addvoid 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 removeIStatus validate(Transaction tx)
tx
- the transaction to validate
Transaction.commit()
,
RollbackException
List<Notification> getNotificationsForValidation(Transaction tx)
tx
- the transaction to be validated
null
if the
transaction has not started yetList<Notification> getNotificationsForPrecommit(Transaction tx)
tx
- the transaction to be broadcast
null
if the transaction has not startedList<Notification> getNotificationsForPostcommit(Transaction tx)
tx
- the transaction to be broadcast
null
if the transaction has not startedvoid dispose()
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |