| java.lang.Object org.apache.hivemind.order.Orderer
Orderer | public class Orderer (Code) | | Used to order objects into an "execution" order. Each object must have a name. It may specify a
list of pre-requisites and a list of post-requisites.
author: Howard Lewis Ship |
Constructor Summary | |
public | Orderer(ErrorHandler errorHandler, String objectType) Creates an instance using org.apache.hivemind.order.Orderer as the Log. | public | Orderer(Log log, ErrorHandler errorHandler, String objectType) Creates a new instance, but directs all debug and error logging output to the provided log. | public | Orderer(ErrorLog errorLog, String objectType) Creates a new instance. |
Orderer | public Orderer(ErrorHandler errorHandler, String objectType)(Code) | | Creates an instance using org.apache.hivemind.order.Orderer as the Log.
|
Orderer | public Orderer(Log log, ErrorHandler errorHandler, String objectType)(Code) | | Creates a new instance, but directs all debug and error logging output to the provided log.
Parameters: log - Used for logging any errors Parameters: objectType - user presentable name for the type of object to be ordered; used in some errormessages |
Orderer | public Orderer(ErrorLog errorLog, String objectType)(Code) | | Creates a new instance.
Parameters: errorLog - Used for log any recoverable errors. Parameters: objectType - user presentable name for the type of object to be ordered; used in some errormessages |
add | public void add(Object object, String name, String prereqs, String postreqs)(Code) | | Adds a new object. All invocations of
Orderer.add(Object,String,String,String) should
occur before invoking
Orderer.getOrderedObjects() .
Parameters: object - an object to be sorted into order based on prereqs and postreqs Parameters: name - a unique name for the Parameters: prereqs - a comma-separated list of the names of objects that should precede this object inthe list (or null) Parameters: postreqs - a comma-separated list of the names of objects that should follow this object inthe list (or null) |
getOrderedObjects | public List getOrderedObjects()(Code) | | Uses the information provided by
Orderer.add(Object,String,String,String) to order the
objects into an appropriate order based on the pre- and post-reqts provided. Errors such as
cyclic dependencies or unrecognized names are logged and ignored.
|
|
|