public abstract class AbstractPhaseEngine
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPhaseEngine(Executor executor) |
| Modifier and Type | Method and Description |
|---|---|
protected static java.util.List<XAResourceHolderState> |
collectNotInterestedResources(java.util.List<XAResourceHolderState> allResources,
java.util.List<XAResourceHolderState> interestedResources) |
protected static java.util.Set<java.lang.String> |
collectResourcesUniqueNames(java.util.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.
|
protected AbstractPhaseEngine(Executor executor)
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,
AsyncExecutorprotected 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 java.util.Set<java.lang.String> collectResourcesUniqueNames(java.util.List<XAResourceHolderState> resources)
protected static java.util.List<XAResourceHolderState> collectNotInterestedResources(java.util.List<XAResourceHolderState> allResources, java.util.List<XAResourceHolderState> interestedResources)
Copyright © 2006-2023 Bitronix Software. All Rights Reserved.