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
f5fa4174
Commit
f5fa4174
authored
Sep 25, 2014
by
Steven Murray
Browse files
Renamed DriveCatalogue classes to simply Catalogue
parent
1f659d15
Changes
34
Expand all
Hide whitespace changes
Inline
Side-by-side
castor/tape/tapeserver/daemon/AdminAcceptHandler.cpp
View file @
f5fa4174
...
...
@@ -50,7 +50,7 @@ castor::tape::tapeserver::daemon::AdminAcceptHandler::AdminAcceptHandler(
reactor
::
ZMQReactor
&
reactor
,
log
::
Logger
&
log
,
legacymsg
::
VdqmProxy
&
vdqm
,
Drive
Catalogue
&
driveCatalogue
,
Catalogue
&
driveCatalogue
,
const
std
::
string
&
hostName
)
throw
()
:
m_fd
(
fd
),
...
...
castor/tape/tapeserver/daemon/AdminAcceptHandler.hpp
View file @
f5fa4174
...
...
@@ -22,7 +22,7 @@
#pragma once
#include
"castor/log/Logger.hpp"
#include
"castor/tape/tapeserver/daemon/
Drive
Catalogue.hpp"
#include
"castor/tape/tapeserver/daemon/Catalogue.hpp"
#include
"castor/legacymsg/MessageHeader.hpp"
#include
"castor/legacymsg/TapeConfigRequestMsgBody.hpp"
#include
"castor/legacymsg/TapeStatRequestMsgBody.hpp"
...
...
@@ -60,7 +60,7 @@ public:
reactor
::
ZMQReactor
&
reactor
,
log
::
Logger
&
log
,
legacymsg
::
VdqmProxy
&
vdqm
,
Drive
Catalogue
&
driveCatalogue
,
Catalogue
&
driveCatalogue
,
const
std
::
string
&
hostName
)
throw
();
/**
...
...
@@ -126,7 +126,7 @@ private:
/**
* The catalogue of tape drives controlled by the tape server daemon.
*/
Drive
Catalogue
&
m_driveCatalogue
;
Catalogue
&
m_driveCatalogue
;
/**
* The name of the host on which tape daemon is running. This name is
...
...
castor/tape/tapeserver/daemon/AdminConnectionHandler.cpp
View file @
f5fa4174
...
...
@@ -49,7 +49,7 @@ castor::tape::tapeserver::daemon::AdminConnectionHandler::AdminConnectionHandler
const
int
fd
,
reactor
::
ZMQReactor
&
reactor
,
log
::
Logger
&
log
,
Drive
Catalogue
&
driveCatalogue
)
Catalogue
&
driveCatalogue
)
throw
()
:
m_fd
(
fd
),
m_reactor
(
reactor
),
...
...
@@ -184,7 +184,7 @@ void castor::tape::tapeserver::daemon::AdminConnectionHandler::
const
std
::
string
unitName
(
body
.
drive
);
Drive
Catalogue
Entry
&
drive
=
m_driveCatalogue
.
findDrive
(
unitName
);
Catalogue
Drive
&
drive
=
m_driveCatalogue
.
findDrive
(
unitName
);
const
utils
::
DriveConfig
&
driveConfig
=
drive
.
getConfig
();
log
::
Param
params
[]
=
{
...
...
@@ -306,7 +306,7 @@ void castor::tape::tapeserver::daemon::AdminConnectionHandler::
for
(
std
::
list
<
std
::
string
>::
const_iterator
itor
=
unitNames
.
begin
();
itor
!=
unitNames
.
end
()
and
i
<
CA_MAXNBDRIVES
;
itor
++
)
{
const
std
::
string
&
unitName
=
*
itor
;
const
Drive
Catalogue
Entry
&
drive
=
m_driveCatalogue
.
findDrive
(
unitName
);
const
Catalogue
Drive
&
drive
=
m_driveCatalogue
.
findDrive
(
unitName
);
body
.
drives
[
i
]
=
drive
.
getTapeStatDriveEntry
();
i
++
;
}
...
...
castor/tape/tapeserver/daemon/AdminConnectionHandler.hpp
View file @
f5fa4174
...
...
@@ -22,7 +22,7 @@
#pragma once
#include
"castor/log/Logger.hpp"
#include
"castor/tape/tapeserver/daemon/
Drive
Catalogue.hpp"
#include
"castor/tape/tapeserver/daemon/Catalogue.hpp"
#include
"castor/legacymsg/MessageHeader.hpp"
#include
"castor/legacymsg/TapeConfigRequestMsgBody.hpp"
#include
"castor/legacymsg/TapeStatRequestMsgBody.hpp"
...
...
@@ -58,7 +58,7 @@ public:
const
int
fd
,
reactor
::
ZMQReactor
&
reactor
,
log
::
Logger
&
log
,
Drive
Catalogue
&
driveCatalogue
)
throw
();
Catalogue
&
driveCatalogue
)
throw
();
/**
* Returns the human-readable name this event handler.
...
...
@@ -200,7 +200,7 @@ private:
/**
* The catalogue of tape drives controlled by the tape server daemon.
*/
Drive
Catalogue
&
m_driveCatalogue
;
Catalogue
&
m_driveCatalogue
;
/**
* The timeout in seconds to be applied when performing network read and
...
...
castor/tape/tapeserver/daemon/CMakeLists.txt
View file @
f5fa4174
...
...
@@ -8,12 +8,12 @@ add_library(castorTapeServerDaemon
DiskReadTask.cpp
DiskWriteTask.cpp
DiskWriteThreadPool.cpp
Drive
Catalogue.cpp
Drive
Catalogue
Entry
.cpp
Drive
CatalogueSession.cpp
Drive
CatalogueLabelSession.cpp
Drive
CatalogueTransferSession.cpp
Drive
CatalogueCleanerSession.cpp
Catalogue.cpp
Catalogue
Drive
.cpp
CatalogueSession.cpp
CatalogueLabelSession.cpp
CatalogueTransferSession.cpp
CatalogueCleanerSession.cpp
TapeServerReporter.cpp
LabelCmdAcceptHandler.cpp
LabelCmdConnectionHandler.cpp
...
...
castor/tape/tapeserver/daemon/
Drive
Catalogue.cpp
→
castor/tape/tapeserver/daemon/Catalogue.cpp
View file @
f5fa4174
...
...
@@ -21,7 +21,7 @@
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include
"castor/tape/tapeserver/daemon/
Drive
Catalogue.hpp"
#include
"castor/tape/tapeserver/daemon/Catalogue.hpp"
#include
"castor/utils/utils.hpp"
#include
<string.h>
...
...
@@ -30,7 +30,7 @@
//-----------------------------------------------------------------------------
// constructor
//-----------------------------------------------------------------------------
castor
::
tape
::
tapeserver
::
daemon
::
Drive
Catalogue
::
Drive
Catalogue
(
castor
::
tape
::
tapeserver
::
daemon
::
Catalogue
::
Catalogue
(
const
int
netTimeout
,
log
::
Logger
&
log
,
const
DataTransferSession
::
CastorConf
&
dataTransferConfig
,
...
...
@@ -48,12 +48,12 @@ castor::tape::tapeserver::daemon::DriveCatalogue::DriveCatalogue(
//-----------------------------------------------------------------------------
// destructor
//-----------------------------------------------------------------------------
castor
::
tape
::
tapeserver
::
daemon
::
Drive
Catalogue
::~
Drive
Catalogue
()
throw
()
{
castor
::
tape
::
tapeserver
::
daemon
::
Catalogue
::~
Catalogue
()
throw
()
{
// Close any label-command connections that are still owned by the
// tape-drive catalogue
for
(
DriveMap
::
const_iterator
itor
=
m_drives
.
begin
();
itor
!=
m_drives
.
end
();
itor
++
)
{
const
Drive
Catalogue
Entry
*
drive
=
itor
->
second
;
const
Catalogue
Drive
*
drive
=
itor
->
second
;
delete
drive
;
}
...
...
@@ -62,7 +62,7 @@ castor::tape::tapeserver::daemon::DriveCatalogue::~DriveCatalogue() throw() {
//-----------------------------------------------------------------------------
// populate
//-----------------------------------------------------------------------------
void
castor
::
tape
::
tapeserver
::
daemon
::
Drive
Catalogue
::
populate
(
void
castor
::
tape
::
tapeserver
::
daemon
::
Catalogue
::
populate
(
const
utils
::
DriveConfigMap
&
driveConfigs
)
{
try
{
for
(
utils
::
DriveConfigMap
::
const_iterator
itor
=
driveConfigs
.
begin
();
...
...
@@ -91,7 +91,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::populate(
//-----------------------------------------------------------------------------
// enterDriveConfig
//-----------------------------------------------------------------------------
void
castor
::
tape
::
tapeserver
::
daemon
::
Drive
Catalogue
::
enterDriveConfig
(
void
castor
::
tape
::
tapeserver
::
daemon
::
Catalogue
::
enterDriveConfig
(
const
utils
::
DriveConfig
&
driveConfig
)
{
DriveMap
::
iterator
itor
=
m_drives
.
find
(
driveConfig
.
unitName
);
...
...
@@ -99,9 +99,9 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::enterDriveConfig(
// If the drive is not in the catalogue
if
(
m_drives
.
end
()
==
itor
)
{
// Insert it
m_drives
[
driveConfig
.
unitName
]
=
new
Drive
Catalogue
Entry
(
m_netTimeout
,
m_drives
[
driveConfig
.
unitName
]
=
new
Catalogue
Drive
(
m_netTimeout
,
m_log
,
m_processForker
,
m_vdqm
,
m_hostName
,
driveConfig
,
m_dataTransferConfig
,
Drive
Catalogue
Entry
::
DRIVE_STATE_DOWN
);
m_dataTransferConfig
,
Catalogue
Drive
::
DRIVE_STATE_DOWN
);
// Else the drive is already in the catalogue
}
else
{
castor
::
exception
::
Exception
ex
;
...
...
@@ -116,7 +116,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::enterDriveConfig(
// getUnitNames
//-----------------------------------------------------------------------------
std
::
list
<
std
::
string
>
castor
::
tape
::
tapeserver
::
daemon
::
Drive
Catalogue
::
getUnitNames
()
const
{
castor
::
tape
::
tapeserver
::
daemon
::
Catalogue
::
getUnitNames
()
const
{
std
::
list
<
std
::
string
>
unitNames
;
for
(
DriveMap
::
const_iterator
itor
=
m_drives
.
begin
();
...
...
@@ -130,8 +130,8 @@ std::list<std::string>
//-----------------------------------------------------------------------------
// findDrive
//-----------------------------------------------------------------------------
const
castor
::
tape
::
tapeserver
::
daemon
::
Drive
Catalogue
Entry
&
castor
::
tape
::
tapeserver
::
daemon
::
Drive
Catalogue
::
findDrive
(
const
castor
::
tape
::
tapeserver
::
daemon
::
Catalogue
Drive
&
castor
::
tape
::
tapeserver
::
daemon
::
Catalogue
::
findDrive
(
const
std
::
string
&
unitName
)
const
{
std
::
ostringstream
task
;
task
<<
"find tape drive in catalogue by unit name: unitName="
<<
unitName
;
...
...
@@ -151,7 +151,7 @@ const castor::tape::tapeserver::daemon::DriveCatalogueEntry
throw
ex
;
}
const
Drive
Catalogue
Entry
&
drive
=
*
(
itor
->
second
);
const
Catalogue
Drive
&
drive
=
*
(
itor
->
second
);
const
utils
::
DriveConfig
&
driveConfig
=
drive
.
getConfig
();
// Sanity check
...
...
@@ -170,8 +170,8 @@ const castor::tape::tapeserver::daemon::DriveCatalogueEntry
//-----------------------------------------------------------------------------
// findDrive
//-----------------------------------------------------------------------------
castor
::
tape
::
tapeserver
::
daemon
::
Drive
Catalogue
Entry
&
castor
::
tape
::
tapeserver
::
daemon
::
Drive
Catalogue
::
findDrive
(
castor
::
tape
::
tapeserver
::
daemon
::
Catalogue
Drive
&
castor
::
tape
::
tapeserver
::
daemon
::
Catalogue
::
findDrive
(
const
std
::
string
&
unitName
)
{
std
::
ostringstream
task
;
task
<<
"find tape drive in catalogue by unit name: unitName="
<<
unitName
;
...
...
@@ -191,7 +191,7 @@ castor::tape::tapeserver::daemon::DriveCatalogueEntry
throw
ex
;
}
Drive
Catalogue
Entry
&
drive
=
*
(
itor
->
second
);
Catalogue
Drive
&
drive
=
*
(
itor
->
second
);
const
utils
::
DriveConfig
&
driveConfig
=
drive
.
getConfig
();
// Sanity check
...
...
@@ -211,8 +211,8 @@ castor::tape::tapeserver::daemon::DriveCatalogueEntry
//-----------------------------------------------------------------------------
// findDrive
//-----------------------------------------------------------------------------
const
castor
::
tape
::
tapeserver
::
daemon
::
Drive
Catalogue
Entry
&
castor
::
tape
::
tapeserver
::
daemon
::
Drive
Catalogue
::
findDrive
(
const
castor
::
tape
::
tapeserver
::
daemon
::
Catalogue
Drive
&
castor
::
tape
::
tapeserver
::
daemon
::
Catalogue
::
findDrive
(
const
pid_t
sessionPid
)
const
{
std
::
ostringstream
task
;
task
<<
"find tape drive in catalogue by session pid: sessionPid="
<<
...
...
@@ -229,9 +229,9 @@ const castor::tape::tapeserver::daemon::DriveCatalogueEntry
throw
ex
;
}
const
Drive
Catalogue
Entry
&
drive
=
*
(
itor
->
second
);
const
Catalogue
Drive
&
drive
=
*
(
itor
->
second
);
try
{
const
Drive
CatalogueSession
&
session
=
drive
.
getSession
();
const
CatalogueSession
&
session
=
drive
.
getSession
();
if
(
sessionPid
==
session
.
getPid
())
{
return
drive
;
}
...
...
@@ -248,8 +248,8 @@ const castor::tape::tapeserver::daemon::DriveCatalogueEntry
//-----------------------------------------------------------------------------
// findDrive
//-----------------------------------------------------------------------------
castor
::
tape
::
tapeserver
::
daemon
::
Drive
Catalogue
Entry
&
castor
::
tape
::
tapeserver
::
daemon
::
Drive
Catalogue
::
findDrive
(
castor
::
tape
::
tapeserver
::
daemon
::
Catalogue
Drive
&
castor
::
tape
::
tapeserver
::
daemon
::
Catalogue
::
findDrive
(
const
pid_t
sessionPid
)
{
std
::
ostringstream
task
;
task
<<
"find tape drive in catalogue by session pid: sessionPid="
<<
...
...
@@ -266,9 +266,9 @@ castor::tape::tapeserver::daemon::DriveCatalogueEntry
throw
ex
;
}
Drive
Catalogue
Entry
&
drive
=
*
(
itor
->
second
);
Catalogue
Drive
&
drive
=
*
(
itor
->
second
);
try
{
const
Drive
CatalogueSession
&
session
=
drive
.
getSession
();
const
CatalogueSession
&
session
=
drive
.
getSession
();
if
(
sessionPid
==
session
.
getPid
())
{
return
drive
;
}
...
...
castor/tape/tapeserver/daemon/
Drive
Catalogue.hpp
→
castor/tape/tapeserver/daemon/Catalogue.hpp
View file @
f5fa4174
...
...
@@ -30,7 +30,7 @@
#include
"castor/log/Logger.hpp"
#include
"castor/tape/utils/DriveConfigMap.hpp"
#include
"castor/tape/tapeserver/client/ClientProxy.hpp"
#include
"castor/tape/tapeserver/daemon/
Drive
Catalogue
Entry
.hpp"
#include
"castor/tape/tapeserver/daemon/Catalogue
Drive
.hpp"
#include
"castor/tape/tapeserver/daemon/ProcessForkerProxy.hpp"
#include
<map>
...
...
@@ -46,7 +46,7 @@ namespace daemon {
* Class responsible for keeping track of the tape drive being controlled by
* the tapeserverd daemon.
*/
class
Drive
Catalogue
{
class
Catalogue
{
public:
/**
...
...
@@ -61,7 +61,7 @@ public:
* @param hostName The name of the host on which the daemon is running. This
* name is needed to fill in messages to be sent to the vdqmd daemon.
*/
Drive
Catalogue
(
Catalogue
(
const
int
netTimeout
,
log
::
Logger
&
log
,
const
DataTransferSession
::
CastorConf
&
dataTransferConfig
,
...
...
@@ -75,7 +75,7 @@ public:
* Closes the connection with the label command if the drive catalogue owns
* the connection at the time of destruction.
*/
~
Drive
Catalogue
()
throw
();
~
Catalogue
()
throw
();
/**
* Poplates the catalogue using the specified tape-drive configurations.
...
...
@@ -92,7 +92,7 @@ public:
*
* @param unitName The unit name of the tape drive.
*/
const
Drive
Catalogue
Entry
&
findDrive
(
const
std
::
string
&
unitName
)
const
Catalogue
Drive
&
findDrive
(
const
std
::
string
&
unitName
)
const
;
/**
...
...
@@ -103,7 +103,7 @@ public:
*
* @param sessionPid The process ID of the session.
*/
const
Drive
Catalogue
Entry
&
findDrive
(
const
pid_t
sessionPid
)
const
;
const
Catalogue
Drive
&
findDrive
(
const
pid_t
sessionPid
)
const
;
/**
* Returns a reference to the tape-drive entry corresponding to the tape
...
...
@@ -113,7 +113,7 @@ public:
*
* @param unitName The unit name of the tape drive.
*/
Drive
Catalogue
Entry
&
findDrive
(
const
std
::
string
&
unitName
);
Catalogue
Drive
&
findDrive
(
const
std
::
string
&
unitName
);
/**
* Returns a reference to the tape-drive entry associated with the
...
...
@@ -123,7 +123,7 @@ public:
*
* @param sessionPid The process ID of the session.
*/
Drive
Catalogue
Entry
&
findDrive
(
const
pid_t
sessionPid
);
Catalogue
Drive
&
findDrive
(
const
pid_t
sessionPid
);
/**
* Returns an unordered list of the unit names of all of the tape drives
...
...
@@ -170,7 +170,7 @@ private:
* Type that maps the unit name of a tape drive to the catalogue entry of
* that drive.
*/
typedef
std
::
map
<
std
::
string
,
Drive
Catalogue
Entry
*>
DriveMap
;
typedef
std
::
map
<
std
::
string
,
Catalogue
Drive
*>
DriveMap
;
/**
* Map from the unit name of a tape drive to the catalogue entry of that
...
...
@@ -185,7 +185,7 @@ private:
*/
void
enterDriveConfig
(
const
utils
::
DriveConfig
&
driveConfig
);
};
// class
Drive
Catalogue
};
// class Catalogue
}
// namespace daemon
}
// namespace tapeserver
...
...
castor/tape/tapeserver/daemon/
Drive
CatalogueCleanerSession.cpp
→
castor/tape/tapeserver/daemon/CatalogueCleanerSession.cpp
View file @
f5fa4174
...
...
@@ -22,14 +22,14 @@
*****************************************************************************/
#include
"castor/exception/Exception.hpp"
#include
"castor/tape/tapeserver/daemon/
Drive
CatalogueCleanerSession.hpp"
#include
"castor/tape/tapeserver/daemon/CatalogueCleanerSession.hpp"
#include
"h/Ctape_constants.h"
//------------------------------------------------------------------------------
// create
//------------------------------------------------------------------------------
castor
::
tape
::
tapeserver
::
daemon
::
Drive
CatalogueCleanerSession
*
castor
::
tape
::
tapeserver
::
daemon
::
Drive
CatalogueCleanerSession
::
create
(
castor
::
tape
::
tapeserver
::
daemon
::
CatalogueCleanerSession
*
castor
::
tape
::
tapeserver
::
daemon
::
CatalogueCleanerSession
::
create
(
log
::
Logger
&
log
,
const
int
netTimeout
,
const
tape
::
utils
::
DriveConfig
&
driveConfig
,
...
...
@@ -40,7 +40,7 @@ castor::tape::tapeserver::daemon::DriveCatalogueCleanerSession *
const
pid_t
pid
=
processForker
.
forkCleaner
(
driveConfig
,
vid
,
rmcPort
);
return
new
Drive
CatalogueCleanerSession
(
return
new
CatalogueCleanerSession
(
log
,
netTimeout
,
pid
,
...
...
@@ -52,15 +52,15 @@ castor::tape::tapeserver::daemon::DriveCatalogueCleanerSession *
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
castor
::
tape
::
tapeserver
::
daemon
::
Drive
CatalogueCleanerSession
::
Drive
CatalogueCleanerSession
(
castor
::
tape
::
tapeserver
::
daemon
::
CatalogueCleanerSession
::
CatalogueCleanerSession
(
log
::
Logger
&
log
,
const
int
netTimeout
,
const
pid_t
pid
,
const
tape
::
utils
::
DriveConfig
&
driveConfig
,
const
std
::
string
&
vid
,
const
time_t
assignmentTime
)
throw
()
:
Drive
CatalogueSession
(
log
,
netTimeout
,
pid
,
driveConfig
),
CatalogueSession
(
log
,
netTimeout
,
pid
,
driveConfig
),
m_vid
(
vid
),
m_assignmentTime
(
assignmentTime
)
{
}
...
...
@@ -68,21 +68,21 @@ castor::tape::tapeserver::daemon::DriveCatalogueCleanerSession::
//------------------------------------------------------------------------------
// sessionSucceeded
//------------------------------------------------------------------------------
void
castor
::
tape
::
tapeserver
::
daemon
::
Drive
CatalogueCleanerSession
::
void
castor
::
tape
::
tapeserver
::
daemon
::
CatalogueCleanerSession
::
sessionSucceeded
()
{
}
//------------------------------------------------------------------------------
// sessionFailed
//------------------------------------------------------------------------------
void
castor
::
tape
::
tapeserver
::
daemon
::
Drive
CatalogueCleanerSession
::
void
castor
::
tape
::
tapeserver
::
daemon
::
CatalogueCleanerSession
::
sessionFailed
()
{
}
//------------------------------------------------------------------------------
// getVid
//------------------------------------------------------------------------------
std
::
string
castor
::
tape
::
tapeserver
::
daemon
::
Drive
CatalogueCleanerSession
::
std
::
string
castor
::
tape
::
tapeserver
::
daemon
::
CatalogueCleanerSession
::
getVid
()
const
{
// If the volume identifier of the tape drive is not known
if
(
m_vid
.
empty
())
{
...
...
@@ -98,7 +98,7 @@ std::string castor::tape::tapeserver::daemon::DriveCatalogueCleanerSession::
//------------------------------------------------------------------------------
// getMode
//------------------------------------------------------------------------------
int
castor
::
tape
::
tapeserver
::
daemon
::
Drive
CatalogueCleanerSession
::
getMode
()
int
castor
::
tape
::
tapeserver
::
daemon
::
CatalogueCleanerSession
::
getMode
()
const
throw
()
{
return
WRITE_DISABLE
;
}
...
...
@@ -106,7 +106,7 @@ int castor::tape::tapeserver::daemon::DriveCatalogueCleanerSession::getMode()
//-----------------------------------------------------------------------------
// getPid
//-----------------------------------------------------------------------------
pid_t
castor
::
tape
::
tapeserver
::
daemon
::
Drive
CatalogueCleanerSession
::
pid_t
castor
::
tape
::
tapeserver
::
daemon
::
CatalogueCleanerSession
::
getPid
()
const
throw
()
{
return
m_pid
;
}
...
...
@@ -114,7 +114,7 @@ pid_t castor::tape::tapeserver::daemon::DriveCatalogueCleanerSession::
//------------------------------------------------------------------------------
// getAssignmentTime
//------------------------------------------------------------------------------
time_t
castor
::
tape
::
tapeserver
::
daemon
::
Drive
CatalogueCleanerSession
::
time_t
castor
::
tape
::
tapeserver
::
daemon
::
CatalogueCleanerSession
::
getAssignmentTime
()
const
throw
()
{
return
m_assignmentTime
;
}
...
...
@@ -122,7 +122,7 @@ time_t castor::tape::tapeserver::daemon::DriveCatalogueCleanerSession::
//-----------------------------------------------------------------------------
// tapeIsBeingMounted
//-----------------------------------------------------------------------------
bool
castor
::
tape
::
tapeserver
::
daemon
::
Drive
CatalogueCleanerSession
::
bool
castor
::
tape
::
tapeserver
::
daemon
::
CatalogueCleanerSession
::
tapeIsBeingMounted
()
const
throw
()
{
return
false
;
}
castor/tape/tapeserver/daemon/
Drive
CatalogueCleanerSession.hpp
→
castor/tape/tapeserver/daemon/CatalogueCleanerSession.hpp
View file @
f5fa4174
...
...
@@ -23,7 +23,7 @@
#pragma once
#include
"castor/tape/tapeserver/daemon/
Drive
CatalogueSession.hpp"
#include
"castor/tape/tapeserver/daemon/CatalogueSession.hpp"
#include
"castor/tape/tapeserver/daemon/ProcessForkerProxy.hpp"
namespace
castor
{
...
...
@@ -35,13 +35,13 @@ namespace daemon {
* Concrete class representing a cleaner session within the tape drive
* catalogue.
*/
class
Drive
CatalogueCleanerSession
:
public
Drive
CatalogueSession
{
class
CatalogueCleanerSession
:
public
CatalogueSession
{
public:
/**
* Creates a
Drive
CatalogueCleanerSession object.
* Creates a CatalogueCleanerSession object.
*
* Except in the case of unit testing, a
Drive
CatalogueCleanerSession object
* Except in the case of unit testing, a CatalogueCleanerSession object
* should only be created using the static create() method.
*
* @param log Object representing the API of the CASTOR logging system.
...
...
@@ -55,9 +55,9 @@ public:
* @param rmcPort The TCP/IP port on which the rmcd daemon is listening.
* @param assignmentTime The time at which a job was assigned to the tape
* drive.
* @return A newly created
Drive
CatalogueCleanerSession object.
* @return A newly created CatalogueCleanerSession object.
*/
static
Drive
CatalogueCleanerSession
*
create
(
static
CatalogueCleanerSession
*
create
(
log
::
Logger
&
log
,
const
int
netTimeout
,
const
tape
::
utils
::
DriveConfig
&
driveConfig
,
...
...
@@ -120,7 +120,7 @@ protected:
/**
* Protected constructor.
*
* Except in the case of unit testing a
Drive
CatalogueCleanerSession object
* Except in the case of unit testing a CatalogueCleanerSession object
* should only be created using the static create() method. This constructor
* is protected so that unit tests can go around this restriction for sole
* purpose of unit testing.
...
...
@@ -136,7 +136,7 @@ protected:
* @param assignmentTime The time at which a job was assigned to the tape
* drive.
*/
Drive
CatalogueCleanerSession
(
CatalogueCleanerSession
(
log
::
Logger
&
log
,
const
int
netTimeout
,
const
pid_t
pid
,
...
...
@@ -158,7 +158,7 @@ private:
*/
const
time_t
m_assignmentTime
;
};
// class
Drive
CatalogueCleanerSession
};
// class CatalogueCleanerSession
}
// namespace daemon
}
// namespace tapeserver
...
...
castor/tape/tapeserver/daemon/
Drive
Catalogue
Entry
.cpp
→
castor/tape/tapeserver/daemon/Catalogue
Drive
.cpp
View file @
f5fa4174
This diff is collapsed.
Click to expand it.
castor/tape/tapeserver/daemon/
Drive
Catalogue
Entry
.hpp
→
castor/tape/tapeserver/daemon/Catalogue
Drive
.hpp
View file @
f5fa4174
...
...
@@ -28,10 +28,10 @@
#include
"castor/legacymsg/TapeStatDriveEntry.hpp"
#include
"castor/legacymsg/VdqmProxy.hpp"
#include
"castor/log/Logger.hpp"
#include
"castor/tape/tapeserver/daemon/
Drive
CatalogueCleanerSession.hpp"
#include
"castor/tape/tapeserver/daemon/
Drive
CatalogueLabelSession.hpp"
#include
"castor/tape/tapeserver/daemon/
Drive
CatalogueSession.hpp"
#include
"castor/tape/tapeserver/daemon/
Drive
CatalogueTransferSession.hpp"
#include
"castor/tape/tapeserver/daemon/CatalogueCleanerSession.hpp"
#include
"castor/tape/tapeserver/daemon/CatalogueLabelSession.hpp"
#include
"castor/tape/tapeserver/daemon/CatalogueSession.hpp"
#include
"castor/tape/tapeserver/daemon/CatalogueTransferSession.hpp"
#include
"castor/tape/tapeserver/daemon/ProcessForkerProxy.hpp"
#include
"castor/tape/utils/DriveConfig.hpp"
...
...
@@ -50,7 +50,7 @@ namespace daemon {
/**
* A tape-drive entry in the tape-drive catalogue.
*/
class
Drive
Catalogue
Entry
{
class
Catalogue
Drive
{
public:
/**
...
...
@@ -173,7 +173,7 @@ public:
* @param dataTransferConfig The configuration of a data-transfer session.
* @param state The initial state of the tape drive.
*/
Drive
Catalogue
Entry
(
Catalogue
Drive
(
const
int
netTimeout
,
log
::
Logger
&
log
,
ProcessForkerProxy
&
processForker
,
...
...
@@ -186,7 +186,7 @@ public:
/**
* Destructor
*/
~
Drive
Catalogue
Entry
()
throw
();
~
Catalogue
Drive
()
throw
();
/**
* If there is a catalogue session associated with the tape drive then this
...
...
@@ -325,7 +325,7 @@ public:
* This method throws a castor::exception::Exception if there is no
* cleaner session associated with the tape drive.
*/
const
Drive
CatalogueCleanerSession
&
getCleanerSession
()
const
;
const
CatalogueCleanerSession
&
getCleanerSession
()
const
;
/**
* Returns the catalogue cleaner-session associated with the tape drive.
...
...
@@ -333,7 +333,7 @@ public:
* This method throws a castor::exception::Exception if there is no
* cleaner session associated with the tape drive.
*/
Drive
CatalogueCleanerSession
&
getCleanerSession
();
CatalogueCleanerSession
&
getCleanerSession
();
/**
* Returns the catalogue label-session associated with the tape drive.
...
...
@@ -341,7 +341,7 @@ public:
* This method throws a castor::exception::Exception if there is no
* label session associated with the tape drive.
*/
const
Drive
CatalogueLabelSession
&
getLabelSession
()
const
;
const
CatalogueLabelSession
&
getLabelSession
()
const
;
/**
* Returns the catalogue label-session associated with the tape drive.
...
...
@@ -349,7 +349,7 @@ public:
* This method throws a castor::exception::Exception if there is no
* label session associated with the tape drive.
*/
Drive
CatalogueLabelSession
&
getLabelSession
();
CatalogueLabelSession
&
getLabelSession
();
/**
* Returns the catalogue transfer-session associated with the tape drive.
...
...
@@ -357,7 +357,7 @@ public:
* This method throws a castor::exception::Exception if there is no
* transfer session associated with the tape drive.
*/
const
Drive
CatalogueTransferSession
&
getTransferSession
()
const
;
const
CatalogueTransferSession
&
getTransferSession
()
const
;
/**
* Returns the catalogue transfer-session associated with the tape drive.
...
...
@@ -365,7 +365,7 @@ public:
* This method throws a castor::exception::Exception if there is no
* transfer session associated with the tape drive.
*/
Drive
CatalogueTransferSession
&
getTransferSession
();
CatalogueTransferSession
&
getTransferSession
();
/**
* Gets the session asscoiated with the tape drive.
...
...
@@ -379,7 +379,7 @@ public: