Package com.iizix.txp

Interface ITXPCoordinator

All Superinterfaces:
ITXPMonitor
All Known Implementing Classes:
TXPCoordinatorImpl

public interface ITXPCoordinator extends ITXPMonitor
The ITXPCoordinator interface.
Author:
Freggle
  • Method Details

    • newProcess

      ITXProcess newProcess()
      Creates a new implementation specific ITXProcess instance and sets itself as coordinator.
      Returns:
      an ITXProcess instance
    • ready

      void ready(ITXProcess process, ITXPNode node, ITXPNode.State nodeState)
      Called by the process to signal that a node is ready for completion. Typically the coordinator handles error states that may occur using a policy.
      Parameters:
      process - the process
      node - the node
      nodeState - the current state of the node
    • commit

      void commit(ITXProcess process) throws TXPException
      Called by the process to signal that the process logic/application requests a commit. Typically the coordinator coordinates the commit and handles error states that may occur using a policy.
      Parameters:
      process - the process
      Throws:
      TXPException - a coordinator and policy dependent exception (today 1 of 3, more details later)
    • rollback

      void rollback(ITXProcess process) throws TXPException
      Called by the process to signal that the process logic/application requests a rollback. Typically the coordinator coordinates the commit and handles error states that may occur using a policy.
      Parameters:
      process - the process
      Throws:
      TXPException - a coordinator and policy dependent exception (today 1 of 3, more details later)
    • addMonitor

      void addMonitor(ITXPMonitor monitor)
      Adds the specified TXP monitor. Monitors can be used for logging and monitoring processes under this coordinator's control.
      Parameters:
      monitor - the monitor
    • removeMonitor

      void removeMonitor(ITXPMonitor monitor)
      Removes the specified TXP monitor.
      Parameters:
      monitor - The monitor.