org.yawlfoundation.yawl.resourcing.allocators
Class ShortestQueue

java.lang.Object
  extended by org.yawlfoundation.yawl.resourcing.AbstractSelector
      extended by org.yawlfoundation.yawl.resourcing.allocators.AbstractAllocator
          extended by org.yawlfoundation.yawl.resourcing.allocators.ShortestQueue

public class ShortestQueue
extends AbstractAllocator

Performs allocation based on work queue length. This is the default allocator. Create Date: 23/08/2007. Last Date: 12/11/2007

Version:
2.0
Author:
Michael Adams (BPM Group, QUT Australia)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.yawlfoundation.yawl.resourcing.allocators.AbstractAllocator
AbstractAllocator.EventPair
 
Field Summary
 
Fields inherited from class org.yawlfoundation.yawl.resourcing.AbstractSelector
_canonicalName, _description, _displayName, _name, _params
 
Constructor Summary
ShortestQueue()
           
 
Method Summary
 Set getParamKeys()
           
 Participant performAllocation(Set<Participant> resSet, WorkItemRecord wir)
          selects the Participant with the least number of workitems in the 'allocated' workqueue, or the first participant with an empty queue
 
Methods inherited from class org.yawlfoundation.yawl.resourcing.allocators.AbstractAllocator
getAvgDurations, getAvgDurations, getCost, getCostMap, getLoggedEvents, participantSetToMap, toXML, unmarshal
 
Methods inherited from class org.yawlfoundation.yawl.resourcing.AbstractSelector
addKey, addParam, addParams, getCanonicalName, getClassName, getDescription, getDisplayName, getInformation, getKeys, getName, 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

ShortestQueue

public ShortestQueue()
Method Detail

performAllocation

public Participant performAllocation(Set<Participant> resSet,
                                     WorkItemRecord wir)
selects the Participant with the least number of workitems in the 'allocated' workqueue, or the first participant with an empty queue

Specified by:
performAllocation in class AbstractAllocator
Parameters:
resSet - the set of Participants to compare
wir - the work item to allocate
Returns:
the Participant with the shortest queue

getParamKeys

public Set getParamKeys()
Overrides:
getParamKeys in class AbstractSelector
Returns:
a Set of parameter names needing values to be used in the performance of the selection


Copyright © 2004-2012 The YAWL Foundation.