Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
6cf6a342
Commit
6cf6a342
authored
Oct 03, 2014
by
Steven Murray
Browse files
Renamed the class diskFileFactory to DiskFileFactory
parent
393f7a62
Changes
10
Hide whitespace changes
Inline
Side-by-side
castor/tape/tapeserver/daemon/DiskReadTask.cpp
View file @
6cf6a342
...
...
@@ -43,7 +43,7 @@ m_nextTask(destination),m_migratedFile(file),
//------------------------------------------------------------------------------
// DiskReadTask::execute
//------------------------------------------------------------------------------
void
DiskReadTask
::
execute
(
log
::
LogContext
&
lc
,
diskFile
::
d
iskFileFactory
&
fileFactory
)
{
void
DiskReadTask
::
execute
(
log
::
LogContext
&
lc
,
diskFile
::
D
iskFileFactory
&
fileFactory
)
{
using
log
::
LogContext
;
using
log
::
Param
;
...
...
castor/tape/tapeserver/daemon/DiskReadTask.hpp
View file @
6cf6a342
...
...
@@ -48,7 +48,7 @@ public:
tape
::
tapegateway
::
FileToMigrateStruct
*
file
,
size_t
numberOfBlock
,
castor
::
server
::
AtomicFlag
&
errorFlag
);
void
execute
(
log
::
LogContext
&
lc
,
diskFile
::
d
iskFileFactory
&
fileFactory
);
void
execute
(
log
::
LogContext
&
lc
,
diskFile
::
D
iskFileFactory
&
fileFactory
);
/**
* Return the stats of the tasks. Should be call after execute
* (otherwise, it is pointless)
...
...
castor/tape/tapeserver/daemon/DiskReadThreadPool.hpp
View file @
6cf6a342
...
...
@@ -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
::
d
iskFileFactory
m_diskFileFactory
;
diskFile
::
D
iskFileFactory
m_diskFileFactory
;
/**
* Subclass of the thread pool's worker thread.
...
...
castor/tape/tapeserver/daemon/DiskWriteTask.cpp
View file @
6cf6a342
...
...
@@ -44,7 +44,7 @@ m_recallingFile(file),m_memManager(mm){
// DiskWriteTask::execute
//------------------------------------------------------------------------------
bool
DiskWriteTask
::
execute
(
RecallReportPacker
&
reporter
,
log
::
LogContext
&
lc
,
diskFile
::
d
iskFileFactory
&
fileFactory
)
{
diskFile
::
D
iskFileFactory
&
fileFactory
)
{
using
log
::
LogContext
;
using
log
::
Param
;
utils
::
Timer
localTime
;
...
...
castor/tape/tapeserver/daemon/DiskWriteTask.hpp
View file @
6cf6a342
...
...
@@ -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
::
d
iskFileFactory
&
fileFactory
)
;
diskFile
::
D
iskFileFactory
&
fileFactory
)
;
/**
* Allows client code to return a reusable memory block. Should not been called
...
...
castor/tape/tapeserver/daemon/DiskWriteTaskTest.cpp
View file @
6cf6a342
...
...
@@ -57,7 +57,7 @@ namespace unitTests{
MockRecallReportPacker
report
(
client
,
lc
);
EXPECT_CALL
(
report
,
reportFailedJob
(
_
,
_
,
_
));
RecallMemoryManager
mm
(
10
,
100
,
lc
);
d
iskFileFactory
fileFactory
(
"RFIO"
);
D
iskFileFactory
fileFactory
(
"RFIO"
);
castor
::
tape
::
tapegateway
::
FileToRecallStruct
file
;
file
.
setPath
(
"/dev/null"
);
...
...
castor/tape/tapeserver/daemon/DiskWriteThreadPool.hpp
View file @
6cf6a342
...
...
@@ -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
::
d
iskFileFactory
m_diskFileFactory
;
diskFile
::
D
iskFileFactory
m_diskFileFactory
;
/**
* Private class implementing the worker threads.
...
...
castor/tape/tapeserver/file/DiskFile.cpp
View file @
6cf6a342
...
...
@@ -35,7 +35,7 @@ namespace castor {
namespace
tape
{
namespace
diskFile
{
d
iskFileFactory
::
d
iskFileFactory
(
const
std
::
string
&
remoteFileProtocol
)
:
D
iskFileFactory
::
D
iskFileFactory
(
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
*
d
iskFileFactory
::
createReadFile
(
const
std
::
string
&
path
)
{
ReadFile
*
D
iskFileFactory
::
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
d
iskFileFactory::createReadFile failed to parse URL: "
)
+
path
);
std
::
string
(
"In
D
iskFileFactory::createReadFile failed to parse URL: "
)
+
path
);
}
WriteFile
*
d
iskFileFactory
::
createWriteFile
(
const
std
::
string
&
path
)
{
WriteFile
*
D
iskFileFactory
::
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
d
iskFileFactory::createWriteFile failed to parse URL: "
)
+
path
);
std
::
string
(
"In
D
iskFileFactory::createWriteFile failed to parse URL: "
)
+
path
);
}
//==============================================================================
...
...
castor/tape/tapeserver/file/DiskFile.hpp
View file @
6cf6a342
...
...
@@ -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
d
iskFileFactory
{
class
D
iskFileFactory
{
typedef
castor
::
tape
::
utils
::
Regex
Regex
;
public:
d
iskFileFactory
(
const
std
::
string
&
remoteFileProtocol
);
D
iskFileFactory
(
const
std
::
string
&
remoteFileProtocol
);
ReadFile
*
createReadFile
(
const
std
::
string
&
path
);
WriteFile
*
createWriteFile
(
const
std
::
string
&
path
);
private:
...
...
castor/tape/tapeserver/file/FileTest.cpp
View file @
6cf6a342
...
...
@@ -212,7 +212,7 @@ namespace UnitTests {
const
uint32_t
block_size
=
1024
;
char
data1
[
block_size
];
char
data2
[
block_size
];
castor
::
tape
::
diskFile
::
d
iskFileFactory
fileFactory
(
"RFIO"
);
castor
::
tape
::
diskFile
::
D
iskFileFactory
fileFactory
(
"RFIO"
);
{
std
::
auto_ptr
<
castor
::
tape
::
diskFile
::
ReadFile
>
rf
(
fileFactory
.
createReadFile
(
"localhost:/etc/fstab"
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment