|
||||||||||
| 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 participants)
Adds a map of participants -> heuristic states to the map of heuristic states -> participants. |
protected void |
addToHeuristicMap(Participant p,
Object 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 HeuristicMessage[] |
commit(boolean onePhase)
The corresponding 2PC method is delegated hereto. |
protected HeuristicMessage[] |
commitFromWithinCallback(boolean heuristic,
boolean onePhase)
Auxiliary method for committing. |
HeuristicMessage[] |
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 HeuristicMessage[] |
getHeuristicMessages()
Get the heuristic info for the message round. |
protected HeuristicMessage[] |
getHeuristicMessages(Object heuristicState)
Gets the heuristic messages for all participants that are in the given heuristic state |
protected com.atomikos.icatch.imp.Propagator |
getPropagator()
Get the propagator for sending messages in the subclasses. |
protected Hashtable |
getReadOnlyTable()
Get the readonly table. |
protected Stack |
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. |
void |
readData(DataInput in)
|
protected void |
recover(CoordinatorImp coordinator)
Recover the state handler after restart. |
protected Boolean |
replayCompletion(Participant participant)
Handle a replay request for a participant. |
protected HeuristicMessage[] |
rollback()
The corresponding 2PC method is delegated hereto. |
protected HeuristicMessage[] |
rollbackFromWithinCallback(boolean indoubt,
boolean heuristic)
Auxiliary method for rollback. |
HeuristicMessage[] |
rollbackHeuristically()
|
HeuristicMessage[] |
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 table)
Sets the table of readonly participants. |
void |
writeData(DataOutput out)
|
| 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 HeuristicMessage[] commit(boolean onePhase)
throws HeurRollbackException,
HeurMixedException,
HeurHazardException,
IllegalStateException,
RollbackException,
SysException
HeurRollbackException
HeurMixedException
HeurHazardException
IllegalStateException
RollbackException
SysException
protected HeuristicMessage[] 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,
Object state)
p - The participant.state - The (heuristic) state. Should be one of the four heuristic
states, or the terminated state.protected void addToHeuristicMap(Hashtable participants)
participants - The participant to heuristic state map.protected HeuristicMessage[] getHeuristicMessages(Object heuristicState)
heuristicState - The heuristic state, or the terminated state.
protected HeuristicMessage[] getHeuristicMessages()
protected CoordinatorImp getCoordinator()
protected Stack getReplayStack()
protected Hashtable getReadOnlyTable()
protected Dictionary getCascadeList()
protected com.atomikos.icatch.imp.Propagator getPropagator()
protected Boolean getCommitted()
protected boolean isCommitted()
protected void setReadOnlyTable(Hashtable 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 HeuristicMessage[] 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 HeuristicMessage[] 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 HeuristicMessage[] rollbackWithAfterCompletionNotification(com.atomikos.icatch.imp.RollbackCallback cb)
throws HeurCommitException,
HeurMixedException,
SysException,
HeurHazardException,
IllegalStateException
HeurCommitException
HeurMixedException
SysException
HeurHazardException
IllegalStateException
public HeuristicMessage[] rollbackHeuristically()
throws HeurCommitException,
HeurMixedException,
SysException,
HeurHazardException,
IllegalStateException
HeurCommitException
HeurMixedException
SysException
HeurHazardException
IllegalStateException
public HeuristicMessage[] commitHeuristically()
throws HeurMixedException,
SysException,
HeurRollbackException,
HeurHazardException,
IllegalStateException,
RollbackException
HeurMixedException
SysException
HeurRollbackException
HeurHazardException
IllegalStateException
RollbackException
public void writeData(DataOutput out)
throws IOException
writeData in interface DataSerializableIOException
public void readData(DataInput in)
throws IOException
readData in interface DataSerializableIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||