|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.search.transaction.impl.IndexTransactionImpl
public abstract class IndexTransactionImpl
Base for index transactions
org.sakaiproject.search.indexer.impl.test.TransactionalIndexWorkerTest| Field Summary | |
|---|---|
protected TransactionManagerImpl |
manager
|
protected long |
transactionId
|
protected int |
transactionState
|
| Fields inherited from interface org.sakaiproject.search.transaction.api.IndexTransaction |
|---|
STATUS_ACTIVE, STATUS_COMMITTED, STATUS_COMMITTING, STATUS_MARKED_ROLLBACK, STATUS_NO_TRANSACTION, STATUS_PREPARED, STATUS_PREPARING, STATUS_ROLLEDBACK, STATUS_ROLLING_BACK, STATUS_UNKNOWN, TRANSACTION_ACTIVE, TRANSACTION_STATUS |
| Constructor Summary | |
|---|---|
IndexTransactionImpl(TransactionManagerImpl manager,
Map<String,Object> m)
|
|
| 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 |
protected void |
doAfterClose()
|
protected void |
doAfterCommit()
|
protected void |
doAfterOpen()
|
protected void |
doAfterPrepare()
|
protected void |
doAfterRollback()
|
protected void |
doBeforeClose()
|
protected void |
doBeforeCommit()
|
protected void |
doBeforeOpen()
|
protected void |
doBeforePrepare()
|
protected void |
doBeforeRollback()
|
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()
The transaction ID will change as the status cahnges. |
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected long transactionId
protected TransactionManagerImpl manager
protected int transactionState
| Constructor Detail |
|---|
public IndexTransactionImpl(TransactionManagerImpl manager,
Map<String,Object> m)
m - impl -
IndexTransactionException| Method Detail |
|---|
public void open()
throws IndexTransactionException
open in interface IndexTransactionIndexTransactionExceptionprotected void doAfterOpen()
protected void doBeforeOpen()
public final void close()
throws IndexTransactionException
close in interface IndexTransactionIndexTransactionExceptionorg.sakaiproject.search.component.service.index.transactional.api.IndexUpdateTransaction#close()
protected void doAfterClose()
throws IndexTransactionException
IndexTransactionException
protected void doBeforeClose()
throws IndexTransactionException
IndexTransactionException
public final void prepare()
throws IndexTransactionException
IndexTransaction
prepare in interface IndexTransactionIndexTransactionExceptionIndexTransaction.prepare()
protected void doAfterPrepare()
throws IndexTransactionException
IndexTransactionException
protected void doBeforePrepare()
throws IndexTransactionException
IndexTransactionException
public final void commit()
throws IndexTransactionException
IndexTransaction
commit in interface IndexTransactionIndexTransactionExceptionorg.sakaiproject.search.component.service.index.transactional.api.IndexUpdateTransaction#commit()
protected void doAfterCommit()
throws IndexTransactionException
IndexTransactionException
protected void doBeforeCommit()
throws IndexTransactionException
IndexTransactionExceptionpublic long getTransactionId()
getTransactionId in interface IndexTransactionorg.sakaiproject.search.component.service.index.transactional.api.IndexUpdateTransaction#getTransactionId()
public final void rollback()
throws IndexTransactionException
rollback in interface IndexTransactionIndexTransactionException - if the transaction is not openorg.sakaiproject.search.component.service.index.transactional.api.IndexUpdateTransaction#rollback()
protected void doAfterRollback()
throws IndexTransactionException
IndexTransactionException
protected void doBeforeRollback()
throws IndexTransactionException
IndexTransactionExceptionpublic final int getStatus()
IndexTransaction
getStatus in interface IndexTransactionIndexTransaction.getStatus()public void clear(String key)
IndexTransaction
clear in interface IndexTransactionIndexTransaction.clear(java.lang.String)public Object get(String key)
IndexTransaction
get in interface IndexTransactionIndexTransaction.get(java.lang.String)
public void put(String key,
Object obj)
IndexTransaction
put in interface IndexTransactionIndexTransaction.put(java.lang.String,
java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||