Enum TransactionStatus
- java.lang.Object
-
- java.lang.Enum<TransactionStatus>
-
- org.alfresco.repo.search.impl.lucene.index.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
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTIVEActive TXCOMMITTEDTX CommittedCOMMITTED_DELETINGPending deleted are being committed to for the delta.COMMITTINGTX is committingDELETABLEAn entry that may be deletedMARKED_ROLLBACKTX marked for rollbackMERGEThis entry is the source for an active merge.MERGE_TARGETA new index element that is being made by a merge.NO_TRANSACTIONNo transactionPREPAREDTX preparedPREPARINGTX is preparingROLLEDBACKTX rolled backROLLINGBACKTX rolling backUNKNOWNTX state is unknown
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleancanBeReordered()Can this be reordered with respect to other TXsabstract booleanfollows(TransactionStatus previous)Can this state follow the one given?abstract intgetStatus()Get the javax.transaction.Status best matching this stateabstract booleanisCommitted()Is this a commited inex entry?abstract booleanisTransient()Is this transientstatic TransactionStatusvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static TransactionStatus[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ACTIVE
public static final TransactionStatus ACTIVE
Active TX
-
MARKED_ROLLBACK
public static final TransactionStatus MARKED_ROLLBACK
TX marked for rollback
-
PREPARED
public static final TransactionStatus PREPARED
TX prepared
-
COMMITTED
public static final TransactionStatus COMMITTED
TX Committed
-
ROLLEDBACK
public static final TransactionStatus ROLLEDBACK
TX rolled back
-
UNKNOWN
public static final TransactionStatus UNKNOWN
TX state is unknown
-
NO_TRANSACTION
public static final TransactionStatus NO_TRANSACTION
No transaction
-
PREPARING
public static final TransactionStatus PREPARING
TX is preparing
-
COMMITTING
public static final TransactionStatus COMMITTING
TX is committing
-
ROLLINGBACK
public static final TransactionStatus ROLLINGBACK
TX rolling back
-
MERGE
public static final TransactionStatus MERGE
This entry is the source for an active merge. The result will be in a new index.
-
MERGE_TARGET
public static final TransactionStatus MERGE_TARGET
A new index element that is being made by a merge.
-
COMMITTED_DELETING
public static final TransactionStatus COMMITTED_DELETING
Pending deleted are being committed to for the delta.
-
DELETABLE
public static final TransactionStatus DELETABLE
An entry that may be deleted
-
-
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 namejava.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
-
-