|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hivemind.order.Orderer
public class Orderer
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.
Constructor Summary | |
---|---|
Orderer(ErrorHandler errorHandler,
java.lang.String objectType)
Creates an instance using org.apache.hivemind.order.Orderer as the Log. |
|
Orderer(ErrorLog errorLog,
java.lang.String objectType)
Creates a new instance. |
|
Orderer(org.apache.commons.logging.Log log,
ErrorHandler errorHandler,
java.lang.String objectType)
Creates a new instance, but directs all debug and error logging output to the provided log. |
Method Summary | |
---|---|
void |
add(java.lang.Object object,
java.lang.String name,
java.lang.String prereqs,
java.lang.String postreqs)
Adds a new object. |
java.util.List |
getOrderedObjects()
Uses the information provided by add(Object, String, String, String) to order the
objects into an appropriate order based on the pre- and post-reqts provided. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Orderer(ErrorHandler errorHandler, java.lang.String objectType)
org.apache.hivemind.order.Orderer
as the Log.
public Orderer(org.apache.commons.logging.Log log, ErrorHandler errorHandler, java.lang.String objectType)
log
- Used for logging any errorsobjectType
- user presentable name for the type of object to be ordered; used in some error
messagespublic Orderer(ErrorLog errorLog, java.lang.String objectType)
errorLog
- Used for log any recoverable errors.objectType
- user presentable name for the type of object to be ordered; used in some error
messagesMethod Detail |
---|
public void add(java.lang.Object object, java.lang.String name, java.lang.String prereqs, java.lang.String postreqs)
add(Object, String, String, String)
should
occur before invoking getOrderedObjects()
.
object
- an object to be sorted into order based on prereqs and postreqsname
- a unique name for theprereqs
- a comma-separated list of the names of objects that should precede this object in
the list (or null)postreqs
- a comma-separated list of the names of objects that should follow this object in
the list (or null)public java.util.List getOrderedObjects()
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |