Class AbstractPolicy

    • Constructor Detail

      • AbstractPolicy

        public AbstractPolicy()
    • Method Detail

      • checkInitialized

        protected void checkInitialized()
        Checks whether this AbstractPolicy is initialized and throws an IllegalStateException if not.
      • init

        public void init()
        Initializes the policy, so that the policy's "work" methods can be used. Calling a "work" method while the policy is not initialized will result in an IllegalStateException, as well as re-initializing before committing or rolling back.
        Specified by:
        init in interface IPolicy
      • isInitialized

        protected boolean isInitialized()
        Returns whether this AbstractPolicy is initialized or not.
        Returns:
        true if this AbstractPolicy is initialized, false otherwise.
      • locallyExecuteOperation

        protected void locallyExecuteOperation()
        Locally executes the ITransactionalOperation that is updated by this policy, i.e. not on the operation history. Maybe used in the "work" operations of subclasses.
      • rollback

        public void rollback()
        Puts back this policy into an uninitialized state, reverting any changes that have been applied via the policy's work methods since the preceding init() call.
        Specified by:
        rollback in interface IPolicy