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 int |
MAX_DELAY |
static int |
START_DELAY |
Constructor and Description |
---|
HistoryCleanupJobHandlerConfiguration() |
Modifier and Type | Method and Description |
---|---|
static HistoryCleanupJobHandlerConfiguration |
fromJson(JSONObject jsonObject) |
int |
getCountEmptyRuns() |
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) |
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 HistoryCleanupJobHandlerConfiguration()
public String toCanonicalString()
toCanonicalString
in interface JobHandlerConfiguration
public static HistoryCleanupJobHandlerConfiguration fromJson(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)
Copyright © 2017. All rights reserved.