public enum JobDestructionPolicy extends java.lang.Enum<JobDestructionPolicy>
This policy must be set individually on JobList
instances.
Thus, the jobs lists of a UWS service may have a different behavior when a
job destruction is required.
JobList.destroyJob(String)
, JobList.destroyJob(String, JobOwner)
Enum Constant and Description |
---|
ALWAYS_ARCHIVE
Alternative behavior proposed by UWSLibrary (but never described in any
UWS standard document).
|
ALWAYS_DELETE
Default behavior in UWS-1.0 (and in UWSLibrary).
|
ARCHIVE_ON_DATE
Behavior described in UWS-1.1 about the ARCHIVED phase.
|
Modifier and Type | Method and Description |
---|---|
static JobDestructionPolicy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static JobDestructionPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JobDestructionPolicy ALWAYS_DELETE
Default behavior in UWS-1.0 (and in UWSLibrary).
Jobs are ALWAYS immediately destroyed and removed from the
JobList
.
public static final JobDestructionPolicy ARCHIVE_ON_DATE
Behavior described in UWS-1.1 about the ARCHIVED phase.
Jobs are archived when the destruction date is reached.
The archived jobs are then still in the JobList
but in the ExecutionPhase.ARCHIVED
phase. An archived job is
stopped and all its resources (uploads, results and threads) are freed.
If the destruction date is yet not reached, the job is merely destroyed
and removed from the JobList
.
Note: Destroying an archived job will definitely destroy it. Thus, the real destruction of a job may be done in 2 steps while using this policy.
public static final JobDestructionPolicy ALWAYS_ARCHIVE
Alternative behavior proposed by UWSLibrary (but never described in any UWS standard document).
Jobs are ALWAYS immediately archived when a destruction is required (either because the destruction is reached or because of an explicit action of the UWS client).
The archived jobs are then still in the JobList
but in the
ExecutionPhase.ARCHIVED
phase. An archived job is stopped and
all its resources (uploads, results and threads) are freed.
Note: Destroying an archived job will definitely destroy it. Thus, the real destruction of a job must be done in 2 steps while using this policy.
public static JobDestructionPolicy[] values()
for (JobDestructionPolicy c : JobDestructionPolicy.values()) System.out.println(c);
public static JobDestructionPolicy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null