edu.isi.pegasus.planner.code.generator

## Class DAXReplicaStore

- java.lang.Object
- - edu.isi.pegasus.planner.code.generator.DAXReplicaStore

All Implemented Interfaces:
  CodeGenerator

    public class DAXReplicaStore
    extends java.lang.Object
    implements CodeGenerator

A generator that writes out the replica store containing a file based replica catalog that has the file locations mentioned in the DAX.

Version:
  $Revision$
Author:
  Karan Vahi

### Field Summary

Fields
`private static java.lang.String` `CACHE_FILE_SUFFIX` Suffix to be applied for cache file generation.
`static java.lang.String` `DAX_REPLICA_STORE_CATALOG_IMPLEMENTER` The name of the Replica Catalog Implementer that serves as the source for cache files.
`static java.lang.String` `DAX_REPLICA_STORE_CATALOG_KEY` The name of the source key for Replica Catalog Implementer that serves as the repository for DAX Replica Store
`private static java.lang.String` `DAX_REPLICA_STORE_SUFFIX` Suffix to be applied for the DAX Replica Store.
`protected PegasusBag` `mBag` The bag of initialization objects.
`protected LogManager` `mLogger` The handle to the logging object.
`protected PlannerOptions` `mPOptions` The object containing the command line options specified to the planner at runtime.
`protected PegasusProperties` `mProps` The object holding all the properties pertaining to Pegasus.
`protected java.lang.String` `mSubmitFileDir` The directory where all the submit files are to be generated.

### Fields inherited from interface edu.isi.pegasus.planner.code.CodeGenerator

`VERSION`

### Constructor Summary

Constructors
Constructor and Description
`DAXReplicaStore()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`java.util.Collection<java.io.File>` `generateCode(ADag dag)` Generates the notifications input file.
`void` `generateCode(ADag dag, Job job)` Not implemented
`static java.lang.String` `getDAXReplicaStoreFile(PlannerOptions options, java.lang.String label, java.lang.String index)` Returns the path to the DAX Replica Store File.
`void` `initialize(PegasusBag bag)` Initializes the Code Generator implementation.
`void` `reset()` Not implemented
`boolean` `startMonitoring()` Not implemented

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### DAX_REPLICA_STORE_CATALOG_KEY

    public static final java.lang.String DAX_REPLICA_STORE_CATALOG_KEY

The name of the source key for Replica Catalog Implementer that serves as the repository for DAX Replica Store

See Also:
  Constant Field Values

#### DAX_REPLICA_STORE_CATALOG_IMPLEMENTER

    public static final java.lang.String DAX_REPLICA_STORE_CATALOG_IMPLEMENTER

The name of the Replica Catalog Implementer that serves as the source for cache files.

See Also:
  Constant Field Values

#### CACHE_FILE_SUFFIX

    private static final java.lang.String CACHE_FILE_SUFFIX

Suffix to be applied for cache file generation.

See Also:
  Constant Field Values

#### DAX_REPLICA_STORE_SUFFIX

    private static final java.lang.String DAX_REPLICA_STORE_SUFFIX

Suffix to be applied for the DAX Replica Store.

See Also:
  Constant Field Values

#### mBag

    protected PegasusBag mBag

The bag of initialization objects.

#### mSubmitFileDir

    protected java.lang.String mSubmitFileDir

The directory where all the submit files are to be generated.

#### mProps

    protected PegasusProperties mProps

The object holding all the properties pertaining to Pegasus.

#### mPOptions

    protected PlannerOptions mPOptions

The object containing the command line options specified to the planner at runtime.

#### mLogger

    protected LogManager mLogger

The handle to the logging object.

### Constructor Detail

#### DAXReplicaStore

    public DAXReplicaStore()

### Method Detail

#### getDAXReplicaStoreFile

    public static java.lang.String getDAXReplicaStoreFile(PlannerOptions options,
                                                          java.lang.String label,
                                                          java.lang.String index)

Returns the path to the DAX Replica Store File.

Parameters:
  `options` - the options for the sub workflow.
  `label` - the label for the workflow.
  `index` - the index for the workflow.
Returns:
  the name of the cache file

#### initialize

    public void initialize(PegasusBag bag)
                    throws CodeGeneratorException

Initializes the Code Generator implementation.

Specified by:
  `initialize` in interface `CodeGenerator`
Parameters:
  `bag` - the bag of initialization objects.
Throws:
  `CodeGeneratorException` - in case of any error occurring code generation.

#### generateCode

    public java.util.Collection<java.io.File> generateCode(ADag dag)
                                                    throws CodeGeneratorException

Generates the notifications input file. The method initially generates work-flow level notification records, followed by job-level notification records.

Specified by:
  `generateCode` in interface `CodeGenerator`
Parameters:
  `dag` - the concrete work-flow.
Returns:
  the Collection of `File` objects for the files written out.
Throws:
  `CodeGeneratorException` - in case of any error occurring code generation.

#### generateCode

    public void generateCode(ADag dag,
                             Job job)
                      throws CodeGeneratorException

Not implemented

Specified by:
  `generateCode` in interface `CodeGenerator`
Parameters:
  `dag` - the work-flow
  `job` - the job for which the code is to be generated.
Throws:
  `CodeGeneratorException`

#### startMonitoring

    public boolean startMonitoring()

Not implemented

Specified by:
  `startMonitoring` in interface `CodeGenerator`
Returns:
  boolean indicating whether could successfully start the monitor daemon or not.

#### reset

    public void reset()
               throws CodeGeneratorException

Not implemented

Specified by:
  `reset` in interface `CodeGenerator`
Throws:
  `CodeGeneratorException` - in case of any error occuring code generation.