|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LogicalFile
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 use the physical file in "network space" that is closest to its physical location.
Field Summary | |
---|---|
static int |
CREATE
create new, if logical file does not exist |
static int |
OPEN
open, if logical file exists |
static int |
TRUNCATE
create new, if logical file exists |
Method Summary | |
---|---|
void |
addFile(File file)
Adds the passed File instance to the set of physical files represented by this LogicalFile instance. |
void |
addURI(URI location)
Adds the physical file at the passed URI to the set of physical files represented by this LogicalFile instance. |
URI |
getClosestURI(URI loc)
Returns the URI with the smallest network distance to given
URI . |
List<File> |
getFiles()
Returns a java.util.List of File instances each of which is a File corresponding to a physical file represented by this instance. |
String |
getName()
Returns the name of this logical file |
List<URI> |
getOrderedURIs(URI location)
Returns a List of URI s ordered from close to
less closer with respect to the given URI. |
List<URI> |
getURIs()
Returns a java.util.List of URI instances each of which is the URI of a physical file represented by this instance. |
void |
removeFile(File file)
Removes the passed File instance from the set of physical files represented by this LogicalFile instance. |
void |
removeURI(URI location)
Removes the physical file at the passed URI from the set of physical files represented by this LogicalFile instance. |
void |
replicate(URI location)
Replicates the logical file represented by this instance to the physical file specified by the passed URI. |
Methods inherited from interface org.gridlab.gat.monitoring.Monitorable |
---|
addMetricListener, getMeasurement, getMetricDefinitionByName, getMetricDefinitions, removeMetricListener |
Methods inherited from interface org.gridlab.gat.advert.Advertisable |
---|
marshal |
Field Detail |
---|
static final int OPEN
static final int CREATE
static final int TRUNCATE
Method Detail |
---|
void addFile(File file) throws GATInvocationException, IOException
file
- A File instance to add to the set of physical files
represented by this LogicalFile instance.
GATInvocationException
- Thrown upon problems accessing the remote instance
IOException
- if an IO operation failsvoid addURI(URI location) throws GATInvocationException, IOException
location
- The URI of a physical file to add to the set of physical
files represented by this LogicalFile instance.
GATInvocationException
- Thrown upon problems accessing the remote instance
IOException
- if an IO operation failsvoid removeFile(File file) throws GATInvocationException, IOException
file
- A File instance to remove from the set of physical files
represented by this LogicalFile instance.
GATInvocationException
- Thrown upon problems accessing the remote instance
IOException
- if an IO operation failsvoid removeURI(URI location) throws GATInvocationException, IOException
location
- The URI of a physical file to remove from the set of
physical files represented by this LogicalFile instance.
GATInvocationException
- Thrown upon problems accessing the remote instance
IOException
- if an IO operation failsvoid replicate(URI location) throws GATInvocationException, IOException
location
- The URI of the new physical file
GATInvocationException
- Upon non-remote IO problem
IOException
- if an IO operation failsList<URI> getURIs() throws GATInvocationException, IOException
GATInvocationException
- Thrown upon problems accessing the remote instance
IOException
- if an IO operation failsList<File> getFiles() throws GATInvocationException, IOException
GATInvocationException
- Thrown upon problems accessing the remote instance
IOException
- if an IO operation failsURI getClosestURI(URI loc) throws GATInvocationException
URI
with the smallest network distance to given
URI
.
loc
- the URI to compare with
GATInvocationException
- if the method fails.List<URI> getOrderedURIs(URI location) throws GATInvocationException
List
of URI
s ordered from close to
less closer with respect to the given URI.
location
- the location that's used to determine the distance
List
of URI
s ordered from close to
less closer with respect to the given URI.
GATInvocationException
String getName() throws GATInvocationException
GATInvocationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |