|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.isi.pegasus.planner.cluster.aggregator.JobAggregatorInstanceFactory
public class JobAggregatorInstanceFactory
A JobAggergator factory that caches up the loaded implementations. It loads a new implementation only if it has not loaded it earlier. However, it is different from a Singleton Factory, as the implementations are not stored in static instances. Hence, two different instances of this Factory can load different instances of the same implementation.
JobAggregatorFactory| Field Summary | |
|---|---|
private PegasusBag |
mBag
The bag of initialization objects |
private ADag |
mDAG
ADag object containing the jobs that have been scheduled by the site selector. |
private static Map |
mImplementingClassNameTable
A table that maps, Pegasus style keys to the names of the corresponding classes implementing the CondorStyle interface. |
private Map |
mImplementingClassTable
A table that maps, Pegasus style keys to appropriate classes implementing the JobAggregator interface |
private boolean |
mInitialized
A boolean indicating that the factory has been initialized. |
protected PegasusProperties |
mProps
The handle to the properties object holding all the properties. |
| Constructor Summary | |
|---|---|
JobAggregatorInstanceFactory()
The default constructor. |
|
| Method Summary | |
|---|---|
private Object |
get(String style)
Returns the implementation from the implementing class table. |
private static Map |
implementingClassNameTable()
Returns a table that maps, the Pegasus style keys to the names of implementing classes. |
void |
initialize(ADag dag,
PegasusBag bag)
Initializes the Factory. |
JobAggregator |
loadInstance(Job job)
Returns the appropriate handle to the JobAggregator that is to be used for a particular type of job. |
private void |
put(String style,
Object implementation)
Inserts an entry into the implementing class table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static Map mImplementingClassNameTable
private Map mImplementingClassTable
protected PegasusProperties mProps
private ADag mDAG
private boolean mInitialized
private PegasusBag mBag
| Constructor Detail |
|---|
public JobAggregatorInstanceFactory()
| Method Detail |
|---|
public void initialize(ADag dag,
PegasusBag bag)
throws JobAggregatorFactoryException
dag - the workflow that is being clustered.bag - the bag of initialization objects.
JobAggregatorFactoryException - that nests any error that
might occur during the instantiation of the implementation.
public JobAggregator loadInstance(Job job)
throws JobAggregatorFactoryException
job - the job corresponding to which the aggregator is to be
loaded.
JobAggregatorFactoryException - that nests any error that
might occur during the instantiationprivate Object get(String style)
style - the aggregator style
private void put(String style,
Object implementation)
style - the aggregator styleimplementation - the class implementing that aggregator.private static Map implementingClassNameTable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||