@ThreadSafe public final class LongRunningJobManager extends Object
| Constructor and Description |
|---|
LongRunningJobManager(LongRunningJobResultManager aResultMgr) |
| Modifier and Type | Method and Description |
|---|---|
com.helger.commons.collection.ext.ICommonsCollection<LongRunningJobData> |
getAllRunningJobs() |
int |
getRunningJobCount() |
void |
onEndJob(String sJobID,
com.helger.commons.state.ESuccess eExecSucess,
LongRunningJobResult aResult)
End a job.
|
String |
onStartJob(ILongRunningJob aJob,
String sStartingUserID)
Start a long running job
|
void |
waitUntilAllJobsAreFinished() |
public LongRunningJobManager(@Nonnull LongRunningJobResultManager aResultMgr)
@Nonnull @Nonempty public String onStartJob(@Nonnull ILongRunningJob aJob, @Nullable String sStartingUserID)
aJob - The job that is to be startedsStartingUserID - The ID of the user who started the jobpublic void onEndJob(@Nullable String sJobID, @Nonnull com.helger.commons.state.ESuccess eExecSucess, @Nonnull LongRunningJobResult aResult)
sJobID - The internal long running job ID created from
onStartJob(ILongRunningJob,String).eExecSucess - Was the job execution successful or not from a technical point of
view? May not be null. If a JobExecutionException was
thrown, this should be ESuccess.FAILURE.aResult - The main job results.@Nonnegative public int getRunningJobCount()
@Nonnull @Nonempty public com.helger.commons.collection.ext.ICommonsCollection<LongRunningJobData> getAllRunningJobs()
public void waitUntilAllJobsAreFinished()
throws InterruptedException
InterruptedExceptionCopyright © 2014–2017 Philip Helger. All rights reserved.