public interface TwoPhaseCommit
TwoPhaseCommitTool
to execute a 2-phase commit algorithm over several
TwoPhaseCommit
s.Modifier and Type | Method and Description |
---|---|
void |
commit()
The second phase of a 2-phase commit.
|
void |
commit(java.util.Map<java.lang.String,java.lang.String> commitData)
Like
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(java.util.Map<java.lang.String,java.lang.String> commitData)
Like
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.
|
void prepareCommit() throws java.io.IOException
rollback()
is called to discard all changes
since last successful commit.java.io.IOException
void prepareCommit(java.util.Map<java.lang.String,java.lang.String> commitData) throws java.io.IOException
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.
java.io.IOException
prepareCommit()
void commit() throws java.io.IOException
prepareCommit()
, and
after it returns, the caller can assume that the changes were successfully
committed to the underlying storage.java.io.IOException
void commit(java.util.Map<java.lang.String,java.lang.String> commitData) throws java.io.IOException
commit()
, but takes an additional commit data to be included
w/ the commit.java.io.IOException
commit()
,
prepareCommit(Map)
void rollback() throws java.io.IOException
commit()
or
prepareCommit()
, this method is used to roll all other objects
back to their previous state.java.io.IOException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.