public class SubordinateDurable2PCStub extends Object implements Durable2PCParticipant, PersistableParticipant, PersistableATParticipant
| Constructor and Description |
|---|
SubordinateDurable2PCStub()
empty constructor for use only during recovery
|
SubordinateDurable2PCStub(SubordinateATCoordinator coordinator)
normal constructor used when the subordinate coordinator is registered as a durable participant
with its parent coordinator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
this will be called when the parent coordinator commits its durable participants and should ensure
that the interposed cooordinator does the same
|
void |
error()
this should never get called
|
byte[] |
getRecoveryState()
this participant implements the PersistableATarticipant interface so it can save its state.
|
boolean |
isRecovered()
test if this participant is recovered
|
Vote |
prepare()
This will be called when the parent coordinator is preparing its durable participants and should ensure
that the interposed cooordinator does the same.
|
boolean |
restoreState(com.arjuna.ats.arjuna.state.InputObjectState ios)
Restore the state of the particpant from the specified input object stream.
|
void |
rollback()
this will be called when the parent coordinator rolls back its durable participants and should ensure
that the interposed cooordinator does the same
|
boolean |
saveState(com.arjuna.ats.arjuna.state.OutputObjectState oos)
Save the state of the particpant to the specified input object stream.
|
void |
unknown()
this should never get called
|
public SubordinateDurable2PCStub(SubordinateATCoordinator coordinator)
coordinator - public SubordinateDurable2PCStub()
public Vote prepare() throws WrongStateException, SystemException
prepare in interface ParticipantWrongStateException - if the subordinate coordinator does the sameSystemException - if the subordinate coordinator does the sameVotepublic void commit()
throws WrongStateException,
SystemException
commit in interface ParticipantWrongStateExceptionSystemExceptionpublic void rollback()
throws WrongStateException,
SystemException
rollback in interface ParticipantWrongStateExceptionSystemExceptionpublic void unknown()
throws SystemException
unknown in interface ParticipantSystemExceptionpublic void error()
throws SystemException
error in interface ParticipantSystemExceptionpublic boolean saveState(com.arjuna.ats.arjuna.state.OutputObjectState oos)
saveState in interface PersistableParticipantoos - The output output stream.public boolean restoreState(com.arjuna.ats.arjuna.state.InputObjectState ios)
restoreState in interface PersistableParticipantios - The Input object stream.public boolean isRecovered()
public byte[] getRecoveryState()
throws Exception
getRecoveryState in interface PersistableATParticipantExceptionCopyright © 2016 JBoss by Red Hat. All rights reserved.