org.gridbus.broker.common
Class DataHost

java.lang.Object
  extended by org.gridbus.broker.common.Service
      extended by org.gridbus.broker.common.DataHost
Direct Known Subclasses:
GridFTPDataHost, SrbDataHost

public abstract class DataHost
extends Service

Author:
Krishna

Constructor Summary
DataHost()
           
DataHost(java.lang.String hostname)
          Constructor for DataHost class.
 
Method Summary
 void addFilePath(java.lang.String filename, java.lang.String path)
          Adds a filepath to the list of existing files hosted by this datahost
 void clearFilePaths()
          Clears all the file paths associated with this datahost
 boolean equals(java.lang.Object otherHost)
           
 int getDataAccessMode()
           
abstract  int getDataHostType()
           
 java.util.Map getFileTable()
           
abstract  java.lang.String getFullFilePath(java.lang.String filename)
          Returns the full path of the file (including the filename) on this host specified by the filename
 java.lang.String getHostname()
           
 int getServiceType()
           
 boolean isFilePresent(java.lang.String filename)
          Returns whether the file specified by the filename exists on this host or not
 void setDataAccessMode(int dataAccessMode)
           
 
Methods inherited from class org.gridbus.broker.common.Service
discoverProperties, getApplicationID, getId, getMappingID, getName, isAvailable, setApplicationID, setAvailable, setMappingID, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataHost

public DataHost()

DataHost

public DataHost(java.lang.String hostname)
Constructor for DataHost class. The DataHost class represents a node on the grid which is used as a source for reading data. To optimise data transfers, a DataHost can use a NetworkWeatherService and calculate the available bandwidth between itself and another Compute node. For this to happen, the NetworkWeatherService field of the DataHost has to be set using the setNetworkService() method.

Parameters:
hostname -
Method Detail

addFilePath

public void addFilePath(java.lang.String filename,
                        java.lang.String path)
Adds a filepath to the list of existing files hosted by this datahost

Parameters:
filename -
path -

clearFilePaths

public void clearFilePaths()
Clears all the file paths associated with this datahost


getFullFilePath

public abstract java.lang.String getFullFilePath(java.lang.String filename)
Returns the full path of the file (including the filename) on this host specified by the filename

Parameters:
filename -
Returns:

isFilePresent

public boolean isFilePresent(java.lang.String filename)
Returns whether the file specified by the filename exists on this host or not

Parameters:
filename -
Returns:
boolean

getHostname

public java.lang.String getHostname()
Returns:
hostname of the DataHost

getServiceType

public int getServiceType()
Specified by:
getServiceType in class Service
Returns:
Returns the type of the service (One of the contants in ServiceType class).
See Also:
org.gridbus.broker.farming.common.Service#getServiceType()

getDataHostType

public abstract int getDataHostType()

getFileTable

public java.util.Map getFileTable()
Returns:
Returns the fileTable.

getDataAccessMode

public int getDataAccessMode()
Returns:
Returns the dataAccessMode.

setDataAccessMode

public void setDataAccessMode(int dataAccessMode)
Parameters:
dataAccessMode - The dataAccessMode to set.

equals

public boolean equals(java.lang.Object otherHost)
Overrides:
equals in class java.lang.Object

Copyright © The University of Melbourne. 2006