Class SchedulerResource
- java.lang.Object
-
- com.atlassian.confluence.functest.rest.admin.SchedulerResource
-
public class SchedulerResource extends Object
Modifies the Scheduler.Preferred invocation:
ConfluenceRestClient.getAdminSession().scheduler()
Legacy invocation:
ConfluenceRpc.admin.scheduler
-
-
Constructor Summary
Constructors Constructor Description SchedulerResource(com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.scheduler.core.LifecycleAwareSchedulerService schedulerService, SchedulerRunDetailsManager schedulerRunDetailsManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
countAll(String jobId, String outcome)
-
-
-
Constructor Detail
-
SchedulerResource
public SchedulerResource(com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.scheduler.core.LifecycleAwareSchedulerService schedulerService, SchedulerRunDetailsManager schedulerRunDetailsManager)
-
-
Method Detail
-
changeSchedulerState
public void changeSchedulerState(Map<String,Object> command) throws com.atlassian.scheduler.SchedulerServiceException
Pauses 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
public void changeJobGroupState(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
public void changeJobState(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"
-
-