2010-12-10 12:36:06 +08:00
|
|
|
package org.broadinstitute.sting.queue.engine
|
|
|
|
|
|
|
|
|
|
import org.broadinstitute.sting.queue.function.QFunction
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Creates and stops JobRunners
|
|
|
|
|
*/
|
|
|
|
|
trait JobManager[TFunction <: QFunction, TRunner <: JobRunner[TFunction]] {
|
2011-01-26 04:28:54 +08:00
|
|
|
/** The class type of the runner. Available at runtime even after erasure. */
|
|
|
|
|
def functionType: Class[TFunction]
|
|
|
|
|
|
|
|
|
|
/** The class type of the functions processed by the runner. Available at runtime even after erasure. */
|
|
|
|
|
def runnerType: Class[TRunner]
|
|
|
|
|
|
|
|
|
|
/** Creates a new runner.
|
|
|
|
|
* @param function Function for the runner.
|
|
|
|
|
*/
|
2010-12-10 12:36:06 +08:00
|
|
|
def create(function: TFunction): TRunner
|
2011-01-26 04:28:54 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Stops a list of functions.
|
|
|
|
|
* @param runner Runners to stop.
|
|
|
|
|
*/
|
|
|
|
|
def tryStop(runners: List[TRunner]) {
|
|
|
|
|
}
|
2010-12-10 12:36:06 +08:00
|
|
|
}
|