org.ourgrid.mygrid.scheduler
Class DataDiscoveryEntry

java.lang.Object
  extended by org.ourgrid.mygrid.scheduler.DataDiscoveryEntry
All Implemented Interfaces:
java.io.Serializable

public class DataDiscoveryEntry
extends java.lang.Object
implements java.io.Serializable

This is the Data Discovery Entry class. It represents a single entry in the Data Discovery lookup table..

See Also:
Serialized Form

Constructor Summary
DataDiscoveryEntry()
           
DataDiscoveryEntry(java.lang.String fileDigest, long fileSize, java.lang.String fileLocation, long expireDate)
          Creates a new Data Discovery entry
 
Method Summary
 java.lang.String getDigest()
          Returns an entry's file digest
 java.util.Map<java.lang.String,java.lang.Long> getLocations()
          Returns an entry's locations sub-table
 long getSize()
          Returns an enttry's file size
 void setDigest(java.lang.String fileDigest)
          Assigns the digest value for this entry
 void setLocation(java.lang.String fileLocation, long expireDate)
          Adds a valid location and time-stamp to the locations sub-table
 void setSize(long fileSize)
          Assigns the file size value for this entry
 java.lang.String toString()
          Formats an entry as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataDiscoveryEntry

public DataDiscoveryEntry()

DataDiscoveryEntry

public DataDiscoveryEntry(java.lang.String fileDigest,
                          long fileSize,
                          java.lang.String fileLocation,
                          long expireDate)
Creates a new Data Discovery entry

Parameters:
fileDigest - Digest of a transfered file. Used as primary key.
fileSize - The size in bytes of the file transfered.
fileLocation - The full path (file://site/remote_path) of the file's destination
expireDate - The date at which the location information is no longer valid. Not yet used.
Method Detail

setDigest

public void setDigest(java.lang.String fileDigest)
Assigns the digest value for this entry

Parameters:
fileDigest - Digest of a transfered file. Used as primary key.

setSize

public void setSize(long fileSize)
Assigns the file size value for this entry

Parameters:
fileSize - The size in bytes of the file transfered.

setLocation

public void setLocation(java.lang.String fileLocation,
                        long expireDate)
Adds a valid location and time-stamp to the locations sub-table

Parameters:
fileLocation - The full path (file://site/remote_path) of the file's destination
expireDate - The date at which the location information is no longer valid. Not yet used.

getDigest

public java.lang.String getDigest()
Returns an entry's file digest


getSize

public long getSize()
Returns an enttry's file size


getLocations

public java.util.Map<java.lang.String,java.lang.Long> getLocations()
Returns an entry's locations sub-table


toString

public java.lang.String toString()
Formats an entry as a string

Overrides:
toString in class java.lang.Object