|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.isi.pegasus.planner.selector.replica.ReplicaSelectorFactory
public class ReplicaSelectorFactory
A factory class to load the appropriate type of Replica Selector, as specified by the user at runtime in properties. Each invocation of the factory results in a ReplicaSelector being instantiated.
| Field Summary | |
|---|---|
static String |
DEFAULT_PACKAGE_NAME
The default package where the all the implementing classes provided with the VDS reside. |
static String |
DEFAULT_REPLICA_SELECTOR
The name of the class in the DEFAULT package, that corresponds to the default replica selector. |
| Constructor Summary | |
|---|---|
ReplicaSelectorFactory()
|
|
| Method Summary | |
|---|---|
static ReplicaSelector |
loadInstance()
A no hassle factory method that loads the replica selector specified in the properties. |
static ReplicaSelector |
loadInstance(PegasusProperties properties)
Loads the implementing class corresponding to the mode specified by the user at runtime in the properties file. |
static ReplicaSelector |
loadInstance(PegasusProperties properties,
String className)
Loads the implementing class corresponding to the class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_PACKAGE_NAME
public static final String DEFAULT_REPLICA_SELECTOR
| Constructor Detail |
|---|
public ReplicaSelectorFactory()
| Method Detail |
|---|
public static ReplicaSelector loadInstance()
throws ReplicaSelectorFactoryException
ReplicaSelectorFactoryException - that chains any error that
might occur during the instantiationDEFAULT_PACKAGE_NAME,
DEFAULT_REPLICA_SELECTOR
public static ReplicaSelector loadInstance(PegasusProperties properties)
throws ReplicaSelectorFactoryException
properties - the PegasusProperties object containing all
the properties required by Pegasus.
ReplicaSelectorFactoryException - that chains any error that
might occur during the instantiationDEFAULT_PACKAGE_NAME,
DEFAULT_REPLICA_SELECTOR
public static ReplicaSelector loadInstance(PegasusProperties properties,
String className)
throws ReplicaSelectorFactoryException
className - the name of the class that implements the mode. It is the
name of the class, not the complete name with package. That
is added by itself.properties - the PegasusProperties object containing all
the properties required by Pegasus.
ReplicaSelectorFactoryException - that chains any error that
might occur during the instantiationDEFAULT_PACKAGE_NAME
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||