|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
stella.AbstractScheduler
public abstract class AbstractScheduler
An abstract implementation of the Scheduling interface. Provided
are methods for loading a target list and for registering a set of globals.
A constructor using a single Map object as argument is provided.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.PropertyContainer |
|---|
PropertyContainer.URLResource |
| Field Summary | |
|---|---|
private Collection<Appointable.Constraint> |
global
The collection of global constraints currently assigned. |
private Object |
sleeper
Notify this object if asked to. |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES |
| Fields inherited from interface util.PropertyBearing |
|---|
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Constructor Summary | |
|---|---|
protected |
AbstractScheduler(Map<String,String> sprop)
Protected constructer defining this schedulers properties. |
| Method Summary | |
|---|---|
void |
addGlobalConstraint(Appointable.Constraint cons)
Adds a global constraint to the scheduler. |
protected boolean |
checkGlobalConstraints(ParameterClustering set,
TargetDefinition target)
Checks, if the target is observable under all global constraints. |
static Scheduling |
createScheduler(Map<String,String> prop)
Constructs a new scheduling instance using the mapping of the PropertyBearing.KEY_CLASS to the class name to derive the class to instantiate. |
Collection<Appointable.Constraint> |
getGlobalConstraints()
Returns a collection of all currently registered global constraints. |
Collection<TargetDefinition> |
getObservableTargets(ParameterClustering set,
Collection<TargetDefinition> targets)
Shortens the list of targets to all targets thet are currently observable. |
Object |
registerMonitor(Object waiter)
Registers an object for notification. |
void |
removeAllGlobalConstraints()
Removes all global constraints. |
void |
removeGlobalConstraint(Appointable.Constraint cons)
Removes a global constraint from the scheduler. |
protected void |
wakeUp()
Notifies the sleeping object if it is set. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface stella.Scheduling |
|---|
getHighestTarget |
| Methods inherited from interface util.PropertyBearing |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getLocalized, getProperties, getProperty, getResource, getResourceAsStream, getResources, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Field Detail |
|---|
private Collection<Appointable.Constraint> global
private Object sleeper
| Constructor Detail |
|---|
protected AbstractScheduler(Map<String,String> sprop)
| Method Detail |
|---|
public void addGlobalConstraint(Appointable.Constraint cons)
addGlobalConstraint in interface Schedulingpublic void removeGlobalConstraint(Appointable.Constraint cons)
removeGlobalConstraint in interface Schedulingpublic void removeAllGlobalConstraints()
removeAllGlobalConstraints in interface Schedulingpublic Collection<Appointable.Constraint> getGlobalConstraints()
getGlobalConstraints in interface Schedulingpublic Object registerMonitor(Object waiter)
wakeUp() is
called after an object has been registered the argumental objects
is notified of any change happened to the sequencer. Due to the
synchronizing behaviour of the wakeUp() method,
care must be taken to avoid dead-lock.
registerMonitor in interface Scheduling
public Collection<TargetDefinition> getObservableTargets(ParameterClustering set,
Collection<TargetDefinition> targets)
getObservableTargets in interface Scheduling
protected boolean checkGlobalConstraints(ParameterClustering set,
TargetDefinition target)
protected void wakeUp()
public static final Scheduling createScheduler(Map<String,String> prop)
PropertyBearing.KEY_CLASS to the class name to derive the class to instantiate.
If this property is defined, a new Scheduling instance with the stated
class name is created, the supplied properties used as an argument in
the constructor. Can throw a lot of exceptions if unsuccessful.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||