2005/5/9

     
 

class TransactionConsumer

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::util::logging::TransactionConsumer Class Reference
[ACDK Logging classes/functions/macros]

#include <TransactionConsumer.h>

Inheritance diagram for acdk::util::logging::TransactionConsumer:

acdk::util::logging::AbstractLogConsumer acdk::lang::Object acdk::util::logging::LogConsumer acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

The TransactionConsumer wrapps the logging into a transaction.

From a begin of a logging transaction all log records will be kept in the memory. If the transaction will be commited all records of the transaction will be discarged. If the the transaction will be roll back all log records of the transaction will be written to the underlying consumer. The TransactionConsumer is usefull not to waste the log files with superflous information, but in case of an error situation give supporters full trace information about the situation.

Author:
Roger Rene Kommer


Public Member Functions

 TransactionConsumer (IN(RLogConsumer) consumer, int rollBackMinLevel)
void publish (IN(RLogRecord) rec)
 Process the LogRecord.

void begin ()
 Start new sub transaction.

void commit ()
 throws away all log records of this level

void rollback ()
 write all LogRecors into underlying consumer


Protected Attributes

RLogConsumer _consumer
RLogRecordArrayArray _queues
int _rollBackLogLevel
 if LogLevel is >- _rollBackLogLevel rollback will be called and recorded LogRecors will be written to underlying consumer


Constructor & Destructor Documentation

acdk::util::logging::TransactionConsumer::TransactionConsumer IN(RLogConsumer consumer,
int  rollBackMinLevel
[inline]
 


Member Function Documentation

void acdk::util::logging::TransactionConsumer::begin  )  [inline]
 

Start new sub transaction.

should be closed by commit

void acdk::util::logging::TransactionConsumer::commit  ) 
 

throws away all log records of this level

void acdk::util::logging::TransactionConsumer::publish IN(RLogRecord rec  )  [inline, virtual]
 

Process the LogRecord.

Implements acdk::util::logging::AbstractLogConsumer.

void acdk::util::logging::TransactionConsumer::rollback  ) 
 

write all LogRecors into underlying consumer


Member Data Documentation

RLogConsumer acdk::util::logging::TransactionConsumer::_consumer [protected]
 

RLogRecordArrayArray acdk::util::logging::TransactionConsumer::_queues [protected]
 

int acdk::util::logging::TransactionConsumer::_rollBackLogLevel [protected]
 

if LogLevel is >- _rollBackLogLevel rollback will be called and recorded LogRecors will be written to underlying consumer