org.prevayler
Interface Transaction<P>

Type Parameters:
P - The type or any supertype of the Prevalent System you intend to perform the transaction upon.
All Superinterfaces:
Serializable
All Known Implementing Classes:
AddProject, AddTask, AppendTransaction, BadTransaction, GoodTransaction, NondeterministicErrorTransaction, ProxyTransaction, RemoveTask

public interface Transaction<P>
extends Serializable

An atomic transaction to be executed on a Prevalent System.

To be recoverable, any changes to the observable state of a Prevalent System must be encapsulated in Transactions and performed via the given prevalentSystem in each Transaction.

Upon recovery execution, anything outside prevalentSystem will be a freshly deserialized copy, so cannot reference anything in the Prevalent System.


Method Summary
 void executeOn(P prevalentSystem, Date executionTime)
          This method is called by Prevayler.execute(Transaction) to execute this Transaction on the given Prevalent System.
 

Method Detail

executeOn

void executeOn(P prevalentSystem,
               Date executionTime)
This method is called by Prevayler.execute(Transaction) to execute this Transaction on the given Prevalent System. See org.prevayler.demos for usage examples.

Parameters:
prevalentSystem - The system on which this Transaction will execute.
executionTime - The time at which this Transaction is being executed. Every Transaction executes completely within a single moment in time. Logically, a Prevalent System's time does not pass during the execution of a Transaction.


Copyright © 2001-2013. All Rights Reserved.