edu.isi.pegasus.planner.refiner.cleanup

## Class RM

- java.lang.Object
- - edu.isi.pegasus.planner.refiner.cleanup.RM

All Implemented Interfaces:
  CleanupImplementation

    public class RM
    extends java.lang.Object
    implements CleanupImplementation

Use's RM to do removal of the files on the remote sites.

Version:
  $Revision$
Author:
  Karan Vahi

### Field Summary

Fields
`static java.lang.String` `DEFAULT_PRIORITY_KEY` The default priority key associated with the cleanup jobs.
`static java.lang.String` `DEFAULT_RM_LOCATION` The default path to rm executable.
`static java.lang.String` `DEFAULT_RM_LOGICAL_NAME` The default logical name to rm executable.
`private PegasusProperties` `mProps` The handle to the properties passed to Pegasus.
`protected SiteStore` `mSiteStore` Handle to the site catalog.
`protected TransformationCatalog` `mTCHandle` The handle to the transformation catalog.

### Fields inherited from interface edu.isi.pegasus.planner.refiner.cleanup.CleanupImplementation

`DEFAULT_CLEANUP_CATEGORY_KEY, VERSION`

### Constructor Summary

Constructors
Constructor and Description
`RM()` The default constructor.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`Job` `createCleanupJob(java.lang.String id, java.util.List files, Job job)` Creates a cleanup job that removes the files from remote working directory.
`private static TransformationCatalogEntry` `defaultTCEntry()` Returns a default TransformationCatalogEntry object for the rm executable.
`protected TransformationCatalogEntry` `getTCEntry(java.lang.String site)` Returns the TCEntry object for the rm executable on a grid site.
`void` `initialize(PegasusBag bag)` Intializes the class.

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

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

### Field Detail

#### DEFAULT_RM_LOGICAL_NAME

    public static final java.lang.String DEFAULT_RM_LOGICAL_NAME

The default logical name to rm executable.

See Also:
  Constant Field Values

#### DEFAULT_RM_LOCATION

    public static final java.lang.String DEFAULT_RM_LOCATION

The default path to rm executable.

See Also:
  Constant Field Values

#### DEFAULT_PRIORITY_KEY

    public static final java.lang.String DEFAULT_PRIORITY_KEY

The default priority key associated with the cleanup jobs.

See Also:
  Constant Field Values

#### mTCHandle

    protected TransformationCatalog mTCHandle

The handle to the transformation catalog.

#### mSiteStore

    protected SiteStore mSiteStore

Handle to the site catalog.

#### mProps

    private PegasusProperties mProps

The handle to the properties passed to Pegasus.

### Constructor Detail

#### RM

    public RM()

The default constructor.

### Method Detail

#### initialize

    public void initialize(PegasusBag bag)

Intializes the class.

Specified by:
  `initialize` in interface `CleanupImplementation`
Parameters:
  `bag` - bag of initialization objects

#### createCleanupJob

    public Job createCleanupJob(java.lang.String id,
                                java.util.List files,
                                Job job)

Creates a cleanup job that removes the files from remote working directory. This will eventually make way to it's own interface.

Specified by:
  `createCleanupJob` in interface `CleanupImplementation`
Parameters:
  `id` - the identifier to be assigned to the job.
  `files` - the list of `PegasusFile` that need to be cleaned up.
  `job` - the primary compute job with which this cleanup job is associated.
Returns:
  the cleanup job.

#### getTCEntry

    protected TransformationCatalogEntry getTCEntry(java.lang.String site)

Returns the TCEntry object for the rm executable on a grid site.

Parameters:
  `site` - the site corresponding to which the entry is required.
Returns:
  the TransformationCatalogEntry corresponding to the site.

#### defaultTCEntry

    private static TransformationCatalogEntry defaultTCEntry()

Returns a default TransformationCatalogEntry object for the rm executable.

Returns:
  default `TransformationCatalogEntry`