public class TwoPhaseCommitEventProcessor extends java.lang.Object implements IEventProcessor, ISharedObjectContainerTransaction
Constructor and Description |
---|
TwoPhaseCommitEventProcessor(BaseSharedObject bse,
ISharedObjectTransactionConfig config) |
Modifier and Type | Method and Description |
---|---|
protected void |
addFailed(ID remote,
java.lang.Throwable failure) |
protected void |
addParticipants(ID[] ids) |
protected void |
doTMAbort(java.lang.Throwable except) |
protected void |
doTMCommit() |
protected ISharedObjectContext |
getContext() |
protected ID |
getHomeID() |
protected int |
getMinFailedToAbort() |
protected BaseSharedObject |
getSharedObject() |
protected int |
getTimeout() |
byte |
getTransactionState()
Get state of transaction.
|
protected void |
handleActivated(ISharedObjectActivatedEvent event) |
protected void |
handleCreateResponse(ISharedObjectCreateResponseEvent event) |
protected void |
handleDeparted(IContainerDisconnectedEvent event) |
protected void |
handleJoined(IContainerConnectedEvent event) |
protected void |
handlePostCommitFailure(ID fromID,
java.lang.Throwable e,
long identifier1) |
protected void |
handlePrimaryActivated(ISharedObjectActivatedEvent event) |
protected void |
handleReplicaActivated(ISharedObjectActivatedEvent event) |
protected void |
handleVotingCompletedCreateResponse(ID fromID,
java.lang.Throwable e,
long identifier1) |
protected boolean |
isPrimary() |
protected boolean |
isVotingCompleted() |
protected void |
localCommitted() |
boolean |
processEvent(Event event)
Process given Event
|
protected void |
removeParticipant(ID id) |
protected void |
replicateTo(ID[] remotes) |
protected void |
sendCommit() |
protected void |
setTransactionState(byte state) |
protected void |
trace(java.lang.String msg) |
protected void |
traceStack(java.lang.String msg,
java.lang.Throwable t) |
void |
waitToCommit()
Method called to wait for a transaction to complete.
|
public TwoPhaseCommitEventProcessor(BaseSharedObject bse, ISharedObjectTransactionConfig config)
protected void trace(java.lang.String msg)
protected void traceStack(java.lang.String msg, java.lang.Throwable t)
protected int getTimeout()
protected int getMinFailedToAbort()
protected boolean isPrimary()
protected BaseSharedObject getSharedObject()
protected ID getHomeID()
protected void addParticipants(ID[] ids)
protected void removeParticipant(ID id)
protected void addFailed(ID remote, java.lang.Throwable failure)
protected ISharedObjectContext getContext()
public boolean processEvent(Event event)
IEventProcessor
processEvent
in interface IEventProcessor
event
- the Event to processprotected void handleActivated(ISharedObjectActivatedEvent event)
protected void replicateTo(ID[] remotes)
protected void handlePrimaryActivated(ISharedObjectActivatedEvent event)
protected void handleReplicaActivated(ISharedObjectActivatedEvent event)
protected void handleJoined(IContainerConnectedEvent event)
protected void handleCreateResponse(ISharedObjectCreateResponseEvent event)
protected void handleDeparted(IContainerDisconnectedEvent event)
protected void handleVotingCompletedCreateResponse(ID fromID, java.lang.Throwable e, long identifier1)
protected void handlePostCommitFailure(ID fromID, java.lang.Throwable e, long identifier1)
protected void sendCommit() throws SharedObjectAddAbortException
SharedObjectAddAbortException
public byte getTransactionState()
ISharedObjectContainerTransaction
getTransactionState
in interface ISharedObjectContainerTransaction
protected void setTransactionState(byte state)
public void waitToCommit() throws SharedObjectAddAbortException
ISharedObjectContainerTransaction
waitToCommit
in interface ISharedObjectContainerTransaction
SharedObjectAddAbortException
protected void doTMAbort(java.lang.Throwable except) throws SharedObjectAddAbortException
SharedObjectAddAbortException
protected void doTMCommit() throws SharedObjectAddAbortException
SharedObjectAddAbortException
protected void localCommitted()
protected boolean isVotingCompleted() throws SharedObjectAddAbortException
SharedObjectAddAbortException