Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

DistributedAccessRepository.h

Go to the documentation of this file.
00001 #ifndef Impala_Persistency_DistributedAccessRepository_h
00002 #define Impala_Persistency_DistributedAccessRepository_h
00003 
00004 #include "Persistency/RepositoryDispatcher.h"
00005 #include "Persistency/DistributedAccessRepositoryInFile.h"
00006 #include "Persistency/RepositoryNotImplemented.h"
00007 
00008 namespace Impala
00009 {
00010 namespace Persistency
00011 {
00012 
00013 
00014 class DistributedAccessRepository
00015     : public RepositoryDispatcher<KernelMatrixLocator,
00016                                   Core::Matrix::DistributedAccess,
00017                                   DistributedAccessRepositoryInFile,
00018                                   RepositoryNotImplemented<Core::Matrix::DistributedAccess> >
00019 {
00020 public:
00021 
00022     // Allow for others to get at the path where data is/would be stored.
00023     File
00024     ExposeFile(const KernelMatrixLocator& loc, bool toWrite)
00025     {
00026         String protocol = loc.GetProtocol();
00027         if ((protocol == "file") || (protocol == "dataServer"))
00028         {
00029             return mRepFile.ExposeFile(loc, toWrite);
00030         }
00031         ILOG_ERROR("ExposeFile: unknown protocol: [" << loc.GetProtocol()
00032                    << "] in " << loc);
00033         return File();
00034     }
00035 
00036 private:
00037 
00038     ILOG_VAR_DEC;
00039 
00040 };
00041 
00042 ILOG_VAR_INIT(DistributedAccessRepository, Impala.Persistency);
00043 
00044 } // namespace Persistency
00045 } // namespace Impala
00046 
00047 #endif

Generated on Thu Jan 13 09:05:01 2011 for ImpalaSrc by  doxygen 1.5.1