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 Participant
WrongStateException
- if the subordinate coordinator does the sameSystemException
- if the subordinate coordinator does the sameVote
public void commit() throws WrongStateException, SystemException
commit
in interface Participant
WrongStateException
SystemException
public void rollback() throws WrongStateException, SystemException
rollback
in interface Participant
WrongStateException
SystemException
public void unknown() throws SystemException
unknown
in interface Participant
SystemException
public void error() throws SystemException
error
in interface Participant
SystemException
public boolean saveState(com.arjuna.ats.arjuna.state.OutputObjectState oos)
saveState
in interface PersistableParticipant
oos
- The output output stream.public boolean restoreState(com.arjuna.ats.arjuna.state.InputObjectState ios)
restoreState
in interface PersistableParticipant
ios
- The Input object stream.public boolean isRecovered()
public byte[] getRecoveryState() throws Exception
getRecoveryState
in interface PersistableATParticipant
Exception
Copyright © 2020 JBoss by Red Hat. All rights reserved.