com.ibm.commerce.subscription.scheduler.actions

Class AbstractSubscriptionScheduledActionCmdImpl.StackEntry

  • java.lang.Object
    • com.ibm.commerce.subscription.scheduler.actions.AbstractSubscriptionScheduledActionCmdImpl.StackEntry
  • Enclosing class:
    AbstractSubscriptionScheduledActionCmdImpl


    public static class AbstractSubscriptionScheduledActionCmdImpl.StackEntry
    extends java.lang.Object
    This class represents an entry in the command's state processing stack. It encapsulates the state in which the subscription was when the entry was created, the new state to which the subscription was moved (which is the state being processed) and a handle to transaction governing the processing of the current state.
    • Constructor Summary

      Constructors 
      Constructor and Description
      StackEntry(java.lang.Integer previousState, java.lang.Integer newState, java.lang.Integer dataBaseState, TransactionHandle handle)
      Constructs a stack entry.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int bumpRetryCount()
      This method increments the retry count for the state.
      java.lang.Integer getNewState()
      Returns the new state of the subscription.
      java.lang.Integer getPreviousDBState()
      Returns the transient state in the database when the stack entry was created.
      java.lang.Integer getPreviousState()
      Returns the previous state of the subscription.
      int getRetryCount()
      This method returns the current retry count for the state.
      TransactionHandle getTransactionHandle()
      Return the handle to the transaction.
      boolean isCompleted()
      This method returns if the stack entry is completed or not.
      java.lang.String toString()
      This method returns the human readable description of the receiver.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • StackEntry

        public StackEntry(java.lang.Integer previousState,
                          java.lang.Integer newState,
                          java.lang.Integer dataBaseState,
                          TransactionHandle handle)
        Constructs a stack entry.
        Parameters:
        previousState - The previous state in the process.
        newState - The new state or the state being processed.
        dataBaseState - The transient state in the data base when the stack entry was created.
        handle - The handle to the transaction.
    • Method Detail

      • getNewState

        public java.lang.Integer getNewState()
        Returns the new state of the subscription. This corresponds to the state being processed by this entry.
        Returns:
        The new state to which the process was moved to.
      • getPreviousState

        public java.lang.Integer getPreviousState()
        Returns the previous state of the subscription. This corresponds to the state from which the processing moved to create this entry.
        Returns:
        The previous state from which the processing moved.
      • getPreviousDBState

        public java.lang.Integer getPreviousDBState()
        Returns the transient state in the database when the stack entry was created.
        Returns:
        The state in the database when the transition occurred.
      • getTransactionHandle

        public TransactionHandle getTransactionHandle()
        Return the handle to the transaction.
        Returns:
        The handle of the transaction.
      • bumpRetryCount

        public int bumpRetryCount()
        This method increments the retry count for the state.
        Returns:
        The retry count after incrementing.
      • getRetryCount

        public int getRetryCount()
        This method returns the current retry count for the state.
        Returns:
        The retry count for this state.
      • isCompleted

        public boolean isCompleted()
        This method returns if the stack entry is completed or not. Completion indicates that the transaction pertaining to this state is committed.
        Returns:
        True, if the entry is completed. False, otherwise.
      • toString

        public java.lang.String toString()
        This method returns the human readable description of the receiver.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string representation of the state.