Package ca.uhn.fhir.batch2.coordinator
Class JobCoordinatorImpl
java.lang.Object
ca.uhn.fhir.batch2.coordinator.JobCoordinatorImpl
- All Implemented Interfaces:
IJobCoordinator
-
Constructor Summary
ConstructorsConstructorDescriptionJobCoordinatorImpl(BatchJobSender theBatchJobSender, IChannelReceiver theWorkChannelReceiver, IJobPersistence theJobPersistence, JobDefinitionRegistry theJobDefinitionRegistry, WorkChunkProcessor theExecutorSvc, IJobMaintenanceService theJobMaintenanceService, IHapiTransactionService theTransactionService) Constructor -
Method Summary
Modifier and TypeMethodDescriptioncancelInstance(String theInstanceId) org.springframework.data.domain.Page<JobInstance>fetchAllJobInstances(JobInstanceFetchRequest theFetchRequest) Fetches all job instances tht meet the FetchRequest criteriagetInstance(String theInstanceId) Fetch details about a job instancegetInstances(int thePageSize, int thePageIndex) Fetch all job instancesgetInstancesbyJobDefinitionIdAndEndedStatus(String theJobDefinitionId, Boolean theEnded, int theCount, int theStart) getJobInstancesByJobDefinitionId(String theJobDefinitionId, int theCount, int theStart) Fetches all jobs by job definition idgetJobInstancesByJobDefinitionIdAndStatuses(String theJobDefinitionId, Set<StatusEnum> theStatuses, int theCount, int theStart) Fetches all job instances by job definition id and statusesgetRecentInstances(int theCount, int theStart) Fetch recent job instancesvoidstart()startInstance(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, JobInstanceStartRequest theStartRequest) Starts a new job instancevoidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ca.uhn.fhir.batch2.api.IJobCoordinator
startInstance
-
Constructor Details
-
JobCoordinatorImpl
public JobCoordinatorImpl(@Nonnull BatchJobSender theBatchJobSender, @Nonnull IChannelReceiver theWorkChannelReceiver, @Nonnull IJobPersistence theJobPersistence, @Nonnull JobDefinitionRegistry theJobDefinitionRegistry, @Nonnull WorkChunkProcessor theExecutorSvc, @Nonnull IJobMaintenanceService theJobMaintenanceService, @Nonnull IHapiTransactionService theTransactionService) Constructor
-
-
Method Details
-
startInstance
public Batch2JobStartResponse startInstance(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, JobInstanceStartRequest theStartRequest) Description copied from interface:IJobCoordinatorStarts a new job instance- Specified by:
startInstancein interfaceIJobCoordinator- Parameters:
theRequestDetails- The request details associated with the request. This will get used to validate that the request is appropriate for the given user, so if at all possible it should be the original RequestDetails from the server request.theStartRequest- The request, containing the job type and parameters- Returns:
- Returns a unique ID for this job execution
-
getInstance
Description copied from interface:IJobCoordinatorFetch details about a job instance- Specified by:
getInstancein interfaceIJobCoordinator- Parameters:
theInstanceId- The instance ID- Returns:
- Returns the current instance details
-
getInstances
Description copied from interface:IJobCoordinatorFetch all job instances- Specified by:
getInstancesin interfaceIJobCoordinator
-
getRecentInstances
Description copied from interface:IJobCoordinatorFetch recent job instances- Specified by:
getRecentInstancesin interfaceIJobCoordinator
-
getInstancesbyJobDefinitionIdAndEndedStatus
public List<JobInstance> getInstancesbyJobDefinitionIdAndEndedStatus(String theJobDefinitionId, @Nullable Boolean theEnded, int theCount, int theStart) - Specified by:
getInstancesbyJobDefinitionIdAndEndedStatusin interfaceIJobCoordinator
-
getJobInstancesByJobDefinitionIdAndStatuses
public List<JobInstance> getJobInstancesByJobDefinitionIdAndStatuses(String theJobDefinitionId, Set<StatusEnum> theStatuses, int theCount, int theStart) Description copied from interface:IJobCoordinatorFetches all job instances by job definition id and statuses- Specified by:
getJobInstancesByJobDefinitionIdAndStatusesin interfaceIJobCoordinator
-
getJobInstancesByJobDefinitionId
public List<JobInstance> getJobInstancesByJobDefinitionId(String theJobDefinitionId, int theCount, int theStart) Description copied from interface:IJobCoordinatorFetches all jobs by job definition id- Specified by:
getJobInstancesByJobDefinitionIdin interfaceIJobCoordinator
-
fetchAllJobInstances
public org.springframework.data.domain.Page<JobInstance> fetchAllJobInstances(JobInstanceFetchRequest theFetchRequest) Description copied from interface:IJobCoordinatorFetches all job instances tht meet the FetchRequest criteria- Specified by:
fetchAllJobInstancesin interfaceIJobCoordinator- Parameters:
theFetchRequest- - fetch request- Returns:
- - page of job instances
-
cancelInstance
public JobOperationResultJson cancelInstance(String theInstanceId) throws ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException - Specified by:
cancelInstancein interfaceIJobCoordinator- Throws:
ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException
-
start
-
stop
-