Skip to content
GitLab
Menu
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
4b0e0c4d
Commit
4b0e0c4d
authored
May 12, 2014
by
David COME
Browse files
Renamed DataFifo to DataPipeline
parent
ce7ac333
Changes
8
Hide whitespace changes
Inline
Side-by-side
castor/tape/tapeserver/daemon/Data
Fifo
.hpp
→
castor/tape/tapeserver/daemon/Data
Pipeline
.hpp
View file @
4b0e0c4d
...
...
@@ -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 |
<----------+ <----------------+
| Data
Fifo
|
| Data
Pipeline
|
| |
+----------> +--------------->
pushDataBlock +------------------------------+ getDataBlock
*/
class
Data
Fifo
{
class
Data
Pipeline
{
public:
/**
* Constructor
* @param bn :how many memory block we want in the fifo (its size)
*/
Data
Fifo
(
int
bn
)
:
m_blocksNeeded
(
bn
),
m_freeBlocksProvided
(
0
),
Data
Pipeline
(
int
bn
)
:
m_blocksNeeded
(
bn
),
m_freeBlocksProvided
(
0
),
m_dataBlocksPushed
(
0
),
m_dataBlocksPopped
(
0
)
{};
~
Data
Fifo
()
throw
()
{
~
Data
Pipeline
()
throw
()
{
castor
::
tape
::
threading
::
MutexLocker
ml
(
&
m_freeBlockProviderProtection
);
}
...
...
castor/tape/tapeserver/daemon/DiskReadTask.hpp
View file @
4b0e0c4d
...
...
@@ -24,7 +24,7 @@
#pragma once
#include "castor/tape/tapeserver/daemon/Data
Fifo
.hpp"
#include "castor/tape/tapeserver/daemon/Data
Pipeline
.hpp"
#include "castor/tape/tapeserver/daemon/DataConsumer.hpp"
#include "castor/tape/tapegateway/FileToMigrateStruct.hpp"
#include "castor/tape/tapeserver/threading/AtomicCounter.hpp"
...
...
castor/tape/tapeserver/daemon/DiskWriteTask.hpp
View file @
4b0e0c4d
...
...
@@ -24,7 +24,7 @@
#pragma once
#include "castor/tape/tapeserver/daemon/Data
Fifo
.hpp"
#include "castor/tape/tapeserver/daemon/Data
Pipeline
.hpp"
#include "castor/tape/tapeserver/daemon/RecallMemoryManager.hpp"
#include "castor/tape/tapeserver/daemon/DataConsumer.hpp"
#include "castor/tape/tapeserver/file/File.hpp"
...
...
castor/tape/tapeserver/daemon/MigrationMemoryManager.cpp
View file @
4b0e0c4d
...
...
@@ -24,7 +24,7 @@
#include "castor/tape/tapeserver/daemon/MigrationMemoryManager.hpp"
#include "castor/tape/tapeserver/daemon/MemBlock.hpp"
#include "castor/tape/tapeserver/daemon/Data
Fifo
.hpp"
#include "castor/tape/tapeserver/daemon/Data
Pipeline
.hpp"
namespace
castor
{
namespace
tape
{
...
...
@@ -88,7 +88,7 @@ void MigrationMemoryManager::waitThreads() throw(castor::exception::Exception) {
//------------------------------------------------------------------------------
// MigrationMemoryManager::addClient
//------------------------------------------------------------------------------
void
MigrationMemoryManager
::
addClient
(
Data
Fifo
*
c
)
void
MigrationMemoryManager
::
addClient
(
Data
Pipeline
*
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
)
{
Data
Fifo
*
c
=
m_clientQueue
.
pop
();
Data
Pipeline
*
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
...
...
castor/tape/tapeserver/daemon/MigrationMemoryManager.hpp
View file @
4b0e0c4d
...
...
@@ -39,7 +39,7 @@ namespace daemon {
// Forward declaration
class
TapeWriteTask
;
class
MemBlock
;
class
Data
Fifo
;
class
Data
Pipeline
;
/**
* 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
(
Data
Fifo
*
c
)
throw
(
castor
::
exception
::
Exception
);
void
addClient
(
Data
Pipeline
*
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
<
Data
Fifo
*>
m_clientQueue
;
castor
::
tape
::
threading
::
BlockingQueue
<
Data
Pipeline
*>
m_clientQueue
;
/**
* Logging purpose. Given the fact the class is threaded, the LogContext
...
...
castor/tape/tapeserver/daemon/TapeReadTask.hpp
View file @
4b0e0c4d
...
...
@@ -25,7 +25,7 @@
#pragma once
#include "castor/tape/tapeserver/daemon/Data
Fifo
.hpp"
#include "castor/tape/tapeserver/daemon/Data
Pipeline
.hpp"
#include "castor/tape/tapeserver/daemon/RecallMemoryManager.hpp"
#include "castor/tape/tapeserver/daemon/DataConsumer.hpp"
#include "castor/tape/tapeserver/exception/Exception.hpp"
...
...
castor/tape/tapeserver/daemon/TapeWriteTask.cpp
View file @
4b0e0c4d
...
...
@@ -24,7 +24,7 @@
#include "castor/tape/tapeserver/daemon/TapeWriteTask.hpp"
#include "castor/tape/tapeserver/daemon/Data
Fifo
.hpp"
#include "castor/tape/tapeserver/daemon/Data
Pipeline
.hpp"
#include "castor/tape/tapeserver/daemon/MigrationMemoryManager.hpp"
#include "castor/tape/tapeserver/daemon/DataConsumer.hpp"
#include "castor/tape/tapeserver/utils/suppressUnusedVariable.hpp"
...
...
castor/tape/tapeserver/daemon/TapeWriteTask.hpp
View file @
4b0e0c4d
...
...
@@ -25,7 +25,7 @@
#pragma once
#include "castor/tape/tapeserver/daemon/Data
Fifo
.hpp"
#include "castor/tape/tapeserver/daemon/Data
Pipeline
.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
*/
Data
Fifo
m_fifo
;
Data
Pipeline
m_fifo
;
/**
* Mutex forcing serial access to the fifo
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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