df_BlockManager Class Reference
[IVD Data format.]

#include <df.h>

Collaboration diagram for df_BlockManager:

Collaboration graph
[legend]

List of all members.


Detailed Description

Class to handle a series of data blocks of specific size.

One writer and multiple readers are allowed.

Data is buffered in a series data blocks that form a circular list.

A list is full for the writer if the block index to use is just behind the index of the slowest reader.

A list is empty for a reader if the block index to use mathes the index of the writer.

Note that the list can be full for the writer and full for a slow reader but empty for a fast reader at the same time.

Author:
Matej Kenda, HERMES SoftLab
See also:
df_MgrWriter

df_MgrReader

df_DataBlock

df_Writer

Definition at line 130 of file df.h.


Public Member Functions

 df_BlockManager (UInt32_t a_blockSize, UInt32_t a_blockCount)
virtual ~df_BlockManager ()
UInt64_t GetBlocksWritten ()
void WaitAllReaders ()
 Used by the writer.
void SetReaderError (ivd_Exception *a_err)
void SetWriterError (ivd_Exception *a_err)
ivd_ExceptionGetReaderError () const
ivd_ExceptionGetWriterError () const

Protected Member Functions

void WaitWriterToComplete ()
void WaitReadersToComplete ()
void RegisterWriter ()
 Blocks additional RegisterReader calls.
df_DataBlockGetFree ()
void Flush ()
void SetEndOfData ()
bool EndOfDataMarked () const
UInt32_t RegisterReader ()
df_DataBlockGetFull (UInt32_t a_readerIdx)
void Release (UInt32_t a_readerIdx)
void ReaderFinished (UInt32_t a_readerIdx, bool success=true)

Private Member Functions

void IncPos (UInt32_t &a_pos)
bool IsFull () const
 Used by the writer to check if it can write to the queue.
bool IsEmpty (UInt32_t a_readIdx) const
 Used by the readers to check if they can read from the queue.
df_DataBlockGetBlockAt (UInt32_t a_pos)
void CreateBuffer (UInt32_t a_blockSize, UInt32_t a_blockCount)
 Creates memory buffer and vector of df_DataBlock for internal use.

Private Attributes

 log_CLASSID_m
 Macro to add class name member s_className.
UInt64_t m_blocksWritten
UInt32_t m_blocksClosed
UInt32_t m_numReaders
UInt32_t m_numBlocks
vector< df_DataBlock * > m_blocks
vector< UInt8_tm_blockMemory
UInt32_t m_writeStatus
UInt32_t m_readStatus
bool m_startOfData
 Did the writer start?
bool m_endOfData
 Did the writer complete?
UInt32_t m_writePos
UInt32_t m_lastReadPos
 Position of the slowest reader.
vector< UInt32_tm_readPos
 Current positions of readers.
cmn_Mutex m_updown_x
cmn_Mutex m_block_x
cmn_Condition m_closed_c
cmn_Condition m_released_c
cmn_Condition m_shutdown_c
ivd_Exceptionm_readerError_p
ivd_Exceptionm_writerError_p

Friends

class df_MgrReader
class df_MgrWriter

Constructor & Destructor Documentation

df_BlockManager::df_BlockManager ( UInt32_t  a_blockSize,
UInt32_t  a_blockCount 
)

Definition at line 187 of file df_blockmanager.cpp.

References CreateBuffer(), and log_FUNC_A_m.

00188     : m_blocksWritten(0),
00189       m_blocksClosed(0),
00190       m_numReaders(0),
00191       m_numBlocks(a_blockCount),
00192       m_startOfData(false),
00193       m_endOfData(false),
00194       m_writePos(0),
00195       m_lastReadPos(0),
00196       m_closed_c(&m_block_x),
00197       m_released_c(&m_block_x),
00198       m_shutdown_c(&m_updown_x),
00199       m_readerError_p(NULL),
00200       m_writerError_p(NULL) {
00201 
00202     log_FUNC_A_m(df_BlockManager,
00203         "a_blockSize: " << a_blockSize << " a_blockCount: " << a_blockCount );
00204 
00205     CreateBuffer(a_blockSize, a_blockCount);
00206 }

Here is the call graph for this function:

df_BlockManager::~df_BlockManager (  )  [virtual]

Definition at line 220 of file df_blockmanager.cpp.

References dbg_LOW, dbg_NORM, log_DBG_m, log_FUNC_m, m_blocks, WaitReadersToComplete(), and WaitWriterToComplete().

00220                                   {
00221     log_FUNC_m(~df_BlockManager);
00222 
00223     log_DBG_m(dbg_LOW, "Block manager going down. ");
00224 
00225     try {
00226 
00227         WaitWriterToComplete();
00228         WaitReadersToComplete();
00229 
00230         log_DBG_m(dbg_NORM,
00231             "Deleting data blocks. Number of blocks " << m_blocks.size() );
00232 
00233         for (vector<df_DataBlock*>::iterator i = m_blocks.begin(); i != m_blocks.end(); i++) {
00234             delete (*i);
00235         }
00236     }
00237     catch (ivd_Exception &ie) {
00238         log_DBG_m(dbg_LOW,
00239             "Ignoring exception in DTOR." << endl <<
00240             "Error: " << ie);
00241     }
00242 }

Here is the call graph for this function:


Member Function Documentation

UInt64_t df_BlockManager::GetBlocksWritten (  )  [inline]

Definition at line 136 of file df.h.

Referenced by blk_NetWriter::Run(), and blk_BufferWriter::Run().

00136 { return m_blocksWritten; };

Here is the caller graph for this function:

void df_BlockManager::WaitAllReaders (  ) 

Used by the writer.

This function can be used by the writer of the block manager to wait for the readers to finish and get theit status code.

Definition at line 212 of file df_blockmanager.cpp.

References df_RETHROW_IN_WRITER, GetReaderError(), log_FUNC_m, NULL, and WaitReadersToComplete().

00212                                      {
00213     log_FUNC_m(WaitAllReaders);
00214     WaitReadersToComplete();
00215     if ( GetReaderError() != NULL) {
00216         df_RETHROW_IN_WRITER;
00217     }
00218 }

Here is the call graph for this function:

void df_BlockManager::SetReaderError ( ivd_Exception a_err  )  [inline]

Definition at line 141 of file df.h.

00141 { m_readerError_p = a_err; };

void df_BlockManager::SetWriterError ( ivd_Exception a_err  )  [inline]

Definition at line 142 of file df.h.

00142 { m_writerError_p = a_err; };

ivd_Exception* df_BlockManager::GetReaderError (  )  const [inline]

Definition at line 144 of file df.h.

Referenced by Flush(), GetFree(), and WaitAllReaders().

00144 { return m_readerError_p; };

Here is the caller graph for this function:

ivd_Exception* df_BlockManager::GetWriterError (  )  const [inline]

Definition at line 145 of file df.h.

Referenced by GetFull(), and Release().

00145 { return m_writerError_p; };

Here is the caller graph for this function:

void df_BlockManager::IncPos ( UInt32_t a_pos  )  [inline, private]

Definition at line 182 of file df.h.

Referenced by Flush(), and Release().

00182                                  {
00183         a_pos = (a_pos + 1) % m_numBlocks;
00184     };

Here is the caller graph for this function:

bool df_BlockManager::IsFull (  )  const [private]

Used by the writer to check if it can write to the queue.

Definition at line 293 of file df_blockmanager.cpp.

References m_lastReadPos, m_numBlocks, and m_writePos.

Referenced by GetFree().

00293                                    {
00294     return ( ((m_writePos + 1)%m_numBlocks) == m_lastReadPos );
00295 }

Here is the caller graph for this function:

bool df_BlockManager::IsEmpty ( UInt32_t  a_readIdx  )  const [private]

Used by the readers to check if they can read from the queue.

Definition at line 297 of file df_blockmanager.cpp.

References m_writePos.

Referenced by GetFull().

00297                                                       {
00298     return (m_writePos == a_readIdx);
00299 }

Here is the caller graph for this function:

df_DataBlock * df_BlockManager::GetBlockAt ( UInt32_t  a_pos  )  [private]

Definition at line 301 of file df_blockmanager.cpp.

References ie_DF_INVSTATE, ie_INVALID_ARG, log_FUNC_m, log_MARKLINE_m, and m_blocks.

Referenced by Flush(), GetFree(), GetFull(), and Release().

00301                                                         {
00302     if (a_pos >= m_blocks.size()) {
00303         log_FUNC_m(GetBlockAt);
00304         if (m_blocks.size() > 0) {
00305             log_MARKLINE_m;
00306             throw ivd_InternalError(
00307                 ie_INVALID_ARG, "a_pos is out of range.");
00308         }
00309         else {
00310             log_MARKLINE_m;
00311             throw ivd_InternalError(
00312                 ie_DF_INVSTATE, "No data blocks defined.");
00313         }
00314     }
00315     return m_blocks[a_pos];
00316 }

Here is the caller graph for this function:

void df_BlockManager::CreateBuffer ( UInt32_t  a_blockSize,
UInt32_t  a_blockCount 
) [private]

Creates memory buffer and vector of df_DataBlock for internal use.

Definition at line 321 of file df_blockmanager.cpp.

References cmn_Num2Str(), ie_INVALID_ARG, ivd_Error, ivd_MAX_BLOCK_SIZE, ivd_MIN_BLOCK_SIZE, log_FUNC_m, m_blockMemory, and m_blocks.

Referenced by df_BlockManager().

00321                                                                               {
00322     log_FUNC_m(CreateBuffer);
00323 
00324     if (a_blockSize < ivd_MIN_BLOCK_SIZE) {
00325         throw ivd_Error(ie_INVALID_ARG,
00326             "Block size too small: " + cmn_Num2Str(a_blockSize) , true);
00327     }
00328 
00329     if (a_blockSize > ivd_MAX_BLOCK_SIZE) {
00330         throw ivd_Error(ie_INVALID_ARG,
00331             "Block size too large: " + cmn_Num2Str(a_blockSize) , true);
00332     }
00333 
00334     m_blockMemory.resize(a_blockSize * a_blockCount, 0);
00335     memset(&(m_blockMemory[0]), 0, a_blockSize * a_blockCount);
00336 
00337     m_blocks.clear();
00338 
00339     for (UInt32_t i = 0; i < a_blockCount; i++) {
00340         m_blocks.push_back(
00341             new df_DataBlock(&(m_blockMemory[0]) + (a_blockSize*i), a_blockSize) );
00342     };
00343 
00344 }

Here is the call graph for this function:

Here is the caller graph for this function:

void df_BlockManager::WaitWriterToComplete (  )  [protected]

Definition at line 244 of file df_blockmanager.cpp.

References dbg_DETAIL, dbg_NORM, cmn_Thread::GetTime(), log_DBG_m, log_FUNC_m, log_WRN_m, m_endOfData, m_numReaders, m_shutdown_c, m_startOfData, m_updown_x, and cmn_Condition::TimedWait().

Referenced by ~df_BlockManager().

00244                                            {
00245     log_FUNC_m(WaitWriterToComplete);
00246 
00247     cmn_MutexLock l(m_updown_x);
00248 
00249     if (!m_startOfData) {
00250         log_DBG_m(dbg_NORM,
00251             "Writer not yet up in Block Manager shutdown. " <<
00252             "Most probably ctor failed.");
00253         return;
00254     }
00255 
00256     if (!m_endOfData && m_numReaders > 0) {
00257         log_WRN_m("Writer up and numReaders > 0. Deadlock possible.");
00258     }
00259 
00260     while (!m_endOfData) {
00261         log_DBG_m(dbg_DETAIL,
00262             "Waiting for EOD from writer. Readers left: " << m_numReaders);
00263 
00264         m_shutdown_c.TimedWait(cmn_Thread::GetTime(1));
00265     };
00266 
00267     log_DBG_m(dbg_DETAIL,
00268         "Done waiting for writer. Readers left: " << m_numReaders);
00269 }

Here is the call graph for this function:

Here is the caller graph for this function:

void df_BlockManager::WaitReadersToComplete (  )  [protected]

Definition at line 272 of file df_blockmanager.cpp.

References dbg_DETAIL, cmn_Thread::GetTime(), log_DBG_m, log_FUNC_m, log_WRN_m, m_blocksClosed, m_endOfData, m_numReaders, m_shutdown_c, m_updown_x, and cmn_Condition::TimedWait().

Referenced by WaitAllReaders(), and ~df_BlockManager().

00272                                             {
00273     log_FUNC_m(WaitReadersToComplete);
00274 
00275     cmn_MutexLock l(m_updown_x);
00276 
00277     if (m_numReaders > 0 && !m_endOfData) {
00278         log_WRN_m("Writer up and numReaders > 0. Deadlock possible.");
00279     }
00280 
00281     while (m_numReaders > 0) {
00282         log_DBG_m(dbg_DETAIL,
00283              "Readers left: " << m_numReaders <<
00284              " blocks closed: " << m_blocksClosed);
00285 
00286         m_shutdown_c.TimedWait(cmn_Thread::GetTime(1));
00287     }
00288 
00289     log_DBG_m(dbg_DETAIL,
00290         "Done waiting. Readers left: " << m_numReaders);
00291 }

Here is the call graph for this function:

Here is the caller graph for this function:

void df_BlockManager::RegisterWriter (  )  [protected]

Blocks additional RegisterReader calls.

Definition at line 348 of file df_blockmanager.cpp.

References log_FUNC_m, m_startOfData, and m_updown_x.

Referenced by df_MgrWriter::df_MgrWriter().

00348                                      {
00349     log_FUNC_m(RegisterWriter);
00350 
00351     cmn_MutexLock l(m_updown_x);
00352     m_startOfData = true;
00353 }

Here is the caller graph for this function:

df_DataBlock * df_BlockManager::GetFree (  )  [protected]

Definition at line 355 of file df_blockmanager.cpp.

References dbg_DETAIL, dbg_LOW, df_RETHROW_IN_WRITER, GetBlockAt(), GetReaderError(), cmn_Thread::GetTime(), ie_DF_BROKEN_PIPE, ie_DF_EOD, IsFull(), ivd_Error, log_DBG_INT_m, log_DBG_m, log_ERR_m, log_FUNC_INT_m, log_FUNC_m, m_block_x, m_endOfData, m_numReaders, m_released_c, m_writePos, NULL, and cmn_Condition::TimedWait().

Referenced by df_MgrWriter::GetFree().

00355                                        {
00356     log_FUNC_INT_m(GetFree);
00357 
00358     cmn_MutexLock l(m_block_x);
00359 
00360     if ( GetReaderError() != NULL) {
00361         log_FUNC_m(GetFree);
00362         df_RETHROW_IN_WRITER;
00363     }
00364 
00365     if (m_endOfData) {
00366         log_FUNC_m(GetFree);
00367         log_ERR_m(
00368             "CHECK THIS! Writer: Requiring block after setting EOD. " <<
00369             "Most probably an internal error.");
00370         log_DBG_m(dbg_LOW, "Writer: Already end of data.");
00371         throw ivd_Error(ie_DF_EOD,  "End of data already set.");
00372     }
00373 
00374     log_DBG_INT_m(dbg_DETAIL, " Requiring FREE " << m_writePos);
00375 
00376     while ( IsFull() && m_numReaders > 0 ) {
00377         m_released_c.TimedWait(cmn_Thread::GetTime(1));
00378     }
00379 
00380     if ( GetReaderError() != NULL) {
00381         log_FUNC_m(GetFree);
00382         df_RETHROW_IN_WRITER;
00383     }
00384 
00385     if (m_numReaders < 1) {
00386         log_FUNC_m(GetFree);
00387         log_DBG_m(dbg_LOW, "Writer: No readers left.");
00388 
00389         throw ivd_Error(ie_DF_BROKEN_PIPE,
00390             "All readers down.", string("m_numReaders < 1"));
00391     }
00392 
00393     log_DBG_INT_m(dbg_DETAIL, "Got FREE " << m_writePos);
00394 
00395     return GetBlockAt(m_writePos);
00396 }

Here is the call graph for this function:

Here is the caller graph for this function:

void df_BlockManager::Flush (  )  [protected]

Definition at line 398 of file df_blockmanager.cpp.

References cmn_Condition::Broadcast(), df_DataBlock::Close(), dbg_DETAIL, df_RETHROW_IN_WRITER, GetBlockAt(), GetReaderError(), ie_DF_EOD, ie_DF_INVSTATE, IncPos(), ivd_Error, log_DBG_INT_m, log_FUNC_INT_m, log_FUNC_m, m_block_x, m_blocksClosed, m_blocksWritten, m_closed_c, m_endOfData, m_numBlocks, m_numReaders, m_writePos, and NULL.

Referenced by df_MgrWriter::Flush().

00398                             {
00399     log_FUNC_INT_m(Flush);
00400 
00401     cmn_MutexLock l(m_block_x);
00402 
00403     if ( GetReaderError() != NULL) {
00404         log_FUNC_m(Flush);
00405         df_RETHROW_IN_WRITER;
00406     }
00407 
00408     log_DBG_INT_m(dbg_DETAIL, "Flush " << m_writePos);
00409 
00410     if (m_blocksClosed >= m_numBlocks) {
00411         throw ivd_InternalError(
00412             ie_DF_INVSTATE, "Writer: All blocks already FULL on Flush.");
00413     }
00414 
00415     if (m_endOfData) {
00416         log_FUNC_m(Flush);
00417         throw ivd_Error(ie_DF_EOD, "End of data already set.", true);
00418     }
00419     df_DataBlock *curBlk = GetBlockAt(m_writePos);
00420 
00421     IncPos(m_writePos);
00422     curBlk->Close(m_numReaders);
00423 
00424     m_blocksWritten++;
00425     m_blocksClosed++;
00426     m_closed_c.Broadcast();
00427 }

Here is the call graph for this function:

Here is the caller graph for this function:

void df_BlockManager::SetEndOfData (  )  [protected]

Definition at line 429 of file df_blockmanager.cpp.

References cmn_Condition::Broadcast(), dbg_LOW, log_DBG_m, log_FUNC_m, m_block_x, m_closed_c, m_endOfData, m_shutdown_c, and m_updown_x.

Referenced by df_MgrWriter::~df_MgrWriter().

00429                                    {
00430     log_FUNC_m(SetEndOfData);
00431 
00432     cmn_MutexLock l(m_updown_x);
00433     log_DBG_m(dbg_LOW, "Writer: Setting EOD.");
00434     m_endOfData = true;
00435     {
00436         cmn_MutexLock l(m_block_x);
00437         log_DBG_m(dbg_LOW, "Writer: Waking up threads waiting for block full.");
00438         m_closed_c.Broadcast();
00439     }
00440     m_shutdown_c.Broadcast();
00441 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool df_BlockManager::EndOfDataMarked (  )  const [inline, protected]

Definition at line 210 of file df.h.

Referenced by ReaderFinished().

00210 { return m_endOfData; };

Here is the caller graph for this function:

UInt32_t df_BlockManager::RegisterReader (  )  [protected]

Returns:
reader index.

Definition at line 445 of file df_blockmanager.cpp.

References ie_DF_WRITER_UP, ivd_Error, log_FUNC_m, m_numReaders, m_readPos, m_startOfData, and m_updown_x.

Referenced by df_MgrReader::df_MgrReader().

00445                                          {
00446     log_FUNC_m(RegisterReader);
00447 
00448     cmn_MutexLock l(m_updown_x);
00449     if (m_startOfData) {
00450         // No more registration of readers allowed after writer is registered.
00451         throw ivd_Error(ie_DF_WRITER_UP, "", true);
00452     }
00453     m_numReaders++;
00454     m_readPos.push_back(0);
00455 
00456     return (m_readPos.size() - 1);
00457 }

Here is the caller graph for this function:

df_DataBlock * df_BlockManager::GetFull ( UInt32_t  a_readerIdx  )  [protected]

Definition at line 460 of file df_blockmanager.cpp.

References cmn_Num2Str(), dbg_DETAIL, dbg_LOW, df_RETHROW_IN_READER, GetBlockAt(), cmn_Thread::GetTime(), GetWriterError(), IsEmpty(), log_DBG_INT_m, log_DBG_m, log_FUNC_INT_m, log_FUNC_m, m_block_x, m_closed_c, m_endOfData, m_readPos, m_writePos, NULL, and cmn_Condition::TimedWait().

Referenced by df_MgrReader::GetFull().

00460                                                            {
00461     log_FUNC_INT_m(GetFull);
00462 
00463     cmn_MutexLock l(m_block_x);
00464 
00465     if ( GetWriterError() != NULL) {
00466         log_FUNC_m(GetFull);
00467         df_RETHROW_IN_READER;
00468     }
00469 
00470     UInt32_t blockIndex = m_readPos[a_readerIdx];
00471 
00472     log_DBG_INT_m(dbg_DETAIL, "Requiring FULL " << blockIndex);
00473 
00474     // Wait for the block to be filled.
00475     //
00476     while( IsEmpty(blockIndex) ) {
00477 
00478         if ( GetWriterError() != NULL) {
00479             log_FUNC_m(GetFull);
00480             df_RETHROW_IN_READER;
00481         }
00482 
00483         if (IsEmpty(blockIndex) && m_endOfData) {
00484             log_FUNC_m(GetFull);
00485             log_DBG_m(dbg_LOW,
00486                 "Reader: Empty buffer and EOD. (" <<
00487                 cmn_Num2Str(a_readerIdx) <<  ")." );
00488 
00489             return NULL;
00490         }
00491         m_closed_c.TimedWait(cmn_Thread::GetTime(1));
00492     }
00493 
00494     log_DBG_INT_m(dbg_DETAIL,
00495         a_readerIdx << " Got FULL " << blockIndex << " " << m_writePos);
00496 
00497     df_DataBlock *readBlock = GetBlockAt(blockIndex);
00498 
00499     return readBlock;
00500 }

Here is the call graph for this function:

Here is the caller graph for this function:

void df_BlockManager::Release ( UInt32_t  a_readerIdx  )  [protected]

Definition at line 502 of file df_blockmanager.cpp.

References cmn_Condition::Broadcast(), dbg_DETAIL, df_RETHROW_IN_READER, GetBlockAt(), GetWriterError(), ie_DF_INVSTATE, IncPos(), df_DataBlock::IsClosed(), log_DBG_INT_m, log_FUNC_INT_m, log_FUNC_m, m_block_x, m_blocksClosed, m_lastReadPos, m_readPos, m_released_c, NULL, and df_DataBlock::Release().

Referenced by df_MgrReader::Release().

00502                                                   {
00503     log_FUNC_INT_m(Release);
00504 
00505     cmn_MutexLock l(m_block_x);
00506 
00507     if ( GetWriterError() != NULL) {
00508         log_FUNC_m(Release);
00509         df_RETHROW_IN_READER;
00510     }
00511 
00512     if (m_blocksClosed < 1) {
00513         log_FUNC_m(Release);
00514         throw ivd_InternalError(
00515             ie_DF_INVSTATE, "Reader: All blocks already EMPTY on Release.");
00516     }
00517     df_DataBlock *readBlock = GetBlockAt(m_readPos[a_readerIdx]);
00518     readBlock->Release();
00519 
00520     log_DBG_INT_m(dbg_DETAIL, "Reader: Release " << m_readPos[a_readerIdx]);
00521 
00522     // Next block index for this reader
00523     UInt32_t nextBlockIndex = m_readPos[a_readerIdx];
00524     IncPos(nextBlockIndex);
00525 
00526     if (!readBlock->IsClosed()) {
00527         // Last Release() un-closes the block and can be used again.
00528         // Inform the writer that it can write again.
00529 
00530         log_DBG_INT_m(dbg_DETAIL, "Reader: Re-Open " << m_readPos[a_readerIdx]);
00531 
00532         // The next position of the slower reader (the tail of the queue).
00533         m_lastReadPos = nextBlockIndex;
00534 
00535         m_blocksClosed--;
00536         m_released_c.Broadcast();
00537     }
00538     m_readPos[a_readerIdx] = nextBlockIndex;
00539 }

Here is the call graph for this function:

Here is the caller graph for this function:

void df_BlockManager::ReaderFinished ( UInt32_t  a_readerIdx,
bool  success = true 
) [protected]

Definition at line 541 of file df_blockmanager.cpp.

References cmn_Condition::Broadcast(), dbg_LOW, EndOfDataMarked(), log_DBG_m, log_FUNC_m, m_numReaders, m_shutdown_c, and m_updown_x.

Referenced by df_MgrReader::~df_MgrReader().

00541                                                                        {
00542     log_FUNC_m(ReaderFinished);
00543 
00544     cmn_MutexLock l(m_updown_x);
00545     m_numReaders--;
00546     if (m_numReaders < 1) {
00547         if (!EndOfDataMarked()) {
00548             log_DBG_m(dbg_LOW,
00549                 "All readers finished. Writer will have to go down.");
00550         }
00551         else {
00552             log_DBG_m(dbg_LOW,
00553                 "All readers finished after end of data.");
00554         }
00555     }
00556     m_shutdown_c.Broadcast();
00557 }

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class df_MgrReader [friend]

Definition at line 220 of file df.h.

friend class df_MgrWriter [friend]

Definition at line 221 of file df.h.


Member Data Documentation

Macro to add class name member s_className.

Definition at line 145 of file df.h.

Definition at line 151 of file df.h.

Referenced by Flush().

Definition at line 152 of file df.h.

Referenced by Flush(), Release(), and WaitReadersToComplete().

Definition at line 155 of file df.h.

Referenced by Flush(), and IsFull().

Definition at line 157 of file df.h.

Referenced by CreateBuffer(), GetBlockAt(), and ~df_BlockManager().

Definition at line 158 of file df.h.

Referenced by CreateBuffer().

Definition at line 160 of file df.h.

Definition at line 161 of file df.h.

Did the writer start?

Definition at line 164 of file df.h.

Referenced by RegisterReader(), RegisterWriter(), and WaitWriterToComplete().

Did the writer complete?

Definition at line 166 of file df.h.

Referenced by Flush(), GetFree(), GetFull(), SetEndOfData(), WaitReadersToComplete(), and WaitWriterToComplete().

Definition at line 167 of file df.h.

Referenced by Flush(), GetFree(), GetFull(), IsEmpty(), and IsFull().

Position of the slowest reader.

Definition at line 169 of file df.h.

Referenced by IsFull(), and Release().

Current positions of readers.

Definition at line 171 of file df.h.

Referenced by GetFull(), RegisterReader(), and Release().

Definition at line 174 of file df.h.

Referenced by Flush(), GetFree(), GetFull(), Release(), and SetEndOfData().

Definition at line 175 of file df.h.

Referenced by Flush(), GetFull(), and SetEndOfData().

Definition at line 176 of file df.h.

Referenced by GetFree(), and Release().

Definition at line 177 of file df.h.

Referenced by ReaderFinished(), SetEndOfData(), WaitReadersToComplete(), and WaitWriterToComplete().

Definition at line 179 of file df.h.

Definition at line 180 of file df.h.


The documentation for this class was generated from the following files:

Generated on Mon Feb 27 19:11:27 2012 for OPENARCHIVE by  doxygen 1.5.6