Commit 3d02cd63 authored by David COME's avatar David COME
Browse files

Changed the constructor of RecallTaskInjector

It now uses interfaces' types (TapeSingleThreadInterface<>, ClientInterface, and DiskThreadPoolInterface<>)instead of the types of the derived classes for its arguments
parent 71e656fd
#include "RecallTaskInjector.hpp"
#include "castor/tape/tapeserver/daemon/RecallTaskInjector.hpp"
#include "castor/tape/tapeserver/daemon/ClientInterface.hpp"
#include "castor/log/LogContext.hpp"
#include "castor/tape/tapegateway/FilesToRecallList.hpp"
#include "castor/tape/tapeserver/utils/suppressUnusedVariable.hpp"
......@@ -21,8 +22,9 @@ namespace tapeserver{
namespace daemon {
RecallTaskInjector::RecallTaskInjector(MemoryManager & mm,
TapeReadSingleThread & tapeReader,DiskWriteThreadPool & diskWriter,
ClientProxy& client,castor::log::LogContext& lc) :
TapeSingleThreadInterface<TapeReadTask> & tapeReader,
DiskThreadPoolInterface<DiskWriteTask> & diskWriter,
ClientInterface& client,castor::log::LogContext& lc) :
m_thread(*this),m_memManager(mm),
m_tapeReader(tapeReader),m_diskWriter(diskWriter),
m_client(client),m_lc(lc)
......@@ -144,6 +146,9 @@ void RecallTaskInjector::WorkerThread::run()
}
}
/*RecallTaskInjector::WorkerThread::WorkerThread(RecallTaskInjector & rji): _this(rji)
{}*/
} //end namespace daemon
} //end namespace tapeserver
} //end namespace tape
......
......@@ -35,9 +35,9 @@
#include "castor/tape/tapeserver/daemon/RecallJob.hpp"
#include "castor/tape/tapeserver/daemon/TapeWriteFileTask.hpp"
#include "castor/tape/tapeserver/daemon/ClientProxy.hpp"
#include "castor/log/LogContext.hpp"
#include "castor/tape/tapegateway/FileToRecallStruct.hpp"
#include "castor/tape/tapeserver/daemon/ClientInterface.hpp"
#include "castor/log/LogContext.hpp"
namespace castor{
namespace tape{
namespace tapeserver{
......@@ -50,8 +50,8 @@ class RecallTaskInjector: public TaskInjector {
public:
RecallTaskInjector(MemoryManager & mm,
TapeReadSingleThread & tapeReader,
DiskWriteThreadPool & diskWriter,ClientProxy& client,
TapeSingleThreadInterface<TapeReadTask> & tapeReader,
DiskThreadPoolInterface<DiskWriteTask> & diskWriter,ClientInterface& client,
castor::log::LogContext& lc);
......@@ -120,18 +120,17 @@ private:
class WorkerThread: public castor::tape::threading::Thread {
public:
WorkerThread(RecallTaskInjector & rji): _this(rji) {}
void run();
virtual void run();
private:
RecallTaskInjector & _this;
} m_thread;
MemoryManager & m_memManager;
TapeReadSingleThread & m_tapeReader;
DiskWriteThreadPool & m_diskWriter;
ClientProxy& m_client;
TapeSingleThreadInterface<TapeReadTask> & m_tapeReader;
DiskThreadPoolInterface<DiskWriteTask> & m_diskWriter;
ClientInterface& m_client;
/**
* utility member to log some pieces of information
......
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