org.edg.data.reptor.optimization
Class FakeOptor

java.lang.Object
  |
  +--org.edg.data.reptor.optimization.FakeOptor
All Implemented Interfaces:
org.edg.data.ros.EdgReplicaOptimization, java.rmi.Remote

public class FakeOptor
extends java.lang.Object
implements org.edg.data.ros.EdgReplicaOptimization

This is a fake ROS in case the configuration is such that we should do all the fun even without it.

Version:
$Id: FakeOptor.java,v 1.1 2003/07/04 21:20:59 pkunszt Exp $
Author:
Peter Kunszt

Constructor Summary
FakeOptor()
           
 
Method Summary
 org.edg.data.ros.AccessCost[] getAccessCost(org.edg.data.ros.ROSFile[] files, org.edg.data.ros.ROSComputingElement[] ce, java.lang.String[] protocol)
          Calculate the expected file access cost per-Logical-File-Name.
 org.edg.data.ros.BestNetworkCost getBestNetworkCost(org.edg.data.ros.ROSFile file, java.lang.String destinationSE)
          Return the FileName (PFN) of the best file in terms of network latencies.
 org.edg.data.ros.SECost[] getSECost(java.lang.String seId, java.lang.String[] pfns)
          This is not currently used by the RM.
 java.lang.String getVersion()
           
 java.lang.String ping()
          Send a contact message to the Optor server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FakeOptor

public FakeOptor()
Method Detail

getAccessCost

public org.edg.data.ros.AccessCost[] getAccessCost(org.edg.data.ros.ROSFile[] files,
                                                   org.edg.data.ros.ROSComputingElement[] ce,
                                                   java.lang.String[] protocol)
                                            throws java.rmi.RemoteException
Calculate the expected file access cost per-Logical-File-Name. It makes the assumptions that no replication occurs.

Specified by:
getAccessCost in interface org.edg.data.ros.EdgReplicaOptimization
Parameters:
files - the array of ROS File Names.
ce - the array of ROSComputingElement.
protocol - FileHandler to be used.
Returns:
The AccessCost array in same order as ce array
java.rmi.RemoteException
See Also:
Design of a Replica Optimisation Framework

getBestNetworkCost

public org.edg.data.ros.BestNetworkCost getBestNetworkCost(org.edg.data.ros.ROSFile file,
                                                           java.lang.String destinationSE)
                                                    throws java.rmi.RemoteException
Return the FileName (PFN) of the best file in terms of network latencies.

Specified by:
getBestNetworkCost in interface org.edg.data.ros.EdgReplicaOptimization
Parameters:
file - ROS File.
destinationSE - destination StorageElement.
Returns:
FileName
java.rmi.RemoteException

getSECost

public org.edg.data.ros.SECost[] getSECost(java.lang.String seId,
                                           java.lang.String[] pfns)
                                    throws java.rmi.RemoteException
This is not currently used by the RM.

Specified by:
getSECost in interface org.edg.data.ros.EdgReplicaOptimization
Parameters:
seId - ID of the SE.
pfns - list of PFNs (SFNs) on the respective SE.
Returns:
SECost list access costs for files on the SE.
java.rmi.RemoteException

ping

public java.lang.String ping()
Send a contact message to the Optor server

Specified by:
ping in interface org.edg.data.ros.EdgReplicaOptimization
Returns:
success if Optor is listening

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface org.edg.data.ros.EdgReplicaOptimization