Enum TransactionStatus

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TransactionStatus>

    public enum TransactionStatus
    extends java.lang.Enum<TransactionStatus>
    Status of indexes that make up the whole index. This starts with the value from javax.transaction.Status. Lifecycle --------- As a transaction starts, the delta is ACTIVE It may be MARKED_ROLLBACK -> ROLLED BACK -> PREPARING -> PREPARED -> COMMITTING -> COMMITTED... with roll back at any time If the index has any delayed indexing it commits to COMMITTED_REQUIRES_REINDEX and then the overlay can go from -> COMMITTED_REINDEXING -> COMMITTED_REINDEXED If there was no reindexing required the delat commits as COMMITTED A delta changes to an index overlay as it is committed. For an overlay in COMMITTED or COMMITTED_REINDEXED it can have its delete list applied to sub indexes. At this point it becomes a sub index.
    Author:
    Andy Hind
    • Method Detail

      • values

        public static TransactionStatus[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TransactionStatus c : TransactionStatus.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TransactionStatus valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isCommitted

        public abstract boolean isCommitted()
        Is this a commited inex entry?
        Returns:
        - true if committed
      • isTransient

        public abstract boolean isTransient()
        Is this transient
        Returns:
        - true if no information needs to be persisted
      • canBeReordered

        public abstract boolean canBeReordered()
        Can this be reordered with respect to other TXs
        Returns:
        - true if this can be reordered (fixed after prepare)
      • follows

        public abstract boolean follows​(TransactionStatus previous)
        Can this state follow the one given?
        Parameters:
        previous - state
        Returns:
        - true if transition to this state is allowed
      • getStatus

        public abstract int getStatus()
        Get the javax.transaction.Status best matching this state
        Returns:
        - the int TX state