Class CronJobSpec
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.api.batch.v1beta1.CronJobSpec
-
- All Implemented Interfaces:
com.marcnuri.yakc.model.Model
public class CronJobSpec extends java.lang.Object implements com.marcnuri.yakc.model.Model
CronJobSpec describes how the job execution will look like and when it will actually run.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CronJobSpec.Builder
-
Constructor Summary
Constructors Constructor Description CronJobSpec()
CronJobSpec(java.lang.String concurrencyPolicy, java.lang.Number failedJobsHistoryLimit, @NonNull JobTemplateSpec jobTemplate, @NonNull java.lang.String schedule, java.lang.Number startingDeadlineSeconds, java.lang.Number successfulJobsHistoryLimit, java.lang.Boolean suspend)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CronJobSpec.Builder
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.lang.String
getConcurrencyPolicy()
Specifies how to treat concurrent executions of a Job.java.lang.Number
getFailedJobsHistoryLimit()
The number of failed finished jobs to retain.@NonNull JobTemplateSpec
getJobTemplate()
@NonNull java.lang.String
getSchedule()
The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.java.lang.Number
getStartingDeadlineSeconds()
Optional deadline in seconds for starting the job if it misses scheduled time for any reason.java.lang.Number
getSuccessfulJobsHistoryLimit()
The number of successful finished jobs to retain.java.lang.Boolean
getSuspend()
This flag tells the controller to suspend subsequent executions, it does not apply to already started executions.int
hashCode()
void
setConcurrencyPolicy(java.lang.String concurrencyPolicy)
Specifies how to treat concurrent executions of a Job.void
setFailedJobsHistoryLimit(java.lang.Number failedJobsHistoryLimit)
The number of failed finished jobs to retain.void
setJobTemplate(@NonNull JobTemplateSpec jobTemplate)
void
setSchedule(@NonNull java.lang.String schedule)
The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.void
setStartingDeadlineSeconds(java.lang.Number startingDeadlineSeconds)
Optional deadline in seconds for starting the job if it misses scheduled time for any reason.void
setSuccessfulJobsHistoryLimit(java.lang.Number successfulJobsHistoryLimit)
The number of successful finished jobs to retain.void
setSuspend(java.lang.Boolean suspend)
This flag tells the controller to suspend subsequent executions, it does not apply to already started executions.CronJobSpec.Builder
toBuilder()
java.lang.String
toString()
-
-
-
Constructor Detail
-
CronJobSpec
public CronJobSpec(java.lang.String concurrencyPolicy, java.lang.Number failedJobsHistoryLimit, @NonNull @NonNull JobTemplateSpec jobTemplate, @NonNull @NonNull java.lang.String schedule, java.lang.Number startingDeadlineSeconds, java.lang.Number successfulJobsHistoryLimit, java.lang.Boolean suspend)
-
CronJobSpec
public CronJobSpec()
-
-
Method Detail
-
builder
public static CronJobSpec.Builder builder()
-
toBuilder
public CronJobSpec.Builder toBuilder()
-
getConcurrencyPolicy
public java.lang.String getConcurrencyPolicy()
Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one
-
getFailedJobsHistoryLimit
public java.lang.Number getFailedJobsHistoryLimit()
The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
-
getJobTemplate
@NonNull public @NonNull JobTemplateSpec getJobTemplate()
-
getSchedule
@NonNull public @NonNull java.lang.String getSchedule()
The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
-
getStartingDeadlineSeconds
public java.lang.Number getStartingDeadlineSeconds()
Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.
-
getSuccessfulJobsHistoryLimit
public java.lang.Number getSuccessfulJobsHistoryLimit()
The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.
-
getSuspend
public java.lang.Boolean getSuspend()
This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.
-
setConcurrencyPolicy
public void setConcurrencyPolicy(java.lang.String concurrencyPolicy)
Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one
-
setFailedJobsHistoryLimit
public void setFailedJobsHistoryLimit(java.lang.Number failedJobsHistoryLimit)
The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
-
setJobTemplate
public void setJobTemplate(@NonNull @NonNull JobTemplateSpec jobTemplate)
-
setSchedule
public void setSchedule(@NonNull @NonNull java.lang.String schedule)
The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
-
setStartingDeadlineSeconds
public void setStartingDeadlineSeconds(java.lang.Number startingDeadlineSeconds)
Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.
-
setSuccessfulJobsHistoryLimit
public void setSuccessfulJobsHistoryLimit(java.lang.Number successfulJobsHistoryLimit)
The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.
-
setSuspend
public void setSuspend(java.lang.Boolean suspend)
This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-