Commit 6cf6a342 authored by Steven Murray's avatar Steven Murray
Browse files

Renamed the class diskFileFactory to DiskFileFactory

parent 393f7a62
......@@ -43,7 +43,7 @@ m_nextTask(destination),m_migratedFile(file),
//------------------------------------------------------------------------------
// DiskReadTask::execute
//------------------------------------------------------------------------------
void DiskReadTask::execute(log::LogContext& lc, diskFile::diskFileFactory & fileFactory) {
void DiskReadTask::execute(log::LogContext& lc, diskFile::DiskFileFactory & fileFactory) {
using log::LogContext;
using log::Param;
......
......@@ -48,7 +48,7 @@ public:
tape::tapegateway::FileToMigrateStruct* file,size_t numberOfBlock,
castor::server::AtomicFlag& errorFlag);
void execute(log::LogContext& lc, diskFile::diskFileFactory & fileFactory);
void execute(log::LogContext& lc, diskFile::DiskFileFactory & fileFactory);
/**
* Return the stats of the tasks. Should be call after execute
* (otherwise, it is pointless)
......
......@@ -134,7 +134,7 @@ private:
* A disk file factory, that will create the proper type of file access class,
* depending on the received path
*/
diskFile::diskFileFactory m_diskFileFactory;
diskFile::DiskFileFactory m_diskFileFactory;
/**
* Subclass of the thread pool's worker thread.
......
......@@ -44,7 +44,7 @@ m_recallingFile(file),m_memManager(mm){
// DiskWriteTask::execute
//------------------------------------------------------------------------------
bool DiskWriteTask::execute(RecallReportPacker& reporter,log::LogContext& lc,
diskFile::diskFileFactory & fileFactory) {
diskFile::DiskFileFactory & fileFactory) {
using log::LogContext;
using log::Param;
utils::Timer localTime;
......
......@@ -63,7 +63,7 @@ public:
* @return true if the file has been successfully written false otherwise.
*/
virtual bool execute(RecallReportPacker& reporter,log::LogContext& lc,
diskFile::diskFileFactory & fileFactory) ;
diskFile::DiskFileFactory & fileFactory) ;
/**
* Allows client code to return a reusable memory block. Should not been called
......
......@@ -57,7 +57,7 @@ namespace unitTests{
MockRecallReportPacker report(client,lc);
EXPECT_CALL(report,reportFailedJob(_,_,_));
RecallMemoryManager mm(10,100,lc);
diskFileFactory fileFactory("RFIO");
DiskFileFactory fileFactory("RFIO");
castor::tape::tapegateway::FileToRecallStruct file;
file.setPath("/dev/null");
......
......@@ -99,7 +99,7 @@ private:
* A disk file factory, that will create the proper type of file access class,
* depending on the received path
*/
diskFile::diskFileFactory m_diskFileFactory;
diskFile::DiskFileFactory m_diskFileFactory;
/**
* Private class implementing the worker threads.
......
......@@ -35,7 +35,7 @@ namespace castor {
namespace tape {
namespace diskFile {
diskFileFactory::diskFileFactory(const std::string & remoteFileProtocol):
DiskFileFactory::DiskFileFactory(const std::string & remoteFileProtocol):
m_NoURLLocalFile("^(localhost:|)(/.*)$"),
m_NoURLRemoteFile("^(.*:/.*)$"),
m_NoURLRadosStriperFile("^localhost:([^/].*)$"),
......@@ -46,7 +46,7 @@ diskFileFactory::diskFileFactory(const std::string & remoteFileProtocol):
m_remoteFileProtocol(remoteFileProtocol)
{}
ReadFile * diskFileFactory::createReadFile(const std::string& path) {
ReadFile * DiskFileFactory::createReadFile(const std::string& path) {
std::vector<std::string> regexResult;
// URL path parsing
// local file URL?
......@@ -90,10 +90,10 @@ ReadFile * diskFileFactory::createReadFile(const std::string& path) {
return new RadosStriperReadFile(regexResult[1]);
}
throw castor::exception::Exception(
std::string("In diskFileFactory::createReadFile failed to parse URL: ")+path);
std::string("In DiskFileFactory::createReadFile failed to parse URL: ")+path);
}
WriteFile * diskFileFactory::createWriteFile(const std::string& path) {
WriteFile * DiskFileFactory::createWriteFile(const std::string& path) {
std::vector<std::string> regexResult;
// URL path parsing
// local file URL?
......@@ -137,7 +137,7 @@ WriteFile * diskFileFactory::createWriteFile(const std::string& path) {
return new RadosStriperWriteFile(regexResult[0]);
}
throw castor::exception::Exception(
std::string("In diskFileFactory::createWriteFile failed to parse URL: ")+path);
std::string("In DiskFileFactory::createWriteFile failed to parse URL: ")+path);
}
//==============================================================================
......
......@@ -46,10 +46,10 @@ namespace castor {
* based on the url passed and a config paramter.
* Currently, the parameter allows switching between RFIO and XROOT
*/
class diskFileFactory {
class DiskFileFactory {
typedef castor::tape::utils::Regex Regex;
public:
diskFileFactory(const std::string & remoteFileProtocol);
DiskFileFactory(const std::string & remoteFileProtocol);
ReadFile * createReadFile(const std::string & path);
WriteFile * createWriteFile(const std::string & path);
private:
......
......@@ -212,7 +212,7 @@ namespace UnitTests {
const uint32_t block_size = 1024;
char data1[block_size];
char data2[block_size];
castor::tape::diskFile::diskFileFactory fileFactory("RFIO");
castor::tape::diskFile::DiskFileFactory fileFactory("RFIO");
{
std::auto_ptr<castor::tape::diskFile::ReadFile> rf(
fileFactory.createReadFile("localhost:/etc/fstab"));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment