Class ScheduledJobInfoImpl

  • All Implemented Interfaces:
    Serializable, org.apache.sling.event.jobs.ScheduledJobInfo

    public class ScheduledJobInfoImpl
    extends Object
    implements org.apache.sling.event.jobs.ScheduledJobInfo, Serializable
    The job schedule information. It holds all required information like - the name of the schedule - the job topic - the job properties - scheduling information
    See Also:
    Serialized Form
    • Constructor Detail

      • ScheduledJobInfoImpl

        public ScheduledJobInfoImpl​(JobSchedulerImpl jobScheduler,
                                    String scheduleName)
        Create a new info object
        Parameters:
        jobScheduler - The job scheduler
        scheduleName - The unique name
    • Method Detail

      • update

        public void update​(String jobTopic,
                           Map<String,​Object> jobProperties)
        Update/set the job related information
        Parameters:
        jobTopic - The job topic
        jobProperties - The job properties
      • update

        public void update​(List<org.apache.sling.event.jobs.ScheduleInfo> scheduleInfos)
        Update the scheduling information
        Parameters:
        scheduleInfos - The new schedule
      • getName

        public String getName()
        Get the schedule name
      • getSchedules

        public Collection<org.apache.sling.event.jobs.ScheduleInfo> getSchedules()
        Specified by:
        getSchedules in interface org.apache.sling.event.jobs.ScheduledJobInfo
        See Also:
        ScheduledJobInfo.getSchedules()
      • getNextScheduledExecution

        public Date getNextScheduledExecution()
        Specified by:
        getNextScheduledExecution in interface org.apache.sling.event.jobs.ScheduledJobInfo
        See Also:
        ScheduledJobInfo.getNextScheduledExecution()
      • getJobTopic

        public String getJobTopic()
        Specified by:
        getJobTopic in interface org.apache.sling.event.jobs.ScheduledJobInfo
        See Also:
        ScheduledJobInfo.getJobTopic()
      • getJobProperties

        public Map<String,​Object> getJobProperties()
        Specified by:
        getJobProperties in interface org.apache.sling.event.jobs.ScheduledJobInfo
        See Also:
        ScheduledJobInfo.getJobProperties()
      • unschedule

        public void unschedule()
        Specified by:
        unschedule in interface org.apache.sling.event.jobs.ScheduledJobInfo
        See Also:
        ScheduledJobInfo.unschedule()
      • reschedule

        public org.apache.sling.event.jobs.JobBuilder.ScheduleBuilder reschedule()
        Specified by:
        reschedule in interface org.apache.sling.event.jobs.ScheduledJobInfo
        See Also:
        ScheduledJobInfo.reschedule()
      • suspend

        public void suspend()
        Specified by:
        suspend in interface org.apache.sling.event.jobs.ScheduledJobInfo
        See Also:
        ScheduledJobInfo.suspend()
      • resume

        public void resume()
        Specified by:
        resume in interface org.apache.sling.event.jobs.ScheduledJobInfo
        See Also:
        ScheduledJobInfo.resume()
      • isSuspended

        public boolean isSuspended()
        Specified by:
        isSuspended in interface org.apache.sling.event.jobs.ScheduledJobInfo
        See Also:
        ScheduledJobInfo.isSuspended()
      • getSchedulerJobId

        public String getSchedulerJobId()
        Get the scheduler job id