|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Revision(value="$Revision: 1.6 $",
date="$Date: 2006/11/15 22:13:02 $",
tag="$Name: $")
public interface Transaction
TODO: Javadoc
For each transaction there is only one event: its start. At the start event the transaction
Task.taskState() will have state Task.State#Constructed. Anyone interested
in being notified of the completion of a transaction must register to receive TaskEvents
from the transaction.
This is especially true of a transaction which is caused by another transaction. Typically
there will be an EventSink which accepts the
TaskEvents from the causing transactions, and commits
or aborts the caused transaction accordingly.
TODO: Unit tests, Code review, Javadoc review, Seal/Finalize
| Nested Class Summary | |
|---|---|
static interface |
Transaction.Internal<X extends Transaction>
TODO: Javadoc TODO: Document the way rcf.core.util.filter.FilterEvent works! TODO: Transaction Composite Trees |
| Nested classes/interfaces inherited from interface rcf.core.concurrent.schedule.Task |
|---|
Task.State |
| Method Summary | |
|---|---|
boolean |
abort()
TODO: Javadoc |
boolean |
commit()
TODO: Javadoc |
boolean |
isCancelled()
TODO: Javadoc |
boolean |
isLocked()
TODO: Javadoc TODO: Transactional Locking |
boolean |
lock()
TODO: Javadoc TODO: Transactional Locking |
Transactional<? extends Transaction> |
source()
Get the EventSource this event was generated from. |
| Methods inherited from interface rcf.core.concurrent.events.Event |
|---|
getEventSequenceNumber |
| Methods inherited from interface rcf.core.concurrent.schedule.Task |
|---|
taskState |
| Methods inherited from interface rcf.core.concurrent.events.EventSource |
|---|
events, getSequenceNumber, incSequenceNumber, isSyndicated, syndicate |
| Method Detail |
|---|
boolean abort()
true indicates success.
false indicates the transaction couldn't be aborted, or already was.
if ((state == State.Committed) || (state == State.Interrupted)) throw new TaskStateException("Cannnot abort a transaction in state \"" + temp + "\"!");boolean commit()
true indicates success.
false indicates the transaction couldn't be committed, or already was.
if ((state == State.Aborted) || (state == State.Interrupted)) throw new TaskStateException("Cannnot commit a transaction in state \"" + temp + "\"!");boolean isCancelled()
isCancelled in interface Eventtrue if the transaction has been aborted or interrupted.
(taskState().terminal == Task.State.Aborted) || (taskState().terminal == Task.State.Interrupted)Event.isCancelled()boolean isLocked()
boolean lock()
true if the lock was acquired for this thread.
false if it was already held.Transactional<? extends Transaction> source()
EventEventSource this event was generated from.
source in interface EventEventSource this event was generated from.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||