Commit 571b8986 authored by Steven Murray's avatar Steven Murray
Browse files

The StagerDaemon class now inherits from the MultiThreadedDaemon class as

opposed to the BaseDaemon class.
parent 8e04bace
......@@ -92,8 +92,6 @@ public:
*/
void addNotifierThreadPool(const int port);
protected:
/**
* Parses a command line to set the server options.
*
......@@ -102,11 +100,20 @@ protected:
*/
virtual void parseCommandLine(int argc, char *argv[]);
protected:
/**
* Shuts down the daemon gracefully.
*/
void shutdownGracefully() throw();
/**
* Sends a shutdown message to all thread pools, then
* waits for all threads to terminate before returning.
* This implements a graceful kill and is triggered by SIGTERM.
*/
virtual void waitAllThreads() throw ();
private:
/**
......@@ -125,13 +132,6 @@ private:
*/
void handleSignals();
/**
* Sends a shutdown message to all thread pools, then
* waits for all threads to terminate before returning.
* This implements a graceful kill and is triggered by SIGTERM.
*/
virtual void waitAllThreads() throw ();
/**
* Command line parameters. Includes by default a parameter
* per each thread pool to specify the number of threads.
......
......@@ -159,7 +159,7 @@ int main(int argc, char* argv[]){
/****************************************************************************************/
castor::stager::daemon::StagerDaemon::StagerDaemon(log::Logger &logger)
throw (castor::exception::Exception)
: castor::server::BaseDaemon(logger) {
: castor::server::MultiThreadedDaemon(logger) {
castor::dlf::Message stagerDlfMessages[]={
......@@ -324,6 +324,6 @@ void castor::stager::daemon::StagerDaemon::help(std::string programName)
void castor::stager::daemon::StagerDaemon::waitAllThreads() throw()
{
castor::server::BaseDaemon::waitAllThreads();
castor::server::MultiThreadedDaemon::waitAllThreads();
castor::replier::RequestReplier::getInstance()->terminate();
}
......@@ -27,7 +27,7 @@
#define STAGER_MAIN_DAEMON_HPP 1
#include "castor/server/BaseDaemon.hpp"
#include "castor/server/MultiThreadedDaemon.hpp"
#include "castor/exception/Exception.hpp"
#include "castor/IObject.hpp"
......@@ -43,7 +43,7 @@ namespace castor{
namespace daemon{
class StagerDaemon : public castor::server::BaseDaemon {
class StagerDaemon : public castor::server::MultiThreadedDaemon {
public:
......
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