|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.prevayler.implementation.PrevaylerImpl<P>
public class PrevaylerImpl<P>
Constructor Summary | |
---|---|
PrevaylerImpl(GenericSnapshotManager<P> snapshotManager,
TransactionPublisher transactionPublisher,
Serializer journalSerializer,
boolean transactionDeepCopyMode)
Creates a new Prevayler |
Method Summary | ||
---|---|---|
Clock |
clock()
Returns the Clock used to determine the execution time of all Transaction and Queries executed using this Prevayler. |
|
void |
close()
Closes any files or other system resources opened by this Prevayler. |
|
|
execute(Query<? super P,R> sensitiveQuery)
Executes the given sensitiveQuery on the prevalentSystem(). |
|
|
execute(SureTransactionWithQuery<? super P,R> sureTransactionWithQuery)
The same as execute(TransactionWithQuery ) except no Exception is thrown. |
|
void |
execute(Transaction<? super P> transaction)
Executes the given Transaction on the prevalentSystem(). |
|
|
execute(TransactionWithQuery<? super P,R> transactionWithQuery)
Executes the given transactionWithQuery on the prevalentSystem(). |
|
P |
prevalentSystem()
Returns the object which holds direct or indirect references to all other Business Objects in the system. |
|
File |
takeSnapshot()
Produces a complete serialized image of the underlying PrevalentSystem. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrevaylerImpl(GenericSnapshotManager<P> snapshotManager, TransactionPublisher transactionPublisher, Serializer journalSerializer, boolean transactionDeepCopyMode) throws IOException, ClassNotFoundException
snapshotManager
- The SnapshotManager that will be used for reading and writing snapshot files.transactionPublisher
- The TransactionPublisher that will be used for publishing transactions executed with this PrevaylerImpl.journalSerializer
-
IOException
ClassNotFoundException
Method Detail |
---|
public P prevalentSystem()
Prevayler
prevalentSystem
in interface Prevayler<P>
public Clock clock()
Prevayler
clock
in interface Prevayler<P>
public void execute(Transaction<? super P> transaction)
Prevayler
execute
in interface Prevayler<P>
PrevaylerFactory
public <R> R execute(Query<? super P,R> sensitiveQuery) throws Exception
Prevayler
execute
in interface Prevayler<P>
Exception
- The Exception thrown by the execution of the sensitiveQuery on the prevalentSystem().public <R> R execute(TransactionWithQuery<? super P,R> transactionWithQuery) throws Exception
Prevayler
execute
in interface Prevayler<P>
Exception
- The Exception thrown by the execution of the sensitiveQuery on the prevalentSystem().PrevaylerFactory
public <R> R execute(SureTransactionWithQuery<? super P,R> sureTransactionWithQuery)
Prevayler
) except no Exception is thrown.
execute
in interface Prevayler<P>
public File takeSnapshot() throws Exception
Prevayler
takeSnapshot
in interface Prevayler<P>
Exception
- if there is trouble writing to the snapshot file or serializing the prevalent system.public void close() throws IOException
Prevayler
close
in interface Prevayler<P>
IOException
- if there is trouble closing a file or some other system resource.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |