public class ParticipantEngine extends Object implements ParticipantInboundEvents
Constructor and Description |
---|
ParticipantEngine(Participant participant,
String id,
State state,
W3CEndpointReference coordinator,
boolean recovered)
Construct the engine for the participant in a specified state.
|
ParticipantEngine(Participant participant,
String id,
W3CEndpointReference coordinator)
Construct the initial engine for the participant.
|
Modifier and Type | Method and Description |
---|---|
void |
commit(Notification commit,
MAP map,
ArjunaContext arjunaContext)
Handle the commit event.
|
void |
earlyReadonly()
Handle the early readonly event.
|
void |
earlyRollback()
Handle the early rollback event.
|
W3CEndpointReference |
getCoordinator()
Return the endpoint reference for the coordinator associated with this participant.
|
String |
getId()
Get the coordinator id.
|
boolean |
isPersisted()
Is the participant persisted to disk?
|
boolean |
isRecovered()
Is the participant recovered?
|
void |
prepare(Notification prepare,
MAP map,
ArjunaContext arjunaContext)
Handle the prepare event.
|
void |
recovery()
Handle the recovery event.
|
void |
rollback(Notification rollback,
MAP map,
ArjunaContext arjunaContext)
Handle the rollback event.
|
void |
soapFault(SoapFault soapFault,
MAP map,
ArjunaContext arjunaContext)
Handle the soap fault event.
|
public ParticipantEngine(Participant participant, String id, W3CEndpointReference coordinator)
participant
- The participant.id
- The participant id.coordinator
- The coordinator endpoint reference.public ParticipantEngine(Participant participant, String id, State state, W3CEndpointReference coordinator, boolean recovered)
participant
- The participant.id
- The participant id.state
- The initial state.coordinator
- The coordinator endpoint reference.public void commit(Notification commit, MAP map, ArjunaContext arjunaContext)
commit
in interface ParticipantInboundEvents
commit
- The commit notification.map
- The addressing context.arjunaContext
- The arjuna context.
None -> None (send committed)
Active -> Aborting (do nothing)
Preparing -> Aborting (do nothing)
PreparedSuccess -> Committing (initiate commit)
Committing -> Committing (do nothing)
Aborting -> Aborting (do nothing)public void prepare(Notification prepare, MAP map, ArjunaContext arjunaContext)
prepare
in interface ParticipantInboundEvents
prepare
- The prepare notification.map
- The addressing context.arjunaContext
- The arjuna context.
None -> None (send aborted)
Active -> Preparing (execute prepare)
Preparing -> Preparing (do nothing)
PreparedSuccess -> PreparedSuccess (resend prepared)
Committing -> Committing (ignore)
Aborting -> Aborting (send aborted and forget)public void rollback(Notification rollback, MAP map, ArjunaContext arjunaContext)
rollback
in interface ParticipantInboundEvents
rollback
- The rollback notification.map
- The addressing context.arjunaContext
- The arjuna context.
None -> None (send aborted)
Active -> Aborting (execute rollback, send aborted and forget)
Preparing -> Aborting (execute rollback, send aborted and forget)
PreparedSuccess -> Aborting (execute rollback, send aborted and forget)
Committing -> Committing (ignore)
Aborting -> Aborting (send aborted and forget)public void earlyRollback()
public void earlyReadonly()
public void recovery()
public void soapFault(SoapFault soapFault, MAP map, ArjunaContext arjunaContext)
soapFault
in interface ParticipantInboundEvents
soapFault
- The soap fault.map
- The addressing context.arjunaContext
- The arjuna context.public String getId()
public W3CEndpointReference getCoordinator()
ParticipantInboundEvents
getCoordinator
in interface ParticipantInboundEvents
public boolean isPersisted()
public boolean isRecovered()
Copyright © 2017 JBoss by Red Hat. All rights reserved.