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

rh::Server now inherits from MultiThreadedDaemon as opposed to BaseDaemon.

parent 4382f8d7
......@@ -94,7 +94,7 @@ int main(int argc, char *argv[]) {
// Constructor
//------------------------------------------------------------------------------
castor::rh::Server::Server(castor::log::Logger &logger) :
castor::server::BaseDaemon(logger),
castor::server::MultiThreadedDaemon(logger),
m_port(-1),
m_secure(false),
m_waitIfBusy(true),
......@@ -126,13 +126,13 @@ castor::rh::Server::Server(castor::log::Logger &logger) :
// create oracle and streaming conversion service
// so that it is not deleted and recreated all the time
castor::ICnvSvc *svc =
svcs()->cnvService("DbCnvSvc", castor::SVC_DBCNV);
BaseObject::services()->cnvService("DbCnvSvc", castor::SVC_DBCNV);
if (0 == svc) {
// "Could not get Conversion Service for Database" message
castor::dlf::dlf_writep(nullCuuid, DLF_LVL_ERROR, 2);
}
castor::ICnvSvc *svc2 =
svcs()->cnvService("StreamCnvSvc", castor::SVC_STREAMCNV);
BaseObject::services()->cnvService("StreamCnvSvc", castor::SVC_STREAMCNV);
if (0 == svc2) {
// "Could not get Conversion Service for Streaming" message
castor::dlf::dlf_writep(nullCuuid, DLF_LVL_ERROR, 3);
......@@ -277,7 +277,7 @@ void castor::rh::Server::parseCommandLine(int argc, char *argv[]) throw (castor:
}
if (nbThreads != -1) {
castor::server::BaseThreadPool* p = m_threadPools['R'];
castor::server::BaseThreadPool* p = getThreadPool('R');
p->setNbThreads(nbThreads);
}
......
......@@ -26,7 +26,7 @@
#ifndef RH_SERVER_HPP
#define RH_SERVER_HPP 1
#include "castor/server/BaseDaemon.hpp"
#include "castor/server/MultiThreadedDaemon.hpp"
#include "castor/exception/Exception.hpp"
#define CSP_MSG_MAGIC 0xCA001
......@@ -52,7 +52,7 @@ namespace castor {
* arrive. The main task of this component is to store them
* for future processing, after checking authc/authz.
*/
class Server : public castor::server::BaseDaemon {
class Server : public castor::server::MultiThreadedDaemon {
public:
......
......@@ -79,6 +79,11 @@ public:
*/
void addThreadPool(BaseThreadPool *const pool) throw();
/**
* Starts all the thread pools
*/
void start() throw (castor::exception::Exception);
protected:
/**
......@@ -89,11 +94,6 @@ protected:
*/
virtual void parseCommandLine(int argc, char *argv[]);
/**
* Starts all the thread pools
*/
void start() throw (castor::exception::Exception);
/**
* Adds a dedicated UDP thread pool for getting wakeup notifications
* from other Castor daemons. Those notifications are supposed to be
......
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