|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atomikos.icatch.imp.CoordinatorImp
public class CoordinatorImp
All things related to termination logic.
| Field Summary |
|---|
| Fields inherited from interface com.atomikos.icatch.Participant |
|---|
READ_ONLY |
| Constructor Summary | |
|---|---|
|
CoordinatorImp()
No argument constructor as required by Recoverable interface. |
protected |
CoordinatorImp(String root,
boolean heuristic_commit,
boolean checkorphans)
Constructor for testing only. |
|
CoordinatorImp(String root,
RecoveryCoordinator coord,
boolean heuristic_commit,
boolean checkorphans)
Constructor. |
protected |
CoordinatorImp(String root,
RecoveryCoordinator coord,
boolean heuristic_commit,
long timeout,
boolean checkorphans,
boolean single_threaded_2pc)
Constructor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected CoordinatorImp(String root,
boolean heuristic_commit,
boolean checkorphans)
protected CoordinatorImp(String root,
RecoveryCoordinator coord,
boolean heuristic_commit,
long timeout,
boolean checkorphans,
boolean single_threaded_2pc)
root - The root tid.coord - The RecoverCoordinator, null if root.console - The console to log to, or null if none.heuristic_commit - Whether to do commit on heuristic.timeout - The timeout in milliseconds for indoubts before a heuristic
decision is made.checkorphans - If true, orphan checks are made on prepare. For OTS, this is
false.single_threaded_2pc - If true then commit is done in the same thread as the one that
started the tx.
public CoordinatorImp(String root,
RecoveryCoordinator coord,
boolean heuristic_commit,
boolean checkorphans)
root - The root String for this one.console - The console to log to, or null if none.coord - The recovery coordinator for indoubt resolution.heuristic_commit - If true, heuristic decision is commit.checkorphans - If true, orphan checking is done at prepare.public CoordinatorImp()
| Method Detail |
|---|
public Vector<Participant> getParticipants()
public Boolean isRecoverableWhileActive()
public boolean isCommitted()
protected void startThreads(long timeout)
timeout - The timeout for the thread wakeup interval.console - The console, null if none.protected long getTimeOut()
public TxState getState()
getState in interface StatefulStateful
public void addFSMEnterListener(FSMEnterListener l,
TxState state)
FSMEnterEventSource.
public void addFSMPreEnterListener(FSMPreEnterListener l,
TxState state)
addFSMPreEnterListener in interface FSMPreEnterEventSourcepublic RecoveryCoordinator getRecoveryCoordinator()
getRecoveryCoordinator in interface CompositeCoordinatorCompositeCoordinator.
public Participant getParticipant()
throws UnsupportedOperationException
UnsupportedOperationExceptionCompositeCoordinator.public String getCoordinatorId()
getCoordinatorId in interface CompositeCoordinatorCompositeCoordinator
public RecoveryCoordinator addParticipant(Participant participant)
throws SysException,
IllegalStateException,
RollbackException
SysException
IllegalStateException
RollbackExceptionprotected void incLocalSiblingCount()
public void preEnter(FSMEnterEvent event)
throws IllegalStateException
FSMPreEnterListener
preEnter in interface FSMPreEnterListenerIllegalStateException - on failure.
The callee can use this to prevent the state change from
happening.FSMPreEnterListener.public String getURI()
getURI in interface ParticipantgetURI in interface RecoveryCoordinatorParticipant
public boolean recover()
throws SysException
recover in interface ParticipantSysExceptionParticipantpublic void forget()
forget in interface ParticipantParticipant.
public void setCascadeList(Dictionary allParticipants)
throws SysException
setCascadeList in interface ParticipantSysExceptionParticipant.public void setGlobalSiblingCount(int count)
setGlobalSiblingCount in interface ParticipantParticipant.
public int prepare()
throws RollbackException,
IllegalStateException,
HeurHazardException,
HeurMixedException,
SysException
prepare in interface ParticipantRollbackException
IllegalStateException
HeurHazardException
HeurMixedException
SysExceptionParticipant.
public void commit(boolean onePhase)
throws HeurRollbackException,
HeurMixedException,
HeurHazardException,
IllegalStateException,
RollbackException,
SysException
commit in interface ParticipantHeurRollbackException
HeurMixedException
HeurHazardException
IllegalStateException
RollbackException
SysExceptionParticipant.
public void rollback()
throws HeurCommitException,
HeurMixedException,
SysException,
HeurHazardException,
IllegalStateException
rollback in interface ParticipantHeurCommitException
HeurMixedException
SysException
HeurHazardException
IllegalStateExceptionParticipant.
public void rollbackHeuristically()
throws HeurCommitException,
HeurMixedException,
SysException,
HeurHazardException,
IllegalStateException
HeurCommitException
HeurMixedException
SysException
HeurHazardException
IllegalStateException
public void commitHeuristically()
throws HeurMixedException,
SysException,
HeurRollbackException,
HeurHazardException,
IllegalStateException,
RollbackException
HeurMixedException
SysException
HeurRollbackException
HeurHazardException
IllegalStateException
RollbackException
public Boolean replayCompletion(Participant participant)
throws IllegalStateException
replayCompletion in interface RecoveryCoordinatorIllegalStateExceptionRecoveryCoordinator.public Object getId()
public void alarm(AlarmTimer timer)
alarm in interface AlarmTimerListenerprotected void dispose()
protected void terminate(boolean commit)
throws HeurRollbackException,
HeurMixedException,
SysException,
SecurityException,
HeurCommitException,
HeurHazardException,
RollbackException,
IllegalStateException
commit - True iff commit termination is asked.
HeurRollbackException
HeurMixedException
SysException
SecurityException
HeurCommitException
HeurHazardException
RollbackException
IllegalStateException
public void setRecoverableWhileActive()
throws UnsupportedOperationException
UnsupportedOperationExceptionpublic TxState getStateWithTwoPhaseCommitDecision()
public void transitionPerformed(FSMTransitionEvent e)
FSMTransitionListener
transitionPerformed in interface FSMTransitionListenere - The transition that was made.public void entered(FSMEnterEvent e)
FSMEnterListener
entered in interface FSMEnterListenerpublic CoordinatorLogEntry getCoordinatorLogEntry(TxState state)
getCoordinatorLogEntry in interface RecoverableCoordinatorpublic CoordinatorLogEntry getCoordinatorLogEntry()
public Collection<ParticipantLogEntry> getParticipantLogEntries()
public boolean isRecoverable()
isRecoverable in interface Participantpublic String getResourceName()
getResourceName in interface Participant
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||