|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.util.TwoPhaseCommitTool.TwoPhaseCommitWrapper
public static final class TwoPhaseCommitTool.TwoPhaseCommitWrapper
A wrapper of a TwoPhaseCommit, which delegates all calls to the
wrapped object, passing the specified commitData. This object is useful for
use with TwoPhaseCommitTool.execute(TwoPhaseCommit...) if one would
like to store commitData as part of the commit.
| Constructor Summary | |
|---|---|
TwoPhaseCommitTool.TwoPhaseCommitWrapper(TwoPhaseCommit tpc,
Map<String,String> commitData)
|
|
| Method Summary | |
|---|---|
void |
commit()
The second phase of a 2-phase commit. |
void |
commit(Map<String,String> commitData)
Like TwoPhaseCommit.commit(), but takes an additional commit data to be included
w/ the commit. |
void |
prepareCommit()
The first stage of a 2-phase commit. |
void |
prepareCommit(Map<String,String> commitData)
Like TwoPhaseCommit.commit(), but takes an additional commit data to be included
w/ the commit. |
void |
rollback()
Discards any changes that have occurred since the last commit. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TwoPhaseCommitTool.TwoPhaseCommitWrapper(TwoPhaseCommit tpc,
Map<String,String> commitData)
| Method Detail |
|---|
public void prepareCommit()
throws IOException
TwoPhaseCommitTwoPhaseCommit.rollback() is called to discard all changes
since last successful commit.
prepareCommit in interface TwoPhaseCommitIOException
public void prepareCommit(Map<String,String> commitData)
throws IOException
TwoPhaseCommitTwoPhaseCommit.commit(), but takes an additional commit data to be included
w/ the commit.
NOTE: some implementations may not support any custom data to be included w/ the commit and may discard it altogether. Consult the actual implementation documentation for verifying if this is supported.
prepareCommit in interface TwoPhaseCommitIOExceptionTwoPhaseCommit.prepareCommit()
public void commit()
throws IOException
TwoPhaseCommitTwoPhaseCommit.prepareCommit(), and
after it returns, the caller can assume that the changes were successfully
committed to the underlying storage.
commit in interface TwoPhaseCommitIOException
public void commit(Map<String,String> commitData)
throws IOException
TwoPhaseCommitTwoPhaseCommit.commit(), but takes an additional commit data to be included
w/ the commit.
commit in interface TwoPhaseCommitIOExceptionTwoPhaseCommit.commit(),
TwoPhaseCommit.prepareCommit(Map)
public void rollback()
throws IOException
TwoPhaseCommitTwoPhaseCommit.commit() or
TwoPhaseCommit.prepareCommit(), this method is used to roll all other objects
back to their previous state.
rollback in interface TwoPhaseCommitIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||