@Entity public class CommandEntity extends BaseEntity
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
APPLICATIONS_DTO_ENTITY_GRAPH
The name of the
EntityGraph which will eagerly load the command base fields and
its associated applications dto fields. |
static java.lang.String |
APPLICATIONS_ENTITY_GRAPH
The name of the
EntityGraph which will eagerly load the command base fields and
its associated applications base fields. |
static java.lang.String |
CLUSTER_CRITERIA_ENTITY_GRAPH
The name of the
EntityGraph which will eagerly load the command base fields and
its associated cluster criteria. |
static java.lang.String |
DTO_ENTITY_GRAPH
The name of the
EntityGraph which will eagerly load everything needed to construct a
Command DTO. |
| Constructor and Description |
|---|
CommandEntity()
Default Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addApplication(@NotNull ApplicationEntity application)
Append an application to the list of applications this command uses.
|
void |
addClusterCriterion(CriterionEntity criterion)
Add a new cluster criterion as the lowest priority criterion to evaluate for this command.
|
void |
addClusterCriterion(CriterionEntity criterion,
int priority)
Add a new cluster criterion with the given priority.
|
boolean |
equals(java.lang.Object o) |
java.util.Optional<com.fasterxml.jackson.databind.JsonNode> |
getLauncherExt()
Get any metadata associated with this command pertaining to specifying details for various agent launchers.
|
java.util.Optional<java.lang.Integer> |
getMemory()
Get the default memory for a job using this command.
|
int |
hashCode() |
void |
removeApplication(@NotNull ApplicationEntity application)
Remove an application from this command.
|
CriterionEntity |
removeClusterCriterion(int priority)
Remove the criterion with the given priority from the list of available criterion for this command.
|
void |
setApplications(java.util.List<ApplicationEntity> applications)
Sets the applications for this command.
|
void |
setClusterCriteria(java.util.List<CriterionEntity> clusterCriteria)
Set the criteria, in priority order, that this command has for determining which available clusters to use
for a job.
|
void |
setConfigs(java.util.Set<FileEntity> configs)
Set all the files associated as configuration files for this cluster.
|
void |
setDependencies(java.util.Set<FileEntity> dependencies)
Set all the files associated as dependency files for this cluster.
|
void |
setExecutable(@NotEmpty java.util.List<java.lang.String> executable)
Set the executable and any default arguments for this command.
|
void |
setLauncherExt(com.fasterxml.jackson.databind.JsonNode launcherExt)
Set any metadata pertaining to additional instructions for various launchers if this command is used.
|
void |
setTags(java.util.Set<TagEntity> tags)
Set all the tags associated to this cluster.
|
getDescription, getMetadata, getSetupFile, setDescription, setMetadata, setSetupFilegetCreated, getUpdated, onCreateBaseEntity, onUpdateBaseEntityclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetName, getStatus, getUser, getVersiongetUniqueIdgetCreated, getUpdatedgetIdpublic static final java.lang.String APPLICATIONS_ENTITY_GRAPH
EntityGraph which will eagerly load the command base fields and
its associated applications base fields.public static final java.lang.String APPLICATIONS_DTO_ENTITY_GRAPH
EntityGraph which will eagerly load the command base fields and
its associated applications dto fields.public static final java.lang.String CLUSTER_CRITERIA_ENTITY_GRAPH
EntityGraph which will eagerly load the command base fields and
its associated cluster criteria.public static final java.lang.String DTO_ENTITY_GRAPH
EntityGraph which will eagerly load everything needed to construct a
Command DTO.public void setExecutable(@NotEmpty
@NotEmpty java.util.List<java.lang.String> executable)
executable - The executable and default arguments which can't be blank and there must be at least onepublic void setConfigs(@Nullable
java.util.Set<FileEntity> configs)
configs - The configuration files to setpublic void setDependencies(@Nullable
java.util.Set<FileEntity> dependencies)
dependencies - The dependency files to setpublic void setTags(@Nullable
java.util.Set<TagEntity> tags)
tags - The dependency tags to setpublic java.util.Optional<java.lang.Integer> getMemory()
public java.util.Optional<com.fasterxml.jackson.databind.JsonNode> getLauncherExt()
Optional.empty() if there isn't anypublic void setLauncherExt(@Nullable
com.fasterxml.jackson.databind.JsonNode launcherExt)
launcherExt - The metadatapublic void setApplications(@Nullable
java.util.List<ApplicationEntity> applications)
throws PreconditionFailedException
applications - The application that this command usesPreconditionFailedException - if the list of applications contains duplicatespublic void addApplication(@NotNull
@NotNull ApplicationEntity application)
throws PreconditionFailedException
application - The application to add. Not null.PreconditionFailedException - If the application is a duplicate of an existing applicationpublic void removeApplication(@NotNull
@NotNull ApplicationEntity application)
application - The application to remove. Not null.public void setClusterCriteria(@Nullable
java.util.List<CriterionEntity> clusterCriteria)
clusterCriteria - The cluster criteriapublic void addClusterCriterion(CriterionEntity criterion)
criterion - The CriterionEntity to addpublic void addClusterCriterion(CriterionEntity criterion, int priority)
criterion - The new criterion to addpriority - The priority with which this criterion should be considered. 0 would be the highest
priority and anything greater than the current size of the existing criteria will just be added
to the end of the list. If a priority of < 0 is passed in the criterion is added
as the highest priority (0).public CriterionEntity removeClusterCriterion(int priority) throws java.lang.IllegalArgumentException
priority - The priority of the criterion to remove.CriterionEntity which was removed by this operationjava.lang.IllegalArgumentException - If this value is < 0 or > {@link List#size()} as it becomes
unclear what the user wants to dopublic boolean equals(java.lang.Object o)
equals in class BaseEntitypublic int hashCode()
hashCode in class BaseEntity