Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Enterprise Scheduler Service
11g Release 1 (11.1.1.6.3)
E26229-05


oracle.as.scheduler
Class Workshift

java.lang.Object
  extended by oracle.as.scheduler.BaseMetadata<Workshift>
      extended by oracle.as.scheduler.Workshift

All Implemented Interfaces:
java.io.Serializable

public class Workshift
extends BaseMetadata<Workshift>
implements java.io.Serializable

This class defines a workshift for any Request Processor. A workshift indicates the operating (active) times for any Request Processor. Workshift is used for 2 main features with respect to a Request Processor: 1) Work assignments can be attached to a Request Processor on a per Workshift basis. 2) Resources of a Request Processor can be controlled on a per Workshift basis. 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 Request Processor can have 2 workshifts, dayshift and nighshift. 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.

See Also:
Serialized Form

Field Summary
static int NO_LIMIT
           

 

Constructor Summary
Workshift(java.lang.String name, java.lang.String description, MetadataObjectId schedule, int duration, int allocation)
          Creates a Workshift definition with no async limits.
Workshift(java.lang.String name, java.lang.String description, MetadataObjectId schedule, int duration, int allocation, int plsqlLimit, int asyncJavaLimit)
          Creates a fully-defined Workshift definition.
Workshift(java.lang.String name, java.lang.String description, MetadataObjectId schedule, int duration, int allocation, int plsqlLimit, int asyncJavaLimit, MetadataObjectId objectId)
          Constructs a new instance.
Workshift(java.lang.String name, java.lang.String description, MetadataObjectId schedule, int duration, int allocation, MetadataObjectId objectId)
          Constructs a new instance.
Workshift(java.lang.String name, java.lang.String displayNameKey, java.lang.String descriptionKey, MetadataObjectId schedule, int duration, int allocation, int plsqlLimit, int asyncJavaLimit, java.lang.String[] resourceBundleIDs)
          Creates a fully-defined Workshift definition and associated resource bundles.
Workshift(java.lang.String name, java.lang.String displayNameKey, java.lang.String descriptionKey, MetadataObjectId schedule, int duration, int allocation, java.lang.String[] resourceBundleIDs)
          Creates a Workshift definition with no async limits and with associated resource bundles.

 

Method Summary
 Workshift clone(java.lang.String newName)
           
 boolean equals(java.lang.Object obj)
          Compares an object for equality with this Workshift object.
static Workshift from(javax.management.openmbean.CompositeData cd)
          Create an instance of the model specific class out of an associated CompositeData instance
 int getAllocation()
          Returns the allocation weighting factor for this Workshift.
 int getAsyncJavaLimit()
          Returns max number of asyncJava jobs that can be running concurrently for this (Workshift, IsolationGroup).
 BaseMetadataType<Workshift> getBaseMetadataType()
           
 int getDuration()
          Returns the duration in minutes of this Workshift.
 int getPlsqlLimit()
          Returns max number of PL/SQL jobs that can be running concurrently for this (Workshift, IsolationGroup).
 MetadataObjectId getSchedule()
          Returns the MetadataObjectId for the Schedule associated with this workshift.
protected  Workshift getSelf()
           
 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 max number of PL/SQL jobs that can be running concurrently for this (Workshift, IsolationGroup).
 void setSchedule(MetadataObjectId schedule)
          Sets the Schedule for this Workshift.
 javax.management.openmbean.CompositeData toCompositeData(javax.management.openmbean.CompositeType ct)
           
static javax.management.openmbean.CompositeType toCompositeType()
          Returns the CompositeType that describes this model specific class
 java.lang.String toDebugString()
          Returns a debug string representation for this Workshift object.
 java.lang.String toString()
           
protected  void validateCustom()
          Validates this instance of Workshift.

 

Methods inherited from class oracle.as.scheduler.BaseMetadata
from, getDescription, getDescriptionKey, getDisplayName, getDisplayNameKey, getMessages, getMetadataObjectId, getName, getResourceBundles, hashCode, localize, setDescription, setDescriptionKey, setDisplayName, setDisplayNameKey, setResourceBundles, toCompositeData, validate

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

NO_LIMIT

public static final int NO_LIMIT
See Also:
Constant Field Values

Constructor Detail

Workshift

public Workshift(java.lang.String name,
                 java.lang.String description,
                 MetadataObjectId schedule,
                 int duration,
                 int allocation)
Creates a Workshift definition with no async limits.
Parameters:
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.

Workshift

public Workshift(java.lang.String name,
                 java.lang.String description,
                 MetadataObjectId schedule,
                 int duration,
                 int allocation,
                 int plsqlLimit,
                 int asyncJavaLimit)
Creates a fully-defined Workshift definition.
Parameters:
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.

Workshift

public Workshift(java.lang.String name,
                 java.lang.String displayNameKey,
                 java.lang.String descriptionKey,
                 MetadataObjectId schedule,
                 int duration,
                 int allocation,
                 java.lang.String[] resourceBundleIDs)
Creates a Workshift definition with no async limits and with associated resource bundles.
Parameters:
name - workshift name. The name is also used as the default display name unless otherwise specifially set.
displayNameKey - key of the entry in the resourcebundles to lookup the name. Optional.
descriptionKey - key of the entry in the resourcebundles to lookup 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.

Workshift

public Workshift(java.lang.String name,
                 java.lang.String displayNameKey,
                 java.lang.String descriptionKey,
                 MetadataObjectId schedule,
                 int duration,
                 int allocation,
                 int plsqlLimit,
                 int asyncJavaLimit,
                 java.lang.String[] resourceBundleIDs)
Creates a fully-defined Workshift definition and associated resource bundles.
Parameters:
name - workshift name. The name is also used as the default display name unless otherwise specifially set.
displayNameKey - key of the entry in the resourcebundles to lookup the name. Optional.
descriptionKey - key of the entry in the resourcebundles to lookup 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.

Workshift

public Workshift(java.lang.String name,
                 java.lang.String description,
                 MetadataObjectId schedule,
                 int duration,
                 int allocation,
                 MetadataObjectId objectId)
Constructs a new instance. This constructor is for internal use ONLY and should not be used to construct a new instance. This constructor is used internally by the MetadataService to populate the unique identifier of this object(definition) within the metadata repository.
Parameters:
name - workshift name. The name is also used as the default display name unless otherwise specifially set.
description - optional description.
schedule - name of a Schedule definition.
duration - duration in minutes for each date in the schedule.
allocation - allocation weighting factor for resources.
objectId - unique metadata object id. Set only when this workshift was retrieved via MetadataService.

Workshift

public Workshift(java.lang.String name,
                 java.lang.String description,
                 MetadataObjectId schedule,
                 int duration,
                 int allocation,
                 int plsqlLimit,
                 int asyncJavaLimit,
                 MetadataObjectId objectId)
Constructs a new instance. This constructor is for internal use ONLY and should not be used to construct a new instance. This constructor is used internally by the MetadataService to populate the unique identifier of this object(definition) within the metadata repository.
Parameters:
name - workshift name. The name is also used as the default display name unless otherwise specifially set.
description - optional description.
schedule - name of a Schedule definition.
duration - duration in minutes 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.
objectId - unique metadata object id. Set only when this workshift was retrieved via MetadataService.

Method Detail

getAllocation

public int getAllocation()
Returns the allocation weighting factor for this Workshift.
Returns:
allocation weighting factor of this Workshift

setAllocation

public void setAllocation(int allocation)
Sets the allocation weighting factor for this Workshift.
Parameters:
allocation - weighting factor of this Workshift.

getPlsqlLimit

public int getPlsqlLimit()
Returns max number of PL/SQL jobs that can be running concurrently for this (Workshift, IsolationGroup).
Returns:
PL/SQL job limit

setPlsqlLimit

public void setPlsqlLimit(int plsqlLimit)
Sets the max number of PL/SQL jobs that can be running concurrently for this (Workshift, IsolationGroup).
Parameters:
plsqlLimit - concurrent PL/SQL jobs

getAsyncJavaLimit

public int getAsyncJavaLimit()
Returns max number of asyncJava jobs that can be running concurrently for this (Workshift, IsolationGroup).
Returns:
asyncJava job limit

setAsyncJavaLimit

public void setAsyncJavaLimit(int asyncJavaLimit)
Sets the max number of asyncJava jobs that can be running concurrently for this (Workshift, IsolationGroup).
Parameters:
asyncJavaLimit - concurrent asyncJava jobs

getSchedule

public MetadataObjectId getSchedule()
Returns the MetadataObjectId for the Schedule associated with this workshift.

To retrieve the Schedule definition itself, getSchedule() method in the scheduler metadata services can be used passing the name returned by this method.

Returns:
metadata object id of Schedule definition or null if no schedule is specified

setSchedule

public void setSchedule(MetadataObjectId schedule)
Sets the Schedule for this Workshift. When this Workshift is added to the system via the call to addWorkshift() in the schedule metadata services, the metadata service will verify that a Schedule definition referred by the name given in this method exists in the metadata repository.
Parameters:
schedule - identifier of the Schedule definition.

getDuration

public int getDuration()
Returns the duration in minutes of this Workshift.
Returns:
duration in minutes.

setDuration

public void setDuration(int duration)
Sets the duration.
Parameters:
duration - duration in minutes.

validateCustom

protected void validateCustom()
                       throws ValidationException
Validates this instance of Workshift.

The method performs checks that are possible on this object. It does not ensure the existence of objects referenced by this definition. Such references and related validations are done by the MetadataService at the time of object persistence. MetadataService also calls this method to ensure only valid objects are persisted.

Specified by:
validateCustom in class BaseMetadata<Workshift>
Throws:
ValidationException - If any invalid data is detected.

equals

public boolean equals(java.lang.Object obj)
Compares an object for equality with this Workshift object.
Overrides:
equals in class java.lang.Object
Parameters:
obj - object to compare with this Workshift.
Returns:
true if the object passed in is an instance of Workshift and is equal to this Workshift, false otherwise.

toDebugString

public java.lang.String toDebugString()
Returns a debug string representation for this Workshift object.
Returns:
String debug representation.

toString

public java.lang.String toString()
Overrides:
toString in class BaseMetadata<Workshift>

toCompositeType

public static javax.management.openmbean.CompositeType toCompositeType()
Returns the CompositeType that describes this model specific class

toCompositeData

public javax.management.openmbean.CompositeData toCompositeData(javax.management.openmbean.CompositeType ct)
Specified by:
toCompositeData in class BaseMetadata<Workshift>

from

public static Workshift from(javax.management.openmbean.CompositeData cd)
                      throws java.lang.IllegalArgumentException
Create an instance of the model specific class out of an associated CompositeData instance
Throws:
java.lang.IllegalArgumentException

getSelf

protected Workshift getSelf()
Specified by:
getSelf in class BaseMetadata<Workshift>

getBaseMetadataType

public BaseMetadataType<Workshift> getBaseMetadataType()
Specified by:
getBaseMetadataType in class BaseMetadata<Workshift>

clone

public Workshift clone(java.lang.String newName)
Specified by:
clone in class BaseMetadata<Workshift>

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Enterprise Scheduler Service
11g Release 1 (11.1.1.6.3)
E26229-05


Copyright © 2008, 2012 Oracle. All rights reserved.