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
571b8986
Commit
571b8986
authored
Jan 14, 2014
by
Steven Murray
Browse files
The StagerDaemon class now inherits from the MultiThreadedDaemon class as
opposed to the BaseDaemon class.
parent
8e04bace
Changes
3
Hide whitespace changes
Inline
Side-by-side
castor/server/MultiThreadedDaemon.hpp
View file @
571b8986
...
...
@@ -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.
...
...
castor/stager/daemon/StagerDaemon.cpp
View file @
571b8986
...
...
@@ -159,7 +159,7 @@ int main(int argc, char* argv[]){
/****************************************************************************************/
castor
::
stager
::
daemon
::
StagerDaemon
::
StagerDaemon
(
log
::
Logger
&
logger
)
throw
(
castor
::
exception
::
Exception
)
:
castor
::
server
::
Base
Daemon
(
logger
)
{
:
castor
::
server
::
MultiThreaded
Daemon
(
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
::
Base
Daemon
::
waitAllThreads
();
castor
::
server
::
MultiThreaded
Daemon
::
waitAllThreads
();
castor
::
replier
::
RequestReplier
::
getInstance
()
->
terminate
();
}
castor/stager/daemon/StagerDaemon.hpp
View file @
571b8986
...
...
@@ -27,7 +27,7 @@
#define STAGER_MAIN_DAEMON_HPP 1
#include
"castor/server/
Base
Daemon.hpp"
#include
"castor/server/
MultiThreaded
Daemon.hpp"
#include
"castor/exception/Exception.hpp"
#include
"castor/IObject.hpp"
...
...
@@ -43,7 +43,7 @@ namespace castor{
namespace
daemon
{
class
StagerDaemon
:
public
castor
::
server
::
Base
Daemon
{
class
StagerDaemon
:
public
castor
::
server
::
MultiThreaded
Daemon
{
public:
...
...
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