|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbitronix.tm.twopc.AbstractPhaseEngine
public abstract class AbstractPhaseEngine
Abstract phase execution engine.
Constructor Summary | |
---|---|
protected |
AbstractPhaseEngine(Executor executor)
|
Method Summary | |
---|---|
protected static List<XAResourceHolderState> |
collectNotInterestedResources(List<XAResourceHolderState> allResources,
List<XAResourceHolderState> interestedResources)
|
protected static Set<String> |
collectResourcesUniqueNames(List<XAResourceHolderState> resources)
|
protected abstract Job |
createJob(XAResourceHolderState xaResourceHolderState)
Create a Job that is going to execute the phase command on the given resource. |
protected void |
executePhase(XAResourceManager resourceManager,
boolean reverse)
Execute the phase. |
protected abstract boolean |
isParticipating(XAResourceHolderState xaResourceHolderState)
Determine if a resource is participating in the phase or not. |
protected void |
logFailedResources(PhaseException ex)
Log exceptions that happened during a phase failure. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractPhaseEngine(Executor executor)
Method Detail |
---|
protected void executePhase(XAResourceManager resourceManager, boolean reverse) throws PhaseException
Configuration.isAsynchronous2Pc()
is true, all commands in a given position are sent
in parallel by using the detected Executor
implementation.
resourceManager
- the XAResourceManager
containing the enlisted resources to execute the phase on.reverse
- true if jobs should be executed in reverse position / enlistment order, false for natural position / enlistment order.
PhaseException
- if one or more resource threw an exception during phase execution.SyncExecutor
,
AsyncExecutor
protected abstract boolean isParticipating(XAResourceHolderState xaResourceHolderState)
xaResourceHolderState
- the resource to check for its participation.
protected abstract Job createJob(XAResourceHolderState xaResourceHolderState)
Job
that is going to execute the phase command on the given resource.
xaResourceHolderState
- the resource that is going to receive a command.
Job
that is going to execute the command.protected void logFailedResources(PhaseException ex)
ex
- the phase exception.protected static Set<String> collectResourcesUniqueNames(List<XAResourceHolderState> resources)
protected static List<XAResourceHolderState> collectNotInterestedResources(List<XAResourceHolderState> allResources, List<XAResourceHolderState> interestedResources)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |