public class Workshift extends BaseMetadata implements Serializable
Workshift is used for two main features with respect to a Request Processor.
The combination of the above two features gives the ability to exactly define what kind of requests a processor should process (work assignment) and how much resources should be given for processing.
Finally multiple work assignments (each having a work shift) can be associated to a Request Processor to control and vary the kind of work that can be processed and the resources for it.
For example a work assignment can have 2 workshifts, dayshift and nightshift. Here the daytime workshift can have more resources for peak time while the nightshift can have very few.
Workshifts are always associated with a work assignment first and the work assignment is then bound to a Request Processor.
Modifier and Type | Field and Description |
---|---|
static int |
NO_LIMIT
Constant that indicates no async limit is set.
|
Constructor and Description |
---|
Workshift(String name, String description, MetadataObjectId schedule, int duration, int allocation)
Creates a Workshift definition with no async limits.
|
Workshift(String name, String description, MetadataObjectId schedule, int duration, int allocation, int plsqlLimit, int asyncJavaLimit)
Creates a fully-defined Workshift definition.
|
Workshift(String name, String displayNameKey, String descriptionKey, MetadataObjectId schedule, int duration, int allocation, int plsqlLimit, int asyncJavaLimit, String[] resourceBundleIDs)
Creates a fully-defined Workshift definition and associated resource bundles.
|
Workshift(String name, String displayNameKey, String descriptionKey, MetadataObjectId schedule, int duration, int allocation, String[] resourceBundleIDs)
Creates a Workshift definition with no async limits and with associated resource bundles.
|
Modifier and Type | Method and Description |
---|---|
Workshift |
clone(String newName) |
boolean |
equals(Object obj)
Compares an object for equality with this Workshift object.
|
int |
getAllocation()
Gets the allocation weighting factor for this Workshift.
|
int |
getAsyncJavaLimit()
Gets the maximum number of asyncJava jobs that can be running concurrently for this (Workshift, IsolationGroup).
|
BaseMetadataType |
getBaseMetadataType()
Gets the intended type of this metadata.
|
int |
getDuration()
The duration, in minutes, of this Workshift.
|
int |
getPlsqlLimit()
Gets the maximum number of PL/SQL jobs that can be running concurrently for this (Workshift, IsolationGroup).
|
MetadataObjectId |
getSchedule()
Gets the
MetadataObjectId for the Schedule associated with this workshift. |
void |
setAllocation(int allocation)
Sets the allocation weighting factor for this Workshift.
|
void |
setAsyncJavaLimit(int asyncJavaLimit)
Sets the max number of asyncJava jobs that can be running concurrently for this (Workshift, IsolationGroup).
|
void |
setDuration(int duration)
Sets the duration.
|
void |
setPlsqlLimit(int plsqlLimit)
Sets the maximum number of PL/SQL jobs that can be running concurrently for this (Workshift, IsolationGroup).
|
void |
setSchedule(MetadataObjectId schedule)
Sets the Schedule for this Workshift.
|
String |
toString()
Same value as
BaseMetadata.getName() . |
getDescription, getDescriptionKey, getDisplayName, getDisplayNameKey, getMetadataObjectId, getName, getResourceBundles, hashCode, setDescription, setDescriptionKey, setDisplayName, setDisplayNameKey, setResourceBundles, validate
public static final int NO_LIMIT
public Workshift(String name, String description, MetadataObjectId schedule, int duration, int allocation)
name
- name of the Workshift.description
- optional description.schedule
- name of a Schedule definition.duration
- duration in minutes that the workshift is active for each date in the schedule.allocation
- allocation weighting factor for resources.public Workshift(String name, String description, MetadataObjectId schedule, int duration, int allocation, int plsqlLimit, int asyncJavaLimit)
name
- name of the Workshift.description
- optional description.schedule
- name of a Schedule definition.duration
- duration in minutes that the workshift is active for each date in the schedule.allocation
- allocation weighting factor for resources.plsqlLimit
- global limit of PL/SQL jobs running in this workshift.asyncJavaLimit
- global limit of asyncJava jobs running in this workshift.public Workshift(String name, String displayNameKey, String descriptionKey, MetadataObjectId schedule, int duration, int allocation, String[] resourceBundleIDs)
name
- workshift name. The name is also used as the default display name unless otherwise specifically set.displayNameKey
- resource bundle key for the display name. Optional.descriptionKey
- resource bundle key for the description. Optional.schedule
- name of a Schedule definition.duration
- duration in minutes that the workshift is active for each date in the schedule.allocation
- allocation weighting factor for resources.resourceBundleIDs
- array of resource bundle ids. Optional.public Workshift(String name, String displayNameKey, String descriptionKey, MetadataObjectId schedule, int duration, int allocation, int plsqlLimit, int asyncJavaLimit, String[] resourceBundleIDs)
name
- workshift name. The name is also used as the default display name unless otherwise specifically set.displayNameKey
- resource bundle key for the display name. Optional.descriptionKey
- resource bundle key for the description. Optional.schedule
- name of a Schedule definition.duration
- duration in minutes that the workshift is active for each date in the schedule.allocation
- allocation weighting factor for resources.plsqlLimit
- global limit of PL/SQL jobs running in this workshift.asyncJavaLimit
- global limit of asyncJava jobs running in this workshift.resourceBundleIDs
- array of resource bundle ids. Optional.public int getAllocation()
public void setAllocation(int allocation)
allocation
- weighting factor of this Workshift.public int getPlsqlLimit()
public void setPlsqlLimit(int plsqlLimit)
plsqlLimit
- concurrent PL/SQL jobs.public int getAsyncJavaLimit()
public void setAsyncJavaLimit(int asyncJavaLimit)
asyncJavaLimit
- concurrent asyncJava jobs.public MetadataObjectId getSchedule()
MetadataObjectId
for the Schedule
associated with this workshift.
To retrieve the Schedule definition itself, call the MetadataService.geSchedule
API and pass the name returned by this method.
null
if no schedule is specified.public void setSchedule(MetadataObjectId schedule)
When this Workshift is added to the system via the call to MetadataService.addWorkshift
, the metadata service will verify that a Schedule definition referred by the name given in this method exists in the metadata repository.
schedule
- identifier of the Schedule definition.public int getDuration()
public void setDuration(int duration)
duration
- duration in minutes.public boolean equals(Object obj)
public String toString()
BaseMetadata
BaseMetadata.getName()
.toString
in class BaseMetadata
public BaseMetadataType getBaseMetadataType()
BaseMetadata
getBaseMetadataType
in class BaseMetadata
public Workshift clone(String newName)
clone
in class BaseMetadata