Modifier and Type | Field and Description |
---|---|
static JobDeclaration |
HISTORY_CLEANUP_JOB_DECLARATION |
static int |
MAX_THREADS_NUMBER |
Constructor and Description |
---|
HistoryCleanupCmd(boolean immediatelyDue) |
Modifier and Type | Method and Description |
---|---|
protected void |
acquireExclusiveLock(CommandContext commandContext) |
protected HistoryCleanupContext |
createCleanupContext(int[] minuteChunk) |
protected JobEntity |
createJob(int[] minuteChunk) |
protected List<Job> |
createJobs(int degreeOfParallelism,
int[][] minuteChunks) |
Job |
execute(CommandContext commandContext) |
protected List<Job> |
getHistoryCleanupJobs() |
protected boolean |
isHistoryCleanupEnabled(CommandContext commandContext) |
boolean |
isRetryable()
When CockroachDB is used, this command may be retried multiple times until
it is successful, or the retries are exhausted.
|
protected List<Job> |
reconfigureJobs(List<Job> historyCleanupJobs,
int degreeOfParallelism,
int[][] minuteChunks) |
protected boolean |
shouldCreateJobs(List<Job> jobs) |
protected boolean |
shouldReconfigureJobs(List<Job> jobs) |
protected boolean |
shouldSuspendJobs(List<Job> jobs) |
protected void |
suspendJobs(List<Job> jobs) |
protected boolean |
willBeScheduled() |
protected void |
writeUserOperationLog(CommandContext commandContext) |
public static final JobDeclaration HISTORY_CLEANUP_JOB_DECLARATION
public static final int MAX_THREADS_NUMBER
public Job execute(CommandContext commandContext)
protected boolean willBeScheduled()
protected List<Job> reconfigureJobs(List<Job> historyCleanupJobs, int degreeOfParallelism, int[][] minuteChunks)
protected JobEntity createJob(int[] minuteChunk)
protected HistoryCleanupContext createCleanupContext(int[] minuteChunk)
protected void writeUserOperationLog(CommandContext commandContext)
protected boolean isHistoryCleanupEnabled(CommandContext commandContext)
protected void acquireExclusiveLock(CommandContext commandContext)
public boolean isRetryable()
isRetryable
in interface Command<Job>
CrdbTransactionRetryInterceptor
can make a transparent retry of this command upon failure
with a CrdbTransactionRetryException
(only used when running on CockroachDB).Copyright © 2022. All rights reserved.