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

ReplicaManager.h

Go to the documentation of this file.
00001 /*
00002  *
00003  * ReplicaManager.h
00004  *
00005  * Copyright (c) 2002 INFN, CERN on behalf of the EU DataGrid.
00006  * For license conditions see LICENSE file or 
00007  * http://www.edg.org/license.html
00008  * 
00009  */
00010 
00011 #ifndef ReplicaManager_H
00012 #define ReplicaManager_H 1
00013 
00014 /*
00015  * @author <a href="mailto:Andrea.Domenici@iet.unipi.it">Andrea Domenici</a>
00016  */
00017 
00018 #include <string>
00019 #include <vector>
00020 
00021 #include "EdgReplicaOptimization/ReplicaOptimization.h"
00022 #include <EdgReplicaLocationService/ReplicationExceptions.h>
00023 #include <EdgReplicaMetadataCatalog/ReplicationExceptions.h>
00024 #include <EdgReplicaManager/ReplicaManagerExceptions.h>
00025 
00030 namespace EdgReplicaManager {
00031 
00033     class ReplicaManager {
00034     public:
00035         typedef std::vector<std::string>                LFNList_t;
00036         typedef std::vector<std::string>                SFNList_t;
00037         typedef std::vector<std::string>                LRCList_t;
00038         typedef std::vector<std::string>                CEList_t;
00039         typedef std::vector<std::string>                SEList_t;
00040         typedef std::vector<std::string>                Protocols_t;
00041         typedef std::vector<EdgReplicaOptimization::AccessCost> AccessCosts_t;
00042 
00045         virtual ~ReplicaManager() {};
00046 
00048         virtual void listReplicas(std::string fileID, SFNList_t & sfns)
00049             throw ( ReplicaManagerException, 
00050                     EdgReplicaLocationService::NoSuchGuidException,
00051                     EdgReplicaLocationService::NoSuchPfnException,
00052                     EdgReplicaMetadataCatalog::NoSuchAliasException,
00053                     EdgReplicaMetadataCatalog::CommunicationException,
00054                     EdgReplicaLocationService::CommunicationException ) = 0;
00055 
00057         virtual void getAccessCost(LFNList_t LFNList,
00058                                    CEList_t CEList,
00059                                    //  SEList_t CloseSEList,
00060                                    Protocols_t protocols,
00061                                    AccessCosts_t &accessCost)
00062             throw ( ReplicaManagerException,
00063                     EdgReplicaOptimization::ReplicationException,
00064                     EdgReplicaLocationService::NoSuchGuidException,
00065                     EdgReplicaLocationService::NoSuchPfnException ,
00066                     EdgReplicaMetadataCatalog::NoSuchAliasException,
00067                     EdgReplicaMetadataCatalog::CommunicationException,
00068                     EdgReplicaLocationService::CommunicationException) = 0;
00069 
00070         //EdgReplicaOptimization::ReplicaOptimization::AccessCosts_t
00071         //getAccessCost(LFNList_t   LFNList,
00072         //              CEList_t    CEList,
00073         //              std::string protocol);
00074         virtual std::string listBestFile(std::string file, std::string seHost)
00075             throw ( ReplicaManagerException,
00076                     EdgReplicaOptimization::ReplicationException,
00077                     EdgReplicaLocationService::NoSuchGuidException,
00078                     EdgReplicaLocationService::NoSuchPfnException ,
00079                     EdgReplicaMetadataCatalog::NoSuchAliasException,
00080                     EdgReplicaMetadataCatalog::CommunicationException,
00081                     EdgReplicaLocationService::CommunicationException ) = 0;
00082 
00084         virtual void setSecure() = 0;
00085     };
00086 
00087 };
00088 
00089 #endif
The EU DataGrid Project. All rights reserved.