org.griphyn.cPlanner.partitioner
Class ClustererCallback

java.lang.Object
  extended by org.griphyn.cPlanner.partitioner.ClustererCallback
All Implemented Interfaces:
Callback

public class ClustererCallback
extends 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: 50 $
Author:
Karan Vahi

Field Summary
private  Clusterer mClusterer
          The handle to the clusterer that does the clustering.
private  PegasusProperties mProps
          The handle to the properties object.
 
Constructor Summary
ClustererCallback()
          The default constructor.
 
Method Summary
 void cbDone()
          Callback for the partitioner to signal that it is done with the processing.
 void cbParents(String child, 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.

Constructor Detail

ClustererCallback

public ClustererCallback()
The default constructor.

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 interface Callback
Parameters:
p - the constructed partition.
Throws:
RuntimeException - in case of callback not being initialized, or a ClustererException being thrown during the Clusterer operation.

cbParents

public void cbParents(String child,
                      List parents)
Callback for when a partitioner determines the relations between partitions that it has previously constructed.

Specified by:
cbParents in interface Callback
Parameters:
child - the id of a partition.
parents - the list of String objects that contain the id's of the parents of the partition.
Throws:
RuntimeException - in case of callback not being initialized, or a ClustererException being thrown during the Clusterer operation.

cbDone

public void cbDone()
Callback for the partitioner to signal that it is done with the processing.

Specified by:
cbDone in interface Callback


Copyright © 2007 The University of Southern California. All Rights Reserved.