GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



next up previous contents
Next: Examining LogicalFile Instances Up: The LogicalFile Package Previous: Adding and Removing File   Contents

Replicating LogicalFile Instances

The raison d'être for the existence of the GATLogicalFile, like that for most biological organisms, is to go forth and multiply. This process of asexual replication occurs for the GATLogicalFile species is accomplished through a call to the function

GATResult
  GATLogicalFile_Replicate( GATLogicalFile_const logfile,
    GATLocation_const target)

The first argument to this function is a GATLogicalFile_const instance which is the GATLogicalFile_const containing the physical files that one wishes to replicate. The next argument to this function is a GATLocation_const instance which qualifies the location of the replica. Finally, this function returns a GATResult, covered in Appendix [*], which indicates the return status of this function.

To take this function out for a test drive we can should how it would be used to replicate a GATLogicalFile instance logicalFile to a GATLocation instance location. In code this spin around the block looks as follows

GATResult result;
GATLocation location;
GATLogicalFile logicalFile;

location = ...
logicalFile = ...

result = GATLogicalFile_Replicate( logicalFile, location );

if( GAT_SUCCEEDED( result ) )
{
  /* The asexual reproduction has succeeded! */
}



Andre Merzky 2004-05-13