Class DefaultDistributedProcessService
- java.lang.Object
-
- de.hybris.platform.processing.distributed.defaultimpl.DefaultDistributedProcessService
-
- All Implemented Interfaces:
DistributedProcessService
public class DefaultDistributedProcessService extends java.lang.Object implements DistributedProcessService
-
-
Constructor Summary
Constructors Constructor Description DefaultDistributedProcessService(ModelService modelService, FlexibleSearchService flexibleSearchService, Controller controller)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends DistributedProcessModel>
Tcreate(ProcessCreationData creationData)Creates process based onProcessCreationDataProcessStatusgetCurrentStatus(java.lang.String processCode)Get current status of distributed process<T extends DistributedProcessModel>
TrequestToStop(java.lang.String processCode)Mark process with given code as requested to stop.<T extends DistributedProcessModel>
Tstart(java.lang.String processCode)Starts process with given code<T extends DistributedProcessModel>
Twait(java.lang.String processCode, long maxWaitTimeInSeconds)Wait for process to be finished.
-
-
-
Constructor Detail
-
DefaultDistributedProcessService
public DefaultDistributedProcessService(ModelService modelService, FlexibleSearchService flexibleSearchService, Controller controller)
-
-
Method Detail
-
create
public <T extends DistributedProcessModel> T create(ProcessCreationData creationData)
Description copied from interface:DistributedProcessServiceCreates process based onProcessCreationData- Specified by:
createin interfaceDistributedProcessService- Parameters:
creationData- process creation data- Returns:
- created process
-
start
public <T extends DistributedProcessModel> T start(java.lang.String processCode)
Description copied from interface:DistributedProcessServiceStarts process with given code- Specified by:
startin interfaceDistributedProcessService- Parameters:
processCode- code of process to be started- Returns:
- started process
-
requestToStop
public <T extends DistributedProcessModel> T requestToStop(java.lang.String processCode)
Description copied from interface:DistributedProcessServiceMark process with given code as requested to stop. It doesn't stop the process.- Specified by:
requestToStopin interfaceDistributedProcessService- Parameters:
processCode- code of process to be stopped- Returns:
- process
-
wait
public <T extends DistributedProcessModel> T wait(java.lang.String processCode, long maxWaitTimeInSeconds) throws java.lang.InterruptedException
Description copied from interface:DistributedProcessServiceWait for process to be finished. Process is considered as finish if it's in stateDistributedProcessState.SUCCEEDED,DistributedProcessState.STOPPEDorDistributedProcessState.FAILED. It wait's for a given time and if it returns caller need to check whether the process is really finished.- Specified by:
waitin interfaceDistributedProcessService- Parameters:
processCode- code of process to be waited formaxWaitTimeInSeconds- time in seconds- Returns:
- process
- Throws:
java.lang.InterruptedException
-
getCurrentStatus
public ProcessStatus getCurrentStatus(java.lang.String processCode)
Description copied from interface:DistributedProcessServiceGet current status of distributed process- Specified by:
getCurrentStatusin interfaceDistributedProcessService- Parameters:
processCode- code of process- Returns:
- current status
-
-