Class ClustererCallback
- java.lang.Object
-
- edu.isi.pegasus.planner.partitioner.ClustererCallback
-
- All Implemented Interfaces:
Callback
public class ClustererCallback extends java.lang.Object implements Callback
A Callback implementation that passes the partitions detected during the partitioning of the worflow to a Clusterer for clustering. The clusterer is passed off to the callback during the callback initialization.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description private Clusterer
mClusterer
The handle to the clusterer that does the clustering.private PegasusProperties
mProps
The handle to the properties object.
-
Constructor Summary
Constructors Constructor Description ClustererCallback()
The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cbDone()
Callback for the partitioner to signal that it is done with the processing.void
cbParents(java.lang.String child, java.util.List parents)
Callback for when a partitioner determines the relations between partitions that it has previously constructed.void
cbPartition(Partition p)
Callback for when a partitioner determines that partition has been constructed.void
initialize(PegasusProperties properties, Clusterer clusterer)
Initializes the callback.
-
-
-
Field Detail
-
mClusterer
private Clusterer mClusterer
The handle to the clusterer that does the clustering.
-
mProps
private PegasusProperties mProps
The handle to the properties object.
-
-
Method Detail
-
initialize
public void initialize(PegasusProperties properties, Clusterer clusterer)
Initializes the callback.- Parameters:
properties
- the properties passed to the planner.clusterer
- the clusterer that has to be called out, in the callback methods.
-
cbPartition
public void cbPartition(Partition p)
Callback for when a partitioner determines that partition has been constructed. The partition is passed off to the clusterer that the callback has been initialized with.- Specified by:
cbPartition
in interfaceCallback
- Parameters:
p
- the constructed partition.- Throws:
java.lang.RuntimeException
- in case of callback not being initialized, or a ClustererException being thrown during the Clusterer operation.
-
cbParents
public void cbParents(java.lang.String child, java.util.List parents)
Callback for when a partitioner determines the relations between partitions that it has previously constructed.- Specified by:
cbParents
in interfaceCallback
- Parameters:
child
- the id of a partition.parents
- the list ofString
objects that contain the id's of the parents of the partition.- Throws:
java.lang.RuntimeException
- in case of callback not being initialized, or a ClustererException being thrown during the Clusterer operation.
-
-