|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.yawlfoundation.yawl.resourcing.AbstractSelector
org.yawlfoundation.yawl.resourcing.allocators.AbstractAllocator
public abstract class AbstractAllocator
The base class for all allocators. Create Date: 03/08/2007. Last Date: 09/11/2007
| Nested Class Summary | |
|---|---|
protected class |
AbstractAllocator.EventPair
|
| Field Summary |
|---|
| Fields inherited from class org.yawlfoundation.yawl.resourcing.AbstractSelector |
|---|
_canonicalName, _description, _displayName, _name, _params |
| Constructor Summary | |
|---|---|
AbstractAllocator()
Constructors |
|
AbstractAllocator(String name)
|
|
AbstractAllocator(String name,
HashMap<String,String> params)
|
|
AbstractAllocator(String name,
String description)
|
|
AbstractAllocator(String name,
String desc,
HashMap<String,String> params)
|
|
| Method Summary | |
|---|---|
protected Map<String,Long> |
getAvgDurations(Collection<AbstractAllocator.EventPair> pairs)
|
protected Map<String,Long> |
getAvgDurations(EventLogger.event fromEvent,
EventLogger.event toEvent,
WorkItemRecord wir)
Gets the average duration (in msecs) between two events for each participant recorded against those events for a task |
protected double |
getCost(XNode resNode,
String duration)
|
protected Map<String,XNode> |
getCostMap(Set<String> pids,
WorkItemRecord wir)
Gets from the cost service the cost per msec of each of the participants ids listed for the work item |
protected List |
getLoggedEvents(WorkItemRecord wir,
EventLogger.event event)
Gets a list of all resource log rows for a given specification + task + event combination. |
protected Map<String,Participant> |
participantSetToMap(Set<Participant> pSet)
Converts a set of participants to a map |
abstract Participant |
performAllocation(Set<Participant> resources,
WorkItemRecord wir)
Performs an allocation using some strategy |
String |
toXML()
Generates the XML required for the specification file |
static AbstractAllocator |
unmarshal(org.jdom.Element elAllocator)
Creates a runtime instance of this class from an XML description of it |
| Methods inherited from class org.yawlfoundation.yawl.resourcing.AbstractSelector |
|---|
addKey, addParam, addParams, getCanonicalName, getClassName, getDescription, getDisplayName, getInformation, getKeys, getName, getParamKeys, getParams, getParamValue, reconstitute, setCanonicalName, setDescription, setDisplayName, setKeyValue, setName, setParams, toString, unmarshalParams |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractAllocator()
public AbstractAllocator(String name)
public AbstractAllocator(String name,
HashMap<String,String> params)
public AbstractAllocator(String name,
String description)
public AbstractAllocator(String name,
String desc,
HashMap<String,String> params)
| Method Detail |
|---|
public String toXML()
toXML in class AbstractSelectorpublic static AbstractAllocator unmarshal(org.jdom.Element elAllocator)
elAllocator - a JDOM Element describing the class
protected List getLoggedEvents(WorkItemRecord wir,
EventLogger.event event)
wir - a workitem record which is an instance of the specification+task in
question.event - the type of event to get records for
protected Map<String,Participant> participantSetToMap(Set<Participant> pSet)
pSet - the set of participants
protected Map<String,XNode> getCostMap(Set<String> pids,
WorkItemRecord wir)
pids - a set of participant idswir - the work item to allocate
protected double getCost(XNode resNode,
String duration)
protected Map<String,Long> getAvgDurations(EventLogger.event fromEvent,
EventLogger.event toEvent,
WorkItemRecord wir)
fromEvent - the earlier event (start of duration)toEvent - the later event (end of duration)wir - a work item to allocate
protected Map<String,Long> getAvgDurations(Collection<AbstractAllocator.EventPair> pairs)
public abstract Participant performAllocation(Set<Participant> resources,
WorkItemRecord wir)
resources - the distribution set of participantswir - the work item to allocate
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||