Class SchedulerResource
java.lang.Object
com.atlassian.confluence.functest.rest.admin.SchedulerResource
@Consumes("application/json")
@Produces("application/json")
@Path("/admin/scheduler")
public class SchedulerResource
extends Object
Modifies the Scheduler.
Preferred invocation: ConfluenceRestClient.getAdminSession().scheduler()
Legacy invocation: ConfluenceRpc.admin.scheduler
-
Constructor Summary
ConstructorsConstructorDescriptionSchedulerResource
(com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.scheduler.core.LifecycleAwareSchedulerService schedulerService, SchedulerRunDetailsManager schedulerRunDetailsManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
changeJobGroupState
(String jobRunnerKey, Map<String, Object> command) Pauses all jobs for a JobRunner.void
changeJobState
(String jobId, Map<String, Object> command) Controls a single job.void
changeSchedulerState
(Map<String, Object> command) Pauses and resumes the scheduler.javax.ws.rs.core.Response
-
Constructor Details
-
SchedulerResource
@Inject public SchedulerResource(com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.scheduler.core.LifecycleAwareSchedulerService schedulerService, SchedulerRunDetailsManager schedulerRunDetailsManager)
-
-
Method Details
-
countAll
-
changeSchedulerState
@POST public void changeSchedulerState(Map<String, Object> command) throws com.atlassian.scheduler.SchedulerServiceExceptionPauses and resumes the scheduler.- Parameters:
command
- the command for the scheduler, name entry may be "pause", "resume" or "shutdown"- Throws:
com.atlassian.scheduler.SchedulerServiceException
-
changeJobGroupState
@POST @Path("/job-runner/{jobRunnerKey}") public void changeJobGroupState(@PathParam("jobRunnerKey") String jobRunnerKey, Map<String, Object> command) Pauses all jobs for a JobRunner.- Parameters:
jobRunnerKey
- the name of the JobRunner to controlcommand
- the command for the JobRunner, name entry may be "pause"
-
changeJobState
@POST @Path("/job-id/{jobId}") public void changeJobState(@PathParam("jobId") String jobId, Map<String, Object> command) Controls a single job.Available commands are:
1. pause - pauses the job 2. resume - resumes a paused job 3. trigger - triggers the job synchronously
- Parameters:
jobId
- the ID of the job to controlcommand
- the command for the job, name entry may be "pause", "resume" or "trigger"
-