|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atomikos.icatch.imp.ActiveStateHandler
public class ActiveStateHandler
A state handler for the active coordinator state.
| Constructor Summary | |
|---|---|
ActiveStateHandler()
|
|
| Method Summary | |
|---|---|
protected void |
activate()
Start the threads. |
protected void |
addAllForReplay(Collection<Participant> participants)
Utility method for subclasses. |
protected void |
addToHeuristicMap(Hashtable<Participant,TxState> participants)
Adds a map of participants -> heuristic states to the map of heuristic states -> participants. |
protected void |
addToHeuristicMap(Participant p,
TxState state)
Adds a participant with a given heuristic state to the map. |
Object |
clone()
Performs a deep clone of the state handler, needed for logging the state information in this handler. |
protected void |
commit(boolean onePhase)
The corresponding 2PC method is delegated hereto. |
protected void |
commitFromWithinCallback(boolean heuristic,
boolean onePhase)
Auxiliary method for committing. |
void |
commitHeuristically()
|
protected void |
dispose()
Notification of shutdown; this method triggers the stopping of all active threads for propagation. |
protected void |
forget()
|
protected Dictionary |
getCascadeList()
Get the cascade list. |
protected Boolean |
getCommitted()
Test if the result was commit. |
protected CoordinatorImp |
getCoordinator()
Get the coordinator whose state we handle. |
protected com.atomikos.icatch.imp.Propagator |
getPropagator()
Get the propagator for sending messages in the subclasses. |
protected Hashtable<Participant,Boolean> |
getReadOnlyTable()
Get the readonly table. |
protected Stack<Participant> |
getReplayStack()
Get the replay stack for replay completion requests. |
protected long |
getRollbackTicks()
|
protected TxState |
getState()
Get the (non-pseudo) coordinator state to which this handler belongs. |
protected boolean |
isCommitted()
Tests if commit has happened. |
protected void |
onTimeout()
Callback method on timeout event of the coordinator. |
protected int |
prepare()
The corresponding 2PC method is delegated hereto. |
protected void |
recover(CoordinatorImp coordinator)
Recover the state handler after restart. |
protected void |
removePendingOltpCoordinatorFromTransactionService()
|
protected Boolean |
replayCompletion(Participant participant)
Handle a replay request for a participant. |
protected void |
rollback()
The corresponding 2PC method is delegated hereto. |
protected void |
rollbackFromWithinCallback(boolean indoubt,
boolean heuristic)
Auxiliary method for rollback. |
void |
rollbackHeuristically()
|
void |
rollbackWithAfterCompletionNotification(com.atomikos.icatch.imp.RollbackCallback cb)
|
protected void |
setCascadeList(Dictionary<Participant,Integer> allParticipants)
The corresponding 2PC method is delegated hereto. |
protected void |
setGlobalSiblingCount(int count)
The corresponding 2PC method is delegated hereto. |
protected void |
setReadOnlyTable(Hashtable<Participant,Boolean> table)
Sets the table of readonly participants. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ActiveStateHandler()
| Method Detail |
|---|
protected long getRollbackTicks()
protected TxState getState()
protected void onTimeout()
protected void setGlobalSiblingCount(int count)
protected int prepare()
throws RollbackException,
IllegalStateException,
HeurHazardException,
HeurMixedException,
SysException
RollbackException
IllegalStateException
HeurHazardException
HeurMixedException
SysException
protected void commit(boolean onePhase)
throws HeurRollbackException,
HeurMixedException,
HeurHazardException,
IllegalStateException,
RollbackException,
SysException
HeurRollbackException
HeurMixedException
HeurHazardException
IllegalStateException
RollbackException
SysException
protected void rollback()
throws HeurCommitException,
HeurMixedException,
SysException,
HeurHazardException,
IllegalStateException
HeurCommitException
HeurMixedException
SysException
HeurHazardException
IllegalStateException
protected Boolean replayCompletion(Participant participant)
throws IllegalStateException
IllegalStateExceptionpublic Object clone()
clone in class Object
protected void addToHeuristicMap(Participant p,
TxState state)
p - The participant.state - The (heuristic) state. Should be one of the four heuristic
states, or the terminated state.protected void addToHeuristicMap(Hashtable<Participant,TxState> participants)
participants - The participant to heuristic state map.protected CoordinatorImp getCoordinator()
protected Stack<Participant> getReplayStack()
protected Hashtable<Participant,Boolean> getReadOnlyTable()
protected Dictionary getCascadeList()
protected com.atomikos.icatch.imp.Propagator getPropagator()
protected Boolean getCommitted()
protected boolean isCommitted()
protected void setReadOnlyTable(Hashtable<Participant,Boolean> table)
table - The table.protected void activate()
protected void recover(CoordinatorImp coordinator)
coordinator - The (transient) coordinator to use.protected void dispose()
protected void addAllForReplay(Collection<Participant> participants)
participants - protected void setCascadeList(Dictionary<Participant,Integer> allParticipants)
protected void commitFromWithinCallback(boolean heuristic,
boolean onePhase)
throws HeurRollbackException,
HeurMixedException,
HeurHazardException,
IllegalStateException,
RollbackException,
SysException
heuristic - True iff a heuristic commit should be done.onePhase - True iff one-phase commit.
HeurRollbackException
HeurMixedException
HeurHazardException
IllegalStateException
RollbackException
SysException
protected void rollbackFromWithinCallback(boolean indoubt,
boolean heuristic)
throws HeurCommitException,
HeurMixedException,
SysException,
HeurHazardException,
IllegalStateException
indoubt - True iff some participants may already have voted YES.heuristic - True iff a heuristic commit should be done.
HeurCommitException
HeurMixedException
SysException
HeurHazardException
IllegalStateExceptionprotected void forget()
public void rollbackWithAfterCompletionNotification(com.atomikos.icatch.imp.RollbackCallback cb)
throws HeurCommitException,
HeurMixedException,
SysException,
HeurHazardException,
IllegalStateException
HeurCommitException
HeurMixedException
SysException
HeurHazardException
IllegalStateException
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
RollbackExceptionprotected void removePendingOltpCoordinatorFromTransactionService()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||