Class PartitionerFactory
- java.lang.Object
-
- edu.isi.pegasus.planner.partitioner.PartitionerFactory
-
public class PartitionerFactory extends java.lang.Object
A Factory class to load the right type of partitioner at runtime, as specified by the Properties. Each invocation, results in a new partitioner being loaded.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_PACKAGE_NAME
Package to prefix "just" class names with.static java.lang.String
DEFAULT_PARTITIONING_CLASS
The name of the class that does level based partitioning.static java.lang.String
HORIZONTAL_PARTITIONING_CLASS
The name of the class that does horizontal based partitioning.static java.lang.String
LABEL_BASED_PARTITIONING_CLASS
The name of the class that does label based partitioning.static java.lang.String
LEVEL_BASED_PARTITIONING_CLASS
The name of the class that does level based partitioning.private static java.lang.String[]
PARTITIONING_CLASSES
An array of known partitioning classes.
-
Constructor Summary
Constructors Constructor Description PartitionerFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Partitioner
loadInstance(PegasusProperties properties, GraphNode root, java.util.Map graph, java.lang.String className)
Loads the implementing class corresponding to the type specified by the user.
-
-
-
Field Detail
-
DEFAULT_PACKAGE_NAME
public static final java.lang.String DEFAULT_PACKAGE_NAME
Package to prefix "just" class names with.- See Also:
- Constant Field Values
-
LEVEL_BASED_PARTITIONING_CLASS
public static final java.lang.String LEVEL_BASED_PARTITIONING_CLASS
The name of the class that does level based partitioning.- See Also:
- Constant Field Values
-
LABEL_BASED_PARTITIONING_CLASS
public static final java.lang.String LABEL_BASED_PARTITIONING_CLASS
The name of the class that does label based partitioning.- See Also:
- Constant Field Values
-
HORIZONTAL_PARTITIONING_CLASS
public static final java.lang.String HORIZONTAL_PARTITIONING_CLASS
The name of the class that does horizontal based partitioning.- See Also:
- Constant Field Values
-
DEFAULT_PARTITIONING_CLASS
public static final java.lang.String DEFAULT_PARTITIONING_CLASS
The name of the class that does level based partitioning.- See Also:
- Constant Field Values
-
PARTITIONING_CLASSES
private static final java.lang.String[] PARTITIONING_CLASSES
An array of known partitioning classes.
-
-
Method Detail
-
loadInstance
public static Partitioner loadInstance(PegasusProperties properties, GraphNode root, java.util.Map graph, java.lang.String className) throws PartitionerFactoryException
Loads the implementing class corresponding to the type specified by the user. The properties object passed should not be null.- Parameters:
properties
- thePegasusProperties
object containing all the properties required by Pegasus.root
- the dummy root node of the graph.graph
- the map containing all the nodes of the graph keyed by the logical id of the nodes.className
- the name of the implementing class.- Returns:
- the instance of the class implementing this interface.
- Throws:
PartitionerFactoryException
- that nests any error that might occur during the instantiation- See Also:
DEFAULT_PACKAGE_NAME
-
-