Package com.carfey.ops.api.bean.job
Class AbstractJobCreationRequest<T extends AbstractJobCreationRequest<?>>
- java.lang.Object
-
- com.carfey.ops.api.bean.job.AbstractJobCreationRequest<T>
-
- Direct Known Subclasses:
JobCreationRequest,JobSaveRequest
public abstract class AbstractJobCreationRequest<T extends AbstractJobCreationRequest<?>> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanautoInterruptprotected intautoRetryCountprotected intautoRetryIntervalprotected booleanautoRetryIntervalExponentprotected booleanchainAllprotected com.carfey.jdk.lang.DateTimeeffectiveDateprotected com.carfey.jdk.lang.DateTimeendDateprotected java.lang.Stringfolderprotected booleanhostPreferenceprotected java.util.List<java.lang.String>hostsprotected java.lang.StringjobClassprotected java.lang.StringmaxExecutionDurationprotected java.lang.StringminExecutionDurationprotected java.lang.Stringnicknameprotected java.util.List<ConfigurationParameter>parametersprotected intpickupBufferMinutesprotected JobRecoveryTyperecoveryTypeprotected java.lang.Stringscheduleprotected StartupShutdownModestartupShutdownModeprotected JobStatusstate
-
Constructor Summary
Constructors Constructor Description AbstractJobCreationRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAutoRetryCount()Defaults to 0.intgetAutoRetryInterval()java.lang.BooleangetAutoRetryIntervalExponent()com.carfey.jdk.lang.DateTimegetEffectiveDate()The initial schedule start date, if not immediately effective.com.carfey.jdk.lang.DateTimegetEndDate()The initial schedule end date, if not effective forever.java.lang.StringgetFolder()Optional.java.util.List<java.lang.String>getHosts()java.lang.StringgetJobClass()Required field.java.lang.StringgetMaxExecutionDuration()java.lang.StringgetMinExecutionDuration()java.lang.StringgetNickname()Required field.java.util.List<ConfigurationParameter>getParameters()Required only if a job defines required non-defaulted parameters.intgetPickupBufferMinutes()Defaults to 2.JobRecoveryTypegetRecoveryType()Required field.java.lang.StringgetSchedule()Required in some cases.StartupShutdownModegetStartupShutdownMode()JobStatusgetState()Required field.java.lang.BooleanisAutoInterrupt()booleanisChainAll()Defaults to false.booleanisHostPreference()voidsetAutoInterrupt(java.lang.Boolean autoInterrupt)voidsetAutoRetryCount(int autoRetryCount)voidsetAutoRetryInterval(int autoRetryInterval)voidsetAutoRetryIntervalExponent(java.lang.Boolean autoRetryIntervalExponent)voidsetChainAll(boolean chainAll)voidsetEffectiveDate(com.carfey.jdk.lang.DateTime effectiveDate)voidsetEndDate(com.carfey.jdk.lang.DateTime endDate)voidsetFolder(java.lang.String folder)voidsetHostPreference(boolean hostPreference)voidsetHosts(java.util.List<java.lang.String> hosts)voidsetJobClass(java.lang.String jobClass)voidsetMaxExecutionDuration(java.lang.String maxExecutionDuration)voidsetMinExecutionDuration(java.lang.String minExecutionDuration)voidsetNickname(java.lang.String nickname)voidsetParameters(java.util.List<ConfigurationParameter> parameters)voidsetPickupBufferMinutes(int pickupBufferMinutes)voidsetRecoveryType(JobRecoveryType recoveryType)voidsetSchedule(java.lang.String schedule)voidsetStartupShutdownMode(StartupShutdownMode startupShutdownMode)voidsetState(JobStatus state)java.lang.StringtoString()TwithAutoInterrupt(java.lang.Boolean autoInterrupt)TwithAutoRetryCount(int autoRetryCount)TwithAutoRetryInterval(int autoRetryInterval)TwithAutoRetryIntervalExponent(java.lang.Boolean autoRetryIntervalExponent)TwithChainAll(boolean chainAll)TwithEffectiveDate(com.carfey.jdk.lang.DateTime effectiveDate)TwithEndDate(com.carfey.jdk.lang.DateTime endDate)TwithFolder(java.lang.String folder)TwithHostPreference(boolean hostPreference)TwithHosts(java.util.List<java.lang.String> hosts)TwithJobClass(java.lang.String jobClass)TwithMaxExecutionDuration(java.lang.String maxExecutionDuration)TwithMinExecutionDuration(java.lang.String minExecutionDuration)TwithNickname(java.lang.String nickname)TwithParameters(java.util.List<ConfigurationParameter> parameters)TwithPickupBufferMinutes(int pickupBufferMinutes)TwithRecoveryType(JobRecoveryType recoveryType)TwithSchedule(java.lang.String schedule)TwithStartupShutdownMode(StartupShutdownMode startupShutdownMode)TwithState(JobStatus state)
-
-
-
Field Detail
-
jobClass
@FieldProperty(displayName="jobClass", maxLength=255, required=true) protected java.lang.String jobClass
-
nickname
@FieldProperty(displayName="nickname", maxLength=255, required=true) protected java.lang.String nickname
-
folder
@FieldProperty(displayName="folder", maxLength=255, required=false) protected java.lang.String folder
-
pickupBufferMinutes
@FieldProperty(displayName="pickupBufferMinutes", maxLength=4, required=true) protected int pickupBufferMinutes
-
recoveryType
@FieldProperty(displayName="recoveryType", maxLength=10, required=true) protected JobRecoveryType recoveryType
-
hosts
@FieldProperty(displayName="hosts", maxLength=50, required=false) protected java.util.List<java.lang.String> hosts
-
parameters
@FieldProperty(displayName="parameters", required=false) protected java.util.List<ConfigurationParameter> parameters
-
minExecutionDuration
protected java.lang.String minExecutionDuration
-
maxExecutionDuration
protected java.lang.String maxExecutionDuration
-
chainAll
protected boolean chainAll
-
hostPreference
protected boolean hostPreference
-
autoInterrupt
protected boolean autoInterrupt
-
autoRetryCount
protected int autoRetryCount
-
autoRetryInterval
protected int autoRetryInterval
-
autoRetryIntervalExponent
protected boolean autoRetryIntervalExponent
-
startupShutdownMode
protected StartupShutdownMode startupShutdownMode
-
state
@FieldProperty(displayName="state", maxLength=50, required=true) protected JobStatus state
-
schedule
@FieldProperty(displayName="schedule", required=false) protected java.lang.String schedule
-
effectiveDate
protected com.carfey.jdk.lang.DateTime effectiveDate
-
endDate
protected com.carfey.jdk.lang.DateTime endDate
-
-
Method Detail
-
getJobClass
public java.lang.String getJobClass()
Required field.- Returns:
- fully-qualified job class
-
setJobClass
public void setJobClass(java.lang.String jobClass)
-
withJobClass
public T withJobClass(java.lang.String jobClass)
-
getNickname
public java.lang.String getNickname()
Required field.- Returns:
- nickname
-
setNickname
public void setNickname(java.lang.String nickname)
-
withNickname
public T withNickname(java.lang.String nickname)
-
getFolder
public java.lang.String getFolder()
Optional. Specify paths in the format a/b/c.- Returns:
- folder for this job
- Since:
- 4.1.0
-
setFolder
public void setFolder(java.lang.String folder)
-
withFolder
public T withFolder(java.lang.String folder)
-
getPickupBufferMinutes
public int getPickupBufferMinutes()
Defaults to 2.- Returns:
- pickup buffer minutes
-
setPickupBufferMinutes
public void setPickupBufferMinutes(int pickupBufferMinutes)
-
withPickupBufferMinutes
public T withPickupBufferMinutes(int pickupBufferMinutes)
-
getRecoveryType
public JobRecoveryType getRecoveryType()
Required field. SeeJobRecoveryType.- Returns:
- recovery type
-
setRecoveryType
public void setRecoveryType(JobRecoveryType recoveryType)
-
withRecoveryType
public T withRecoveryType(JobRecoveryType recoveryType)
-
getHosts
public java.util.List<java.lang.String> getHosts()
-
setHosts
public void setHosts(java.util.List<java.lang.String> hosts)
-
withHosts
public T withHosts(java.util.List<java.lang.String> hosts)
-
getMinExecutionDuration
public java.lang.String getMinExecutionDuration()
-
setMinExecutionDuration
public void setMinExecutionDuration(java.lang.String minExecutionDuration)
-
withMinExecutionDuration
public T withMinExecutionDuration(java.lang.String minExecutionDuration)
-
getMaxExecutionDuration
public java.lang.String getMaxExecutionDuration()
-
setMaxExecutionDuration
public void setMaxExecutionDuration(java.lang.String maxExecutionDuration)
-
withMaxExecutionDuration
public T withMaxExecutionDuration(java.lang.String maxExecutionDuration)
-
getAutoRetryCount
public int getAutoRetryCount()
Defaults to 0.- Returns:
- auto retry count
-
setAutoRetryCount
public void setAutoRetryCount(int autoRetryCount)
-
withAutoRetryCount
public T withAutoRetryCount(int autoRetryCount)
-
getAutoRetryInterval
public int getAutoRetryInterval()
-
setAutoRetryInterval
public void setAutoRetryInterval(int autoRetryInterval)
-
withAutoRetryInterval
public T withAutoRetryInterval(int autoRetryInterval)
-
getAutoRetryIntervalExponent
public java.lang.Boolean getAutoRetryIntervalExponent()
-
setAutoRetryIntervalExponent
public void setAutoRetryIntervalExponent(java.lang.Boolean autoRetryIntervalExponent)
-
withAutoRetryIntervalExponent
public T withAutoRetryIntervalExponent(java.lang.Boolean autoRetryIntervalExponent)
-
isChainAll
public boolean isChainAll()
Defaults to false.- Returns:
- chain all setting
-
setChainAll
public void setChainAll(boolean chainAll)
-
withChainAll
public T withChainAll(boolean chainAll)
-
getParameters
public java.util.List<ConfigurationParameter> getParameters()
Required only if a job defines required non-defaulted parameters.- Returns:
- parameters
-
setParameters
public void setParameters(java.util.List<ConfigurationParameter> parameters)
-
withParameters
public T withParameters(java.util.List<ConfigurationParameter> parameters)
-
getState
public JobStatus getState()
Required field. The initial job schedule state. SeeJobStatus.- Returns:
- job status
-
setState
public void setState(JobStatus state)
-
getSchedule
public java.lang.String getSchedule()
Required in some cases. The initial job schedule, if applicable for the state.- Returns:
- schedule
-
setSchedule
public void setSchedule(java.lang.String schedule)
-
withSchedule
public T withSchedule(java.lang.String schedule)
-
getEffectiveDate
public com.carfey.jdk.lang.DateTime getEffectiveDate()
The initial schedule start date, if not immediately effective.- Returns:
- effective date
-
setEffectiveDate
public void setEffectiveDate(com.carfey.jdk.lang.DateTime effectiveDate)
-
withEffectiveDate
public T withEffectiveDate(com.carfey.jdk.lang.DateTime effectiveDate)
-
getEndDate
public com.carfey.jdk.lang.DateTime getEndDate()
The initial schedule end date, if not effective forever.- Returns:
- end date
-
setEndDate
public void setEndDate(com.carfey.jdk.lang.DateTime endDate)
-
withEndDate
public T withEndDate(com.carfey.jdk.lang.DateTime endDate)
-
isHostPreference
public boolean isHostPreference()
-
setHostPreference
public void setHostPreference(boolean hostPreference)
-
withHostPreference
public T withHostPreference(boolean hostPreference)
-
isAutoInterrupt
public java.lang.Boolean isAutoInterrupt()
- Returns:
- auto interrupt setting
- Since:
- 3.4.0
-
setAutoInterrupt
public void setAutoInterrupt(java.lang.Boolean autoInterrupt)
-
withAutoInterrupt
public T withAutoInterrupt(java.lang.Boolean autoInterrupt)
-
getStartupShutdownMode
public StartupShutdownMode getStartupShutdownMode()
- Since:
- 4.10.0
-
setStartupShutdownMode
public void setStartupShutdownMode(StartupShutdownMode startupShutdownMode)
- Since:
- 4.10.0
-
withStartupShutdownMode
public T withStartupShutdownMode(StartupShutdownMode startupShutdownMode)
- Since:
- 4.10.0
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-