org.alfresco.repo.search.impl.lucene.index
Class TransactionStatus

java.lang.Object
  extended by java.lang.Enum
      extended by org.alfresco.repo.search.impl.lucene.index.TransactionStatus
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class TransactionStatus
extends java.lang.Enum

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.

See Also:
Serialized Form

Field Summary
static TransactionStatus ACTIVE
          Active TX
static TransactionStatus COMMITTED
          TX Committed
static TransactionStatus COMMITTED_DELETING
          Pending deleted are being committed to for the delta.
static TransactionStatus COMMITTING
          TX is committing
static TransactionStatus DELETABLE
          An entry that may be deleted
static TransactionStatus MARKED_ROLLBACK
          TX marked for rollback
static TransactionStatus MERGE
          This entry is the source for an active merge.
static TransactionStatus MERGE_TARGET
          A new index element that is being made by a merge.
static TransactionStatus NO_TRANSACTION
          No transaction
static TransactionStatus PREPARED
          TX prepared
static TransactionStatus PREPARING
          TX is preparing
static TransactionStatus ROLLEDBACK
          TX rolled back
static TransactionStatus ROLLINGBACK
          TX rolling back
static TransactionStatus UNKNOWN
          TX state is unknown
 
Method Summary
abstract  boolean canBeReordered()
          Can this be reordered with respect to other TXs
abstract  boolean follows(TransactionStatus previous)
          Can this state follow the one given?
abstract  int getStatus()
          Get the javax.transaction.Status best matching this state
abstract  boolean isCommitted()
          Is this a commited inex entry?
abstract  boolean isTransient()
          Is this transient
static TransactionStatus valueOf(java.lang.String name)
           
static TransactionStatus[] values()
           
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field 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()

valueOf

public static TransactionStatus valueOf(java.lang.String name)

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


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.