GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

io::LogicalFile Class Reference

An abstract representation of a set of identical physical files. More...

Inheritance diagram for io::LogicalFile:

Inheritance graph
[legend]
Collaboration diagram for io::LogicalFile:

Collaboration graph
[legend]
List of all members.

Public Methods

LogicalFile create (GATContext gatContext, URI location) throws Exception
 This method creates a LogicalFile corresponding to the passed URI instance and uses the passed GATContext to broker resources.

LogicalFile create (GATContext gatContext, Preferences preferences, URI location) throws Exception
 This method creates a LogicalFile corresponding to the passed URI instance and uses the passed GATContext to broker resources.

abstract void addFile (File file) throws RemoteException
 Adds the passed File instance to the set of physical files represented by this LogicalFile instance.

abstract void addURI (URI location) throws RemoteException
 Adds the physical file at the passed URI to the set of physical files represented by this LogicalFile instance.

abstract void removeFile (File file) throws RemoteException
 Removes the passed File instance from the set of physical files represented by this LogicalFile instance.

abstract void removeURI (URI location) throws RemoteException
 Removes the physical file at the passed URI from the set of physical files represented by this LogicalFile instance.

abstract void replicate (URI location) throws RemoteException, IOException
 Replicates the logical file represented by this instance to the physical file specified by the passed URI.

abstract List getURIs () throws RemoteException
 Returns a java.util.List of URI instances each of which is the URI of a physical file represented by this instance.

abstract List getFiles () throws RemoteException
 Returns a java.util.List of File instances each of which is a File corresponding to a physical file represented by this instance.

abstract void addMetricListener (MetricListener metricListener, Metric metric) throws RemoteException
 This method adds the passed instance of a MetricListener to the java.util.List of MetricListeners which are notified of MetricEvents by an instance of this class.

abstract void removeMetricListener (MetricListener metricListener, Metric metric) throws RemoteException
 Removes the passed MetricListener from the java.util.List of MetricListeners which are notified of MetricEvents corresponding to the passed Metric instance.

abstract List getMetrics () throws RemoteException
 This method returns a java.util.List of Metric instances.


Protected Methods

 LogicalFile (GATContext gatContext, Preferences preferences, URI location) throws IOException
 This constructor creates a LogicalFile corresponding to the passed URI instance and uses the passed GATContext to broker resources.


Protected Attributes

URI location
GATContext gatContext
Preferences preferences

Detailed Description

An abstract representation of a set of identical physical files.

A LogicalFile is an abstract representation of a set of identical physical files. This abstraction is useful for a number of reasons. For example, if one wishes to replicate a physical file which is at one URI to a second URI. Normally, one takes all the data at the first URI and replicates it to the second URI even though the "network distance," between the first and second URI may be great. A better solution to this problem is to have a set of identical physical files distributed at different locations in "network space." If one then wishes to replicate a physical file from one URI to a second URI, GAT can then first determine which physical file is closest in "network space" to the second URI, chose that physical file as the source file, and copy it to the destination URI. Similarly, the construct of a LogicalFile allows for migrating programs to, while at a given point in "network space," use the closest physical file in "network space" to its physical location.

Definition at line 34 of file LogicalFile.java.


Constructor & Destructor Documentation

io::LogicalFile::LogicalFile GATContext    gatContext,
Preferences    preferences,
URI    location
throws IOException [inline, protected]
 

This constructor creates a LogicalFile corresponding to the passed URI instance and uses the passed GATContext to broker resources.

Parameters:
location  The URI of one physical file in this LogicalFile
gatContext  The GATContext used to broker resources
preferences  The Preferences for this instance
Exceptions:
java  .lang.Exception Thrown upon creation problems

Definition at line 55 of file LogicalFile.java.

References io::LogicalFile::gatContext, io::LogicalFile::location, and io::LogicalFile::preferences.


Member Function Documentation

LogicalFile io::LogicalFile::create GATContext    gatContext,
URI    location
throws Exception [inline]
 

This method creates a LogicalFile corresponding to the passed URI instance and uses the passed GATContext to broker resources.

Parameters:
location  The URI of one physical file in this LogicalFile
gatContext  The GATContext used to broker resources
preferences  The Preferences for this instance
Exceptions:
java  .lang.Exception Thrown upon creation problems

Definition at line 75 of file LogicalFile.java.

References io::LogicalFile::gatContext, and io::LogicalFile::location.

LogicalFile io::LogicalFile::create GATContext    gatContext,
Preferences    preferences,
URI    location
throws Exception [inline]
 

This method creates a LogicalFile corresponding to the passed URI instance and uses the passed GATContext to broker resources.

Parameters:
location  The URI of one physical file in this LogicalFile
gatContext  The GATContext used to broker resources
preferences  The Preferences for this instance
Exceptions:
java  .lang.Exception Thrown upon creation problems

Definition at line 93 of file LogicalFile.java.

References io::LogicalFile::gatContext, io::LogicalFile::location, and io::LogicalFile::preferences.

abstract void io::LogicalFile::addFile File    file throws RemoteException [pure virtual]
 

Adds the passed File instance to the set of physical files represented by this LogicalFile instance.

Parameters:
file  A File instance to add to the set of physical files represented by this LogicalFile instance.
Exceptions:
java  .rmi.RemoteException Thrown upon problems accessing the remote instance

abstract void io::LogicalFile::addURI URI    location throws RemoteException [pure virtual]
 

Adds the physical file at the passed URI to the set of physical files represented by this LogicalFile instance.

Parameters:
location  The URI of a physical file to add to the set of physical files represented by this LogicalFile instance.
Exceptions:
java  .rmi.RemoteException Thrown upon problems accessing the remote instance

abstract void io::LogicalFile::removeFile File    file throws RemoteException [pure virtual]
 

Removes the passed File instance from the set of physical files represented by this LogicalFile instance.

Parameters:
file  A File instance to remove from the set of physical files represented by this LogicalFile instance.
Exceptions:
java  .rmi.RemoteException Thrown upon problems accessing the remote instance

abstract void io::LogicalFile::removeURI URI    location throws RemoteException [pure virtual]
 

Removes the physical file at the passed URI from the set of physical files represented by this LogicalFile instance.

Parameters:
location  The URI of a physical file to remove from the set of physical files represented by this LogicalFile instance.
Exceptions:
java  .rmi.RemoteException Thrown upon problems accessing the remote instance

abstract void io::LogicalFile::replicate URI    location throws RemoteException, IOException [pure virtual]
 

Replicates the logical file represented by this instance to the physical file specified by the passed URI.

Parameters:
location  The URI of the new physical file
Exceptions:
java  .rmi.RemoteException Thrown upon problems accessing the remote instance
java  .io.IOException Upon non-remote IO problem

abstract List io::LogicalFile::getURIs   throws RemoteException [pure virtual]
 

Returns a java.util.List of URI instances each of which is the URI of a physical file represented by this instance.

Returns:
The java.util.List of URIs
Exceptions:
java  .rmi.RemoteException Thrown upon problems accessing the remote instance

abstract List io::LogicalFile::getFiles   throws RemoteException [pure virtual]
 

Returns a java.util.List of File instances each of which is a File corresponding to a physical file represented by this instance.

Returns:
The java.util.List of URIs
Exceptions:
java  .rmi.RemoteException Thrown upon problems accessing the remote instance

abstract void io::LogicalFile::addMetricListener MetricListener    metricListener,
Metric    metric
throws RemoteException [pure virtual]
 

This method adds the passed instance of a MetricListener to the java.util.List of MetricListeners which are notified of MetricEvents by an instance of this class.

The passed MetricListener is only notified of MetricEvents which correspond to Metric instance passed to this method.

Parameters:
metricListener  The MetricListener to notify of MetricEvents
metric  The Metric corresponding to the MetricEvents for which the passed MetricListener will be notified
Exceptions:
java  .rmi.RemoteException Thrown upon problems accessing the remote instance

abstract void io::LogicalFile::removeMetricListener MetricListener    metricListener,
Metric    metric
throws RemoteException [pure virtual]
 

Removes the passed MetricListener from the java.util.List of MetricListeners which are notified of MetricEvents corresponding to the passed Metric instance.

Parameters:
metricListener  The MetricListener to notify of MetricEvents
metric  The Metric corresponding to the MetricEvents for which the passed MetricListener will be notified
Exceptions:
java  .rmi.RemoteException Thrown upon problems accessing the remote instance

abstract List io::LogicalFile::getMetrics   throws RemoteException [pure virtual]
 

This method returns a java.util.List of Metric instances.

Each Metric instance in this java.util.List is a Metric which can be monitored on this instance.

Returns:
An java.util.List of Metric instances. Each Metric instance in this java.util.List is a Metric which can be monitored on this instance.
Exceptions:
java  .rmi.RemoteException Thrown upon problems accessing the remote instance


Member Data Documentation

URI io::LogicalFile::location [protected]
 

Definition at line 36 of file LogicalFile.java.

Referenced by io::LogicalFile::create(), io::LogicalFile::LogicalFile(), and cpi::LogicalFileCpi::LogicalFileCpi().

GATContext io::LogicalFile::gatContext [protected]
 

Definition at line 38 of file LogicalFile.java.

Referenced by io::LogicalFile::create(), io::LogicalFile::LogicalFile(), and cpi::LogicalFileCpi::LogicalFileCpi().

Preferences io::LogicalFile::preferences [protected]
 

Definition at line 40 of file LogicalFile.java.

Referenced by io::LogicalFile::create(), io::LogicalFile::LogicalFile(), and cpi::LogicalFileCpi::LogicalFileCpi().


The documentation for this class was generated from the following file: