.. java:import:: org.caosdb.server.jobs.core Strict .. java:import:: org.caosdb.server.transaction Transaction .. java:import:: org.caosdb.server.utils UndoHandler TransactionStage ================ .. java:package:: org.caosdb.server.jobs :noindex: .. java:type:: public enum TransactionStage Any \ :java:ref:`Transaction`\ of an Entity consists of sequence of stages. Jobs which have a \ :java:ref:`JobAnnotation`\ can specify the transaction stage in which they are to be executed. By default, any job is executed during the CHECK stage. INIT - The transaction is being initialized (create schedule, aquire locks (one writing thread, many reading threads permitted).PRE_CHECK - Prepare entities (e.g. check if any updates are to be processed, load/generate acl, cast objects into more specialized classes.)CHECK - Do the actual consistency checking.POST_CHECK - Do more consistency checking (reserved for those jobs which need the normal checks to be done already, e.g. the \ :java:ref:`Strict`\ job).PRE_TRANSACTION - Prepare the entities for the transaction (e.g. for paging, translate the state messages into state properties). Also, in this stage, the full read and write lock is aquired.TRANSACTION - Do the actual transaction.POST_TRANSACTION - Post-process entities (Success messages, write history, transform stage properties into messages).CLEANUP - Release all locks, remove temporary files, clean-up the \ :java:ref:`UndoHandler`\ s.ROLL_BACK - In case an error occured in any of the stages, this special stage rolls-back any changes and calls the \ :java:ref:`UndoHandler.undo()`\ of the \ :java:ref:`UndoHandler`\ s. :author: Timm Fitschen **See also:** :java:ref:`{@linkTransaction.execute()}.` Enum Constants -------------- CHECK ^^^^^ .. java:field:: public static final TransactionStage CHECK :outertype: TransactionStage CLEANUP ^^^^^^^ .. java:field:: public static final TransactionStage CLEANUP :outertype: TransactionStage INIT ^^^^ .. java:field:: public static final TransactionStage INIT :outertype: TransactionStage POST_CHECK ^^^^^^^^^^ .. java:field:: public static final TransactionStage POST_CHECK :outertype: TransactionStage POST_TRANSACTION ^^^^^^^^^^^^^^^^ .. java:field:: public static final TransactionStage POST_TRANSACTION :outertype: TransactionStage PRE_CHECK ^^^^^^^^^ .. java:field:: public static final TransactionStage PRE_CHECK :outertype: TransactionStage PRE_TRANSACTION ^^^^^^^^^^^^^^^ .. java:field:: public static final TransactionStage PRE_TRANSACTION :outertype: TransactionStage ROLL_BACK ^^^^^^^^^ .. java:field:: public static final TransactionStage ROLL_BACK :outertype: TransactionStage TRANSACTION ^^^^^^^^^^^ .. java:field:: public static final TransactionStage TRANSACTION :outertype: TransactionStage