public class HistoryCleanupJobHandlerConfiguration extends Object implements JobHandlerConfiguration
Modifier and Type | Field and Description |
---|---|
static String |
JOB_CONFIG_COUNT_EMPTY_RUNS |
static String |
JOB_CONFIG_EXECUTE_AT_ONCE |
static String |
JOB_CONFIG_MINUTE_FROM |
static String |
JOB_CONFIG_MINUTE_TO |
static int |
MAX_DELAY |
static int |
START_DELAY |
Constructor and Description |
---|
HistoryCleanupJobHandlerConfiguration() |
Modifier and Type | Method and Description |
---|---|
static HistoryCleanupJobHandlerConfiguration |
fromJson(com.google.gson.JsonObject jsonObject) |
int |
getCountEmptyRuns() |
int |
getMinuteFrom() |
int |
getMinuteTo() |
Date |
getNextRunWithDelay(Date date)
The delay between two "empty" runs increases twice each time until it reaches
MAX_DELAY value. |
boolean |
isImmediatelyDue() |
void |
setCountEmptyRuns(int countEmptyRuns) |
void |
setImmediatelyDue(boolean immediatelyDue) |
void |
setMinuteFrom(int minuteFrom) |
void |
setMinuteTo(int minuteTo) |
String |
toCanonicalString() |
public static final int START_DELAY
public static final int MAX_DELAY
public static final String JOB_CONFIG_COUNT_EMPTY_RUNS
public static final String JOB_CONFIG_EXECUTE_AT_ONCE
public static final String JOB_CONFIG_MINUTE_FROM
public static final String JOB_CONFIG_MINUTE_TO
public HistoryCleanupJobHandlerConfiguration()
public String toCanonicalString()
toCanonicalString
in interface JobHandlerConfiguration
public static HistoryCleanupJobHandlerConfiguration fromJson(com.google.gson.JsonObject jsonObject)
public Date getNextRunWithDelay(Date date)
MAX_DELAY
value.date
- date to count delay frompublic int getCountEmptyRuns()
public void setCountEmptyRuns(int countEmptyRuns)
public boolean isImmediatelyDue()
public void setImmediatelyDue(boolean immediatelyDue)
public int getMinuteFrom()
public void setMinuteFrom(int minuteFrom)
public int getMinuteTo()
public void setMinuteTo(int minuteTo)
Copyright © 2022. All rights reserved.