Commit c0e46b29 authored by Eric Cano's avatar Eric Cano
Browse files

Moved and renamed castor::messages::TapeServerProxy into cta::daemon::TapedProxy.

parent a416f0ea
......@@ -24,7 +24,7 @@
#pragma once
#include "castor/exception/Backtrace.hpp"
#include "tapeserver/castor/exception/Backtrace.hpp"
#include <exception>
#include <sstream>
......
......@@ -43,7 +43,7 @@ set(CtaMessageSrcs
messages.cpp
Mutex.cpp
SmartZmqContext.cpp
TapeserverProxy.cpp
../../../tapeserver/daemon/TapedProxy.cpp
TapeserverProxyZmq.cpp
ZmqMsg.cpp
ZmqSocket.cpp
......
......@@ -21,7 +21,7 @@
#pragma once
#include "castor/messages/TapeserverProxy.hpp"
#include "tapeserver/daemon/TapedProxy.hpp"
namespace castor {
namespace messages {
......@@ -29,7 +29,7 @@ namespace messages {
/**
* A dummy tapeserverd-proxy.
*/
class TapeserverProxyDummy: public TapeserverProxy {
class TapeserverProxyDummy: public cta::daemon::TapedProxy {
public:
/**
......
......@@ -24,7 +24,7 @@
#include "castor/log/Logger.hpp"
#include "castor/messages/Frame.hpp"
#include "castor/messages/Mutex.hpp"
#include "castor/messages/TapeserverProxy.hpp"
#include "tapeserver/daemon/TapedProxy.hpp"
#include "castor/messages/ZmqSocketST.hpp"
namespace castor {
......@@ -34,7 +34,7 @@ namespace messages {
* A concrete implementation of the interface to the internal network
* communications of the tapeserverd daemon.
*/
class TapeserverProxyZmq: public TapeserverProxy {
class TapeserverProxyZmq: public cta::daemon::TapedProxy {
public:
/**
......
......@@ -52,7 +52,7 @@ castor::tape::tapeserver::daemon::DataTransferSession::DataTransferSession(
System::virtualWrapper & sysWrapper,
const DriveConfig & driveConfig,
castor::mediachanger::MediaChangerFacade & mc,
castor::messages::TapeserverProxy & initialProcess,
cta::daemon::TapedProxy & initialProcess,
castor::server::ProcessCap & capUtils,
const DataTransferConfig & castorConf,
cta::Scheduler & scheduler):
......
......@@ -26,7 +26,7 @@
#include "castor/log/LogContext.hpp"
#include "castor/log/Logger.hpp"
#include "castor/mediachanger/MediaChangerFacade.hpp"
#include "castor/messages/TapeserverProxy.hpp"
#include "tapeserver/daemon/TapedProxy.hpp"
#include "castor/server/ProcessCap.hpp"
#include "castor/tape/tapeserver/daemon/DataTransferConfig.hpp"
#include "castor/tape/tapeserver/daemon/DriveConfig.hpp"
......@@ -64,7 +64,7 @@ namespace daemon {
System::virtualWrapper & sysWrapper,
const DriveConfig & driveConfig,
castor::mediachanger::MediaChangerFacade & mc,
castor::messages::TapeserverProxy & initialProcess,
cta::daemon::TapedProxy & initialProcess,
castor::server::ProcessCap &capUtils,
const DataTransferConfig & castorConf,
cta::Scheduler &scheduler);
......@@ -126,7 +126,7 @@ namespace daemon {
* by the library. It will be used exclusively by the tape thread. */
castor::mediachanger::MediaChangerFacade & m_mc;
/** Reference to the tape server's parent process to report detailed status */
castor::messages::TapeserverProxy & m_intialProcess;
cta::daemon::TapedProxy & m_intialProcess;
/** Object providing utilities for working UNIX capabilities. */
castor::server::ProcessCap &m_capUtils;
/** hostname, used to report status of the drive */
......
......@@ -91,7 +91,7 @@ namespace unitTests{
class MockMigrationWatchDog: public MigrationWatchDog {
public:
MockMigrationWatchDog(double periodToReport,double stuckPeriod,
castor::messages::TapeserverProxy& initialProcess,
cta::daemon::TapedProxy& initialProcess,
const std::string & driveUnitName,
castor::log::LogContext lc, double pollPeriod = 0.1):
MigrationWatchDog(periodToReport, stuckPeriod, initialProcess,
......
......@@ -41,7 +41,7 @@
//------------------------------------------------------------------------------
castor::tape::tapeserver::daemon::LabelSession::LabelSession(
server::ProcessCap &capUtils,
messages::TapeserverProxy &tapeserver,
cta::daemon::TapedProxy &tapeserver,
mediachanger::MediaChangerFacade &mc,
const legacymsg::TapeLabelRqstMsgBody &clientRequest,
castor::log::Logger &log,
......
......@@ -27,7 +27,7 @@
#include "castor/log/LogContext.hpp"
#include "castor/log/Logger.hpp"
#include "castor/mediachanger/MediaChangerFacade.hpp"
#include "castor/messages/TapeserverProxy.hpp"
#include "tapeserver/daemon/TapedProxy.hpp"
#include "castor/server/ProcessCap.hpp"
#include "castor/tape/tapeserver/daemon/DriveConfig.hpp"
#include "castor/tape/tapeserver/daemon/Session.hpp"
......@@ -70,7 +70,7 @@ public:
*/
LabelSession(
server::ProcessCap &capUtils,
messages::TapeserverProxy &tapeserver,
cta::daemon::TapedProxy &tapeserver,
mediachanger::MediaChangerFacade &mc,
const legacymsg::TapeLabelRqstMsgBody &clientRequest,
castor::log::Logger &log,
......@@ -99,7 +99,7 @@ private:
/**
* Proxy object representing the tapeserverd daemon.
*/
messages::TapeserverProxy &m_tapeserver;
cta::daemon::TapedProxy &m_tapeserver;
/**
* The object representing the media changer.
......
......@@ -23,7 +23,7 @@
#include "castor/log/LogContext.hpp"
#include "castor/log/Logger.hpp"
#include "castor/messages/TapeserverProxy.hpp"
#include "tapeserver/daemon/TapedProxy.hpp"
#include "castor/tape/tapeserver/daemon/TapeServerReporter.hpp"
#include "castor/tape/tapeserver/daemon/TpconfigLine.hpp"
......@@ -38,7 +38,7 @@ namespace daemon {
//constructor
//------------------------------------------------------------------------------
TapeServerReporter::TapeServerReporter(
messages::TapeserverProxy& tapeserverProxy,
cta::daemon::TapedProxy& tapeserverProxy,
const DriveConfig& driveConfig,
const std::string &hostname,
const castor::tape::tapeserver::daemon::VolumeInfo &volume,
......
......@@ -52,7 +52,7 @@ public:
* @param lc
*/
TapeServerReporter(
messages::TapeserverProxy& tapeserverProxy,
cta::daemon::TapedProxy& tapeserverProxy,
const DriveConfig &driveConfig,
const std::string &hostname,
const castor::tape::tapeserver::daemon::VolumeInfo &volume,
......@@ -145,7 +145,7 @@ private:
A bunch of references to proxies to send messages to the
* outside world when we have to
*/
messages::TapeserverProxy& m_tapeserverProxy;
cta::daemon::TapedProxy& m_tapeserverProxy;
/**
* Log context, copied because it is in a separated thread
......
......@@ -27,7 +27,7 @@
#include "castor/server/AtomicFlag.hpp"
#include "castor/server/BlockingQueue.hpp"
#include "castor/log/LogContext.hpp"
#include "castor/messages/TapeserverProxy.hpp"
#include "tapeserver/daemon/TapedProxy.hpp"
#include "castor/tape/tapeserver/daemon/ReportPackerInterface.hpp"
#include "castor/utils/Timer.hpp"
#include "castor/utils/utils.hpp"
......@@ -110,7 +110,7 @@ protected:
/*
* The proxy that will receive or heartbeat notifications
*/
messages::TapeserverProxy& m_initialProcess;
cta::daemon::TapedProxy& m_initialProcess;
/**
* The drive unit name to report
......@@ -265,7 +265,7 @@ protected:
* @param lc To log the events
*/
TaskWatchDog(double reportPeriod,double stuckPeriod,
messages::TapeserverProxy& initialProcess,
cta::daemon::TapedProxy& initialProcess,
const std::string & driveUnitName,
log::LogContext& lc, double pollPeriod = 0.1):
m_nbOfMemblocksMoved(0), m_statsSet(false), m_pollPeriod(pollPeriod),
......@@ -393,7 +393,7 @@ public:
/** Pass through constructor */
RecallWatchDog(double periodToReport,double stuckPeriod,
messages::TapeserverProxy& initialProcess,
cta::daemon::TapedProxy& initialProcess,
const std::string & driveUnitName,
log::LogContext& lc, double pollPeriod = 0.1):
TaskWatchDog(periodToReport, stuckPeriod, initialProcess, driveUnitName, lc,
......@@ -444,7 +444,7 @@ public:
/** Pass through constructor */
MigrationWatchDog(double periodToReport,double stuckPeriod,
messages::TapeserverProxy& initialProcess,
cta::daemon::TapedProxy& initialProcess,
const std::string & driveUnitName,
log::LogContext lc, double pollPeriod = 0.1):
TaskWatchDog(periodToReport, stuckPeriod, initialProcess, driveUnitName, lc,
......
......@@ -18,6 +18,7 @@ add_library(ctatapedaemon
ProcessManager.cpp
TapedConfiguration.cpp
TapeDaemon.cpp
TapedProxy.cpp
TpconfigLine.cpp
Tpconfig.cpp)
......
......@@ -52,6 +52,7 @@ namespace daemon {
* This loop allows cooperative preparation for forking, and cleanup after the
* fork. This could be as simple as a pre-fork noop and a closing of child
* communication sockets post fork (child side).
* TODO: post-fork is not yet implemented.
*/
class SubprocessHandler {
public:
......
......@@ -21,10 +21,10 @@
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include "castor/messages/TapeserverProxy.hpp"
#include "tapeserver/daemon/TapedProxy.hpp"
//-----------------------------------------------------------------------------
// destructor
//-----------------------------------------------------------------------------
castor::messages::TapeserverProxy::~TapeserverProxy() {
cta::daemon::TapedProxy::~TapedProxy() {
}
......@@ -21,27 +21,27 @@
#pragma once
#include "castor/exception/Exception.hpp"
#include "castor/log/Param.hpp"
#include "tapeserver/castor/exception/Exception.hpp"
#include "tapeserver/castor/log/Param.hpp"
#include <stdint.h>
#include <string>
#include <list>
namespace castor {
namespace messages {
namespace cta {
namespace daemon {
/**
* Abstract class defining the interface to a proxy object representing the
* internal network interface of the tapeserverd daemon.
*/
class TapeserverProxy {
class TapedProxy {
public:
/**
* Destructor.
*/
virtual ~TapeserverProxy() = 0;
virtual ~TapedProxy() = 0;
/**
* Notifies the tapeserverd daemon that the mount-session child-process got
......
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