|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.griphyn.cPlanner.partitioner.DAXWriter
The abstract class that identifies the interface for writing out a dax corresponding to a partition. The interface stipulates that the jobs making up the partition and relations between those jobs in the partition are identified when invoking it. However all the job details are to be gotten by the implementing classes by parsing the original dax.
| Field Summary | |
protected String |
mDaxFile
The dax file that is being partitioned. |
protected LogManager |
mLogger
The handle to the logging object. |
protected String |
mPartitionName
The name of the partition dax that are generated. |
protected String |
mPDAXDirectory
The directory in which the daxes corresponding to the partition are generated. |
protected PrintWriter |
mWriteHandle
The write handle to the xml file being written. |
static String |
PACKAGE_NAME
The name of the package in which the writers are implemented. |
static String |
PARTITION_PREFIX
The suffix added to the name of the dax to identify it is a partitioned dax. |
| Constructor Summary | |
protected |
DAXWriter()
The default constructor |
protected |
DAXWriter(String daxFile,
String directory)
The overloaded constructor. |
| Method Summary | |
void |
close()
Close the write handle to the file that is written. |
private static String |
constructPartitionName(String daxName,
boolean addPrefix)
It constructs the partition name given the daxName. |
String |
getPartitionName()
It returns the name of the partitioned dax, that the object is currently writing or initialized to write. |
static String |
getPDAXFilename(String daxName,
int index)
It constructs the name of the partitioned dax file that has to be written corresponding to a partition of the dax. |
static String |
getPDAXFilename(String daxName,
int index,
boolean addPrefix)
It constructs the name of the partitioned dax file that has to be written corresponding to a partition of the dax. |
void |
initializeWriteHandle(int index)
This initializes the write handle a file in directory specified when creating the instance of this class. |
void |
initializeWriteHandle(String fileName)
This initializes the write handle to the file in directory specified when creating the instance of this class. |
static DAXWriter |
loadDAXWriter(String daxFile,
String directory)
The ends up loading the PDAXWriter. |
static DAXWriter |
loadDAXWriter(String className,
String daxFile,
String directory)
Loads the implementing PDAXWriter. |
void |
setPartitionName(String daxName)
It sets the name of the partition in the dax that is generated. |
void |
writeln(String st)
Writes out to the file. |
boolean |
writePartitionDax(Partition partition)
It writes out a dax consisting of the jobs as specified in the partition. |
abstract boolean |
writePartitionDax(Partition partition,
int index)
It writes out a dax consisting of the jobs as specified in the partition. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String PARTITION_PREFIX
public static final String PACKAGE_NAME
protected String mDaxFile
protected String mPDAXDirectory
protected String mPartitionName
protected LogManager mLogger
protected PrintWriter mWriteHandle
| Constructor Detail |
protected DAXWriter()
protected DAXWriter(String daxFile,
String directory)
daxFile - the path to the dax file that is being partitioned.directory - the directory in which the partitioned daxes are to be
generated.| Method Detail |
public boolean writePartitionDax(Partition partition)
partition - the partition object containing the relations and id's
of the jobs making up the partition.
public abstract boolean writePartitionDax(Partition partition,
int index)
partition - the partition object containing the relations and id's
of the jobs making up the partition.index - the index of the partition.
public static DAXWriter loadDAXWriter(String daxFile,
String directory)
daxFile - the path to the dax file that is being partitioned.directory - the directory in which the partitioned daxes are to be
generated.
public static DAXWriter loadDAXWriter(String className,
String daxFile,
String directory)
className - the name of the class with or without the package name.daxFile - the path to the dax file that is being partitioned.directory - the directory in which the partitioned daxes are to be
generated.
public static String getPDAXFilename(String daxName,
int index)
daxName - the name attribute in the adag element of the dax.index - the partition number of the partition.
public static String getPDAXFilename(String daxName,
int index,
boolean addPrefix)
daxName - the name attribute in the adag element of the dax.index - the partition number of the partition.addPrefix - whether you want to addPrefix or not.
private static String constructPartitionName(String daxName,
boolean addPrefix)
daxName - the name attribute in the adag element of the dax.addPrefix - whether to add prefix or not.public void setPartitionName(String daxName)
daxName - the name attribute in the adag element of the dax.public String getPartitionName()
public void initializeWriteHandle(int index)
index - the partition number of the partition.public void initializeWriteHandle(String fileName)
fileName - the name of the file that is to be written in the
directory.public void writeln(String st)
public void close()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||