org.sakaiproject.search.transaction.api
Interface IndexTransaction

All Known Subinterfaces:
IndexItemsTransaction, IndexMergeTransaction, IndexOptimizeTransaction, IndexUpdateTransaction, JournalOptimizationTransaction
All Known Implementing Classes:
IndexItemsTransactionImpl, IndexMergeTransactionImpl, IndexOptimizeTransactionImpl, IndexTransactionImpl, IndexUpdateTransactionImpl, JournalOptimizationTransactionImpl

public interface IndexTransaction

This represents a transactional index operation

Author:
ieb

Field Summary
static int STATUS_ACTIVE
           
static int STATUS_COMMITTED
           
static int STATUS_COMMITTING
           
static int STATUS_MARKED_ROLLBACK
           
static int STATUS_NO_TRANSACTION
           
static int STATUS_PREPARED
           
static int STATUS_PREPARING
           
static int STATUS_ROLLEDBACK
           
static int STATUS_ROLLING_BACK
           
static int STATUS_UNKNOWN
           
static boolean[] TRANSACTION_ACTIVE
           
static String[] TRANSACTION_STATUS
           
 
Method Summary
 void clear(String key)
          Clear an object placed in the transaction
 void close()
           
 void commit()
          Commit the transaction and make it available to others in the cluster
 Object get(String key)
          get an Object from the transaction, that may have been placed in the transaction by earlier phases.
 int getStatus()
          get the transaction status
 long getTransactionId()
           
 void open()
           
 void prepare()
          Prepare to commit this transaction, all the work is done, but all the listeners need to be ready and able to performa commit without failure
 void put(String key, Object obj)
          Put an object into the transaction for use in later phases
 void rollback()
           
 

Field Detail

STATUS_ACTIVE

static final int STATUS_ACTIVE
See Also:
Constant Field Values

STATUS_COMMITTED

static final int STATUS_COMMITTED
See Also:
Constant Field Values

STATUS_COMMITTING

static final int STATUS_COMMITTING
See Also:
Constant Field Values

STATUS_MARKED_ROLLBACK

static final int STATUS_MARKED_ROLLBACK
See Also:
Constant Field Values

STATUS_NO_TRANSACTION

static final int STATUS_NO_TRANSACTION
See Also:
Constant Field Values

STATUS_PREPARED

static final int STATUS_PREPARED
See Also:
Constant Field Values

STATUS_PREPARING

static final int STATUS_PREPARING
See Also:
Constant Field Values

STATUS_ROLLEDBACK

static final int STATUS_ROLLEDBACK
See Also:
Constant Field Values

STATUS_ROLLING_BACK

static final int STATUS_ROLLING_BACK
See Also:
Constant Field Values

STATUS_UNKNOWN

static final int STATUS_UNKNOWN
See Also:
Constant Field Values

TRANSACTION_STATUS

static final String[] TRANSACTION_STATUS

TRANSACTION_ACTIVE

static final boolean[] TRANSACTION_ACTIVE
Method Detail

prepare

void prepare()
             throws IndexTransactionException
Prepare to commit this transaction, all the work is done, but all the listeners need to be ready and able to performa commit without failure

Throws:
IndexTransactionException

commit

void commit()
            throws IndexTransactionException
Commit the transaction and make it available to others in the cluster

Throws:
IndexTransactionException

rollback

void rollback()
              throws IndexTransactionException
Throws:
IndexTransactionException - if the transaction is not open

getTransactionId

long getTransactionId()
Returns:

close

void close()
           throws IndexTransactionException
Throws:
IndexTransactionException

getStatus

int getStatus()
get the transaction status

Returns:

get

Object get(String key)
get an Object from the transaction, that may have been placed in the transaction by earlier phases.

Parameters:
key -
Returns:

clear

void clear(String key)
Clear an object placed in the transaction

Parameters:
key -

put

void put(String key,
         Object obj)
Put an object into the transaction for use in later phases

Parameters:
key -
obj -

open

void open()
          throws IndexTransactionException
Throws:
IndexTransactionException


Copyright © 2003-2012 Sakai Project. All Rights Reserved.