All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.lontime.extquartz.configuration.TriggerOption Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
package com.github.lontime.extquartz.configuration;

import java.time.Duration;
import java.util.Map;
import java.util.Set;
import java.util.TimeZone;

import com.github.lontime.base.commonj.constants.Consts;
import lombok.Getter;
import lombok.Setter;
import org.quartz.CronExpression;
import org.quartz.DailyTimeIntervalTrigger;
import org.quartz.SimpleTrigger;
import org.quartz.TimeOfDay;
import org.quartz.utils.Key;

/**
 * TriggerOption.
 * @author lontime
 * @since 1.0
 */
@Getter
@Setter
public class TriggerOption {
    private String instanceName = Consts.DEFAULT_OBJECT_NAME;
    private String name;
    private String groupName = Key.DEFAULT_GROUP;
    private Duration startFuture;
    private Duration expire;
    private Integer priority;
    private String desc;
    private String jobGroup = Key.DEFAULT_GROUP;
    private String jobName;
    private Map jobData;
    private String modifiedByCalendar;
    private Scheduler scheduler = new Scheduler();
    private Boolean replaceJob = true;
    private Boolean storeNonDurableWhileAwaitingScheduling = false;

    @Getter
    @Setter
    public static class Scheduler {
        private Integer misfireInstruction;
        private Simple simple = new Simple();
        private Cron cron;
        private DailyTimeInterval dailyTimeInterval;
    }

    @Getter
    @Setter
    public static class Simple {
        private Duration interval = Duration.ofSeconds(10);
        private Integer repeatCount = SimpleTrigger.REPEAT_INDEFINITELY;
    }

    @Getter
    @Setter
    public static class Cron {
        private CronExpression expression;
        private TimeZone timeZone;
    }

    @Getter
    @Setter
    public static class DailyTimeInterval {
        private Duration interval;
        private Set daysOfWeek;
        private TimeOfDay startTimeOfDay;
        private TimeOfDay endTimeOfDay;
        private Integer endingDailyAfterCount;
        private Integer repeatCount = DailyTimeIntervalTrigger.REPEAT_INDEFINITELY;
        private Boolean everyDay;
        private Boolean mondayThroughFriday;
        private Boolean saturdayAndSunday;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy