|
Oracle Fusion Applications Java API Reference for Oracle Enterprise Scheduler Service 11g Release 1 (11.1.1.6) E20742-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.as.scheduler.BaseMetadata<Incompatibility> oracle.as.scheduler.Incompatibility
public class Incompatibility
Encapsulate an incompatibility among Job and/or JobSet definitions over a given resource.
Incompatibility defines which Job and JobSet definitions, referred as entities, are incompatible with other entities in the system and should not be allowed to run together.
It is possible to define self-incompatibility where a given entity is incompatible with itself implying two requests for such an entity should not run together.
Incompatibility can be defined for a given resource or globally. A resource is identified by a property name available in the entities being marked for incompatibility. Such a resource can be referred by the same or different property name.
At runtime, the system will check if the given entities are accessing the same resource (identified as the values of the properties defined in the incompatibility definition) and prevent them from running concurrently.
Each instance of this class defines such an incompatibility in the system. It contains two or more Job,JobSet definitions (or even one in case of self incompatibility) marked as incompatible either globally or over a given resource.
A valid incompatibility definition must have at least two entities or one self-incompatible entity.
Nested Class Summary | |
---|---|
static class |
Incompatibility.IncompatibilityType
Enum for valid Incompatibility type. |
Constructor Summary | |
---|---|
Incompatibility(java.lang.String name,
java.lang.String description,
Incompatibility.IncompatibilityType type)
Constructs a new incompatibility definition. |
|
Incompatibility(java.lang.String name,
java.lang.String description,
Incompatibility.IncompatibilityType type,
MetadataObjectId objectId)
Constructs a new instance. |
|
Incompatibility(java.lang.String name,
java.lang.String displayNameKey,
java.lang.String descriptionKey,
Incompatibility.IncompatibilityType type,
java.lang.String[] resourceBundleIDs)
Constructs a new incompatibility definition and associate resource bundles. |
Method Summary | |
---|---|
void |
addEntity(IncompatibleEntity incompEntity)
Adds an incompatibility entity to this object. |
void |
addEntity(MetadataObjectId entity,
boolean selfIncompatible)
Adds an incompatibility entity to this object. |
void |
addEntity(MetadataObjectId entity,
java.lang.String property,
boolean selfIncompatible)
Adds an incompatibility entity to this object. |
Incompatibility |
clone(java.lang.String newName)
|
boolean |
equals(java.lang.Object obj)
Compares an object for equality with this Incompatibility object. |
static Incompatibility |
from(javax.management.openmbean.CompositeData cd)
Create an instance of the model specific class out of an associated CompositeData instance |
java.util.Collection<IncompatibleEntity> |
getAllEntities()
Returns a collection of the incompatibility entities associated with this object. |
BaseMetadataType<Incompatibility> |
getBaseMetadataType()
|
IncompatibleEntity |
getEntity(MetadataObjectId entity)
Returns information for an incompatibility entity associated with this incompatibility definition. |
protected Incompatibility |
getSelf()
|
Incompatibility.IncompatibilityType |
getType()
Returns the incompatibility type. |
int |
hashCode()
Returns the hash code for this object. |
protected int |
numEntities()
Returns the number of incompatible entities for this object. |
void |
removeEntity(MetadataObjectId entity)
Removes the specified entity from this incompatibility definition. |
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 |
protected void |
validateCustom()
Validates this incompatibility definition instance. |
Methods inherited from class oracle.as.scheduler.BaseMetadata |
---|
from, getDescription, getDescriptionKey, getDisplayName, getDisplayNameKey, getMessages, getMetadataObjectId, getName, getResourceBundles, localize, setDescription, setDescriptionKey, setDisplayName, setDisplayNameKey, setResourceBundles, toCompositeData, toString, validate |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Incompatibility(java.lang.String name, java.lang.String description, Incompatibility.IncompatibilityType type)
This constructor is used by clients to create Incompatibility definitions. Each incompatibility entity that is subsequently added is expected to be valid for incompatibility type associated with this object
name
- the unique name to be given to this incompatibility
definition. Must not be null. The name is also
used as the default display name unless otherwise specifially set.description
- an optional description. This can be null.type
- the incompatibility type. Must not be null.
java.lang.NullPointerException
- if a name or incompatibility type
is not specified.public Incompatibility(java.lang.String name, java.lang.String displayNameKey, java.lang.String descriptionKey, Incompatibility.IncompatibilityType type, java.lang.String[] resourceBundleIDs)
This constructor is used by clients to create Incompatibility definitions. Each incompatibility entity that is subsequently added is expected to be valid for incompatibility type associated with this object
name
- -- name for this instance. It cannot be null. The name is also
used as the default display name unless otherwise specifially set.displayNameKey
- - the key of the entry in the resourcebundles to lookup the name.
OptionaldescriptionKey
- - the key of the entry in the resourcebundles to lookup the description.
Optional.type
- the incompatibility type. Must not be null.resourceBundleIDs
- -- an array of resource bundle id. Optional
java.lang.NullPointerException
- if a name or incompatibility type
is not specified.public Incompatibility(java.lang.String name, java.lang.String description, Incompatibility.IncompatibilityType type, MetadataObjectId objectId)
INTERNAL ONLY
This constructor is used by the MetadataService
to populate
the unique identifier of this object (incompatibility definition)
within the metadata repository.
name
- the unique name of this incompatibility definition.description
- the description, if any.type
- the incompatibility typeobjectId
- the unique identifier of this object in the
metadata repository.
java.lang.NullPointerException
- if a name, incompatibility type,
or metadata object id is not specified.Method Detail |
---|
public Incompatibility.IncompatibilityType getType()
public void addEntity(MetadataObjectId entity, boolean selfIncompatible) throws ValidationException
entity
- the unique identifier for the JobDefinition
or JobSet
entity being added.selfIncompatible
- true
if the incompatibility entity is
self-incompatible, or false
if it is not self-incompatible.
ValidationException
- if this incompatibility already contains
a reference to the entity. Also, thrown if the entity is not suitable
for this incompatibility definition; for example, a property must
be specified for each entity of a domain incompatibility.public void addEntity(MetadataObjectId entity, java.lang.String property, boolean selfIncompatible) throws ValidationException
entity
- the unique identifier for the JobDefinition
or JobSet
entity being added.property
- the property associated with the incompatibility
entity. This cannot be null for a domain incompatibility.selfIncompatible
- true
if the incompatibility entity is
self-incompatible, or false
if it is not self-incompatible.
ValidationException
- if this incompatibility already contains
a reference to the entity. Also, thrown if the entity is not suitable
for this incompatibility definition; for example, a property must
be specified for each entity of a domain incompatibility.public void addEntity(IncompatibleEntity incompEntity) throws ValidationException
Note: This makes a copy of the entity information being added.
incompEntity
- information for the incompatibility entity.
java.lang.NullPointerException
- if incompatibility entity not specified.
ValidationException
- if this incompatibility already contains
a reference to the entity. Also, thrown if the entity is not suitable
for this incompatibility definition; for example, a property must
be specified for each entity of a domain incompatibility.public void removeEntity(MetadataObjectId entity)
entity
- the identifier of the entity to be removed.public IncompatibleEntity getEntity(MetadataObjectId entity)
entity
- the identiifer of the incompatibility entity
null
if no such entity is associated with this object,
or no entity was specified.public java.util.Collection<IncompatibleEntity> getAllEntities()
protected int numEntities()
protected void validateCustom() throws ValidationException
This method performs only those validations that are possible just on this instance. It does not validate the existence of any JobDefinition or JobSet definitions referenced by the incompatibility entities. Such validations are performed by the [@code MetadataService} when the Incompatibility is persisted to the metadata repository.
validateCustom
in class BaseMetadata<Incompatibility>
ValidationException
- if a validation error occurs.public int hashCode()
hashCode
in class BaseMetadata<Incompatibility>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare with this Incompatibility.
true
if the object is an instance of
Incompatibility
and is considered equal to this object,
or false
otherwise.public static javax.management.openmbean.CompositeType toCompositeType()
public javax.management.openmbean.CompositeData toCompositeData(javax.management.openmbean.CompositeType ct)
toCompositeData
in class BaseMetadata<Incompatibility>
public static Incompatibility from(javax.management.openmbean.CompositeData cd) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
protected Incompatibility getSelf()
getSelf
in class BaseMetadata<Incompatibility>
public BaseMetadataType<Incompatibility> getBaseMetadataType()
getBaseMetadataType
in class BaseMetadata<Incompatibility>
public Incompatibility clone(java.lang.String newName) throws ValidationException
clone
in class BaseMetadata<Incompatibility>
ValidationException
|
Oracle Fusion Applications Java API Reference for Oracle Enterprise Scheduler Service 11g Release 1 (11.1.1.6) E20742-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |