Commit 4b0e0c4d authored by David COME's avatar David COME
Browse files

Renamed DataFifo to DataPipeline

parent ce7ac333
......@@ -34,32 +34,32 @@ namespace tape {
namespace tapeserver {
namespace daemon {
/* A fixed payload FIFO: at creation time, we know how many blocks will go
* through the FIFO (its size). The provide block method return true as long as
* it still needs more block. False when last block is provided (and throws an
* exception after that).
/* A double fixed payload pipeline: at creation time, we know how many blocks
* will go through the FIFO (its size). The provide block method return true as
* long as it still needs more block. False when last block is provided (and
* throws an exception after that).
* Sum up
+------------------------------+ |
getFreeBlock| | provideBlock |
<----------+ <----------------+
| DataFifo |
| DataPipeline |
| |
+----------> +--------------->
pushDataBlock +------------------------------+ getDataBlock
*/
class DataFifo {
class DataPipeline {
public:
/**
* Constructor
* @param bn :how many memory block we want in the fifo (its size)
*/
DataFifo(int bn) : m_blocksNeeded(bn), m_freeBlocksProvided(0),
DataPipeline(int bn) : m_blocksNeeded(bn), m_freeBlocksProvided(0),
m_dataBlocksPushed(0), m_dataBlocksPopped(0) {};
~DataFifo() throw() {
~DataPipeline() throw() {
castor::tape::threading::MutexLocker ml(&m_freeBlockProviderProtection);
}
......
......@@ -24,7 +24,7 @@
#pragma once
#include "castor/tape/tapeserver/daemon/DataFifo.hpp"
#include "castor/tape/tapeserver/daemon/DataPipeline.hpp"
#include "castor/tape/tapeserver/daemon/DataConsumer.hpp"
#include "castor/tape/tapegateway/FileToMigrateStruct.hpp"
#include "castor/tape/tapeserver/threading/AtomicCounter.hpp"
......
......@@ -24,7 +24,7 @@
#pragma once
#include "castor/tape/tapeserver/daemon/DataFifo.hpp"
#include "castor/tape/tapeserver/daemon/DataPipeline.hpp"
#include "castor/tape/tapeserver/daemon/RecallMemoryManager.hpp"
#include "castor/tape/tapeserver/daemon/DataConsumer.hpp"
#include "castor/tape/tapeserver/file/File.hpp"
......
......@@ -24,7 +24,7 @@
#include "castor/tape/tapeserver/daemon/MigrationMemoryManager.hpp"
#include "castor/tape/tapeserver/daemon/MemBlock.hpp"
#include "castor/tape/tapeserver/daemon/DataFifo.hpp"
#include "castor/tape/tapeserver/daemon/DataPipeline.hpp"
namespace castor {
namespace tape {
......@@ -88,7 +88,7 @@ void MigrationMemoryManager::waitThreads() throw(castor::exception::Exception) {
//------------------------------------------------------------------------------
// MigrationMemoryManager::addClient
//------------------------------------------------------------------------------
void MigrationMemoryManager::addClient(DataFifo* c)
void MigrationMemoryManager::addClient(DataPipeline* c)
throw(castor::exception::Exception) {
m_clientQueue.push(c);
}
......@@ -134,7 +134,7 @@ throw(castor::exception::Exception) {
//------------------------------------------------------------------------------
void MigrationMemoryManager::run() throw(castor::exception::Exception) {
while (true) {
DataFifo* c = m_clientQueue.pop();
DataPipeline* c = m_clientQueue.pop();
// If the c is a NULL pointer, that means end of clients
if (!c) return;
// Spin on the the client. We rely on the fact that he will want
......
......@@ -39,7 +39,7 @@ namespace daemon {
// Forward declaration
class TapeWriteTask;
class MemBlock;
class DataFifo;
class DataPipeline;
/**
* The memory manager is responsible for allocating memory blocks and distributing
* the free ones around to any class in need. The distribution is actively run in
......@@ -83,7 +83,7 @@ public:
* Adds a new client in need for free memory blocks
* @param c: the new client
*/
void addClient(DataFifo* c) throw(castor::exception::Exception);
void addClient(DataPipeline* c) throw(castor::exception::Exception);
/**
* Takes back a block which has been released by one of the clients
......@@ -140,7 +140,7 @@ private:
* The client queue: we will feed them as soon as blocks
* become free. This is done in a dedicated thread.
*/
castor::tape::threading::BlockingQueue<DataFifo *> m_clientQueue;
castor::tape::threading::BlockingQueue<DataPipeline *> m_clientQueue;
/**
* Logging purpose. Given the fact the class is threaded, the LogContext
......
......@@ -25,7 +25,7 @@
#pragma once
#include "castor/tape/tapeserver/daemon/DataFifo.hpp"
#include "castor/tape/tapeserver/daemon/DataPipeline.hpp"
#include "castor/tape/tapeserver/daemon/RecallMemoryManager.hpp"
#include "castor/tape/tapeserver/daemon/DataConsumer.hpp"
#include "castor/tape/tapeserver/exception/Exception.hpp"
......
......@@ -24,7 +24,7 @@
#include "castor/tape/tapeserver/daemon/TapeWriteTask.hpp"
#include "castor/tape/tapeserver/daemon/DataFifo.hpp"
#include "castor/tape/tapeserver/daemon/DataPipeline.hpp"
#include "castor/tape/tapeserver/daemon/MigrationMemoryManager.hpp"
#include "castor/tape/tapeserver/daemon/DataConsumer.hpp"
#include "castor/tape/tapeserver/utils/suppressUnusedVariable.hpp"
......
......@@ -25,7 +25,7 @@
#pragma once
#include "castor/tape/tapeserver/daemon/DataFifo.hpp"
#include "castor/tape/tapeserver/daemon/DataPipeline.hpp"
#include "castor/tape/tapeserver/daemon/MigrationMemoryManager.hpp"
#include "castor/tape/tapeserver/daemon/DataConsumer.hpp"
#include "castor/tape/tapegateway/FileToMigrateStruct.hpp"
......@@ -117,7 +117,7 @@ private:
/**
* The fifo containing the memory blocks holding data to be written to tape
*/
DataFifo m_fifo;
DataPipeline m_fifo;
/**
* Mutex forcing serial access to the fifo
......
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