Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Consumer_Impl Class Reference
[LWLogging Service]

#include <Consumer_Impl.h>

Collaboration diagram for Consumer_Impl:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implementation of the CosLwLog::LogConsumer.

Author
knoxy
Revision
1.4
Date
2004/10/24 01:35:54

The servant implementation of CosLwLog::LogConsumer allows clients to browse and query the log


Public Member Functions

 Consumer_Impl (LogState &state, EvictionMngr &evictmngr, const std::string &consumer_id)
 ctor

virtual ~Consumer_Impl ()
virtual CORBA::ULongLong get_max_size () throw (CORBA::SystemException)
 Query the maximum size of the log.

virtual CORBA::ULongLong get_current_size () throw (CORBA::SystemException)
 Query the current size of the Log in bytes.

virtual CORBA::ULongLong get_n_records () throw (CORBA::SystemException)
 Query the current number of records in the Log.

virtual CosLwLog::LogFullAction get_log_full_action () throw (CORBA::SystemException)
 Query the LogFullAction.

virtual CosLwLog::AvailabilityStatus get_availability_status () throw (CORBA::SystemException)
 Query the AvailabilityStatus.

virtual CosLwLog::AdministrativeState get_administrative_state () throw (CORBA::SystemException)
 Query the administrative state.

virtual CosLwLog::OperationalState get_operational_state () throw (CORBA::SystemException)
 Access the maximum size of the log.

virtual CosLwLog::RecordId get_record_id_from_time (const CosLwLog::LogTime &from_time) throw (CosLwLog::InvalidParam, CORBA::SystemException)
 Obtain a Record Id recorded at a specific time.

virtual CosLwLog::LogRecordSequenceretrieve_records (CosLwLog::RecordId &recid, CORBA::ULong &how_many) throw (CosLwLog::InvalidParam, CORBA::SystemException)
 Given a RecordId, obtain a set of records.

virtual CosLwLog::LogRecordSequenceretrieve_records_by_level (CosLwLog::RecordId &current_id, CORBA::ULong &how_many, const CosLwLog::LogLevelSequence &levels) throw (CosLwLog::InvalidParam, CORBA::SystemException)
 Given a record Id, find LogRecords recorded with a LogLevel.

virtual CosLwLog::LogRecordSequenceretrieve_records_by_producer_id (CosLwLog::RecordId &current_id, CORBA::ULong &how_many, const CosLwLog::StringSeq &value_list) throw (CosLwLog::InvalidParam, CORBA::SystemException)
 Given a record Id, find LogRecords recorded by specified producers.

virtual CosLwLog::LogRecordSequenceretrieve_records_by_producer_name (CosLwLog::RecordId &current_id, CORBA::ULong &how_many, const CosLwLog::StringSeq &value_list) throw (CosLwLog::InvalidParam, CORBA::SystemException)
 Given a record Id, find LogRecords recorded by specified producer names.

virtual bool evicted ()
 Notification from the EvictionMngr that the Consumer is about to be evicted.


Constructor & Destructor Documentation

Consumer_Impl::Consumer_Impl LogState state,
EvictionMngr &  evictmngr,
const std::string &  consumer_id
 

ctor

Initializes the local reference to the LogState and a member instance of a LogBrowser. Each Consumer_Impl has its own LogBrowser

Parameters:
state - A reference to the LogState
evictmngr - The Consumer's Eviction Strategy Manager
consumer_id - This consumer's unique Id

virtual Consumer_Impl::~Consumer_Impl  )  [virtual]
 

dtor

Currently does nothing


Member Function Documentation

virtual bool Consumer_Impl::evicted  )  [virtual]
 

Notification from the EvictionMngr that the Consumer is about to be evicted.

Comply with the Evictable contract. This Evictable always answers true.

Returns:
TRUE if we can be evicted

virtual CosLwLog::AdministrativeState Consumer_Impl::get_administrative_state  )  throw (CORBA::SystemException) [virtual]
 

Query the administrative state.

Returns:
The current AdministrativeState
Exceptions:
CORBA::SystemException 

virtual CosLwLog::AvailabilityStatus Consumer_Impl::get_availability_status  )  throw (CORBA::SystemException) [virtual]
 

Query the AvailabilityStatus.

Returns:
The current AvailablityStatus
Exceptions:
CORBA::SystemException 

virtual CORBA::ULongLong Consumer_Impl::get_current_size  )  throw (CORBA::SystemException) [virtual]
 

Query the current size of the Log in bytes.

Returns:
The current size of the Log in bytes
Exceptions:
CORBA::SystemException 

virtual CosLwLog::LogFullAction Consumer_Impl::get_log_full_action  )  throw (CORBA::SystemException) [virtual]
 

Query the LogFullAction.

Returns:
The current LogFullAction
Exceptions:
CORBA::SystemException 

virtual CORBA::ULongLong Consumer_Impl::get_max_size  )  throw (CORBA::SystemException) [virtual]
 

Query the maximum size of the log.

Returns:
The maximum size of the Log in bytes
Exceptions:
CORBA::SystemException 

virtual CORBA::ULongLong Consumer_Impl::get_n_records  )  throw (CORBA::SystemException) [virtual]
 

Query the current number of records in the Log.

Returns:
The number of records currently in the Log. This number has most likely changed by the time the client gets it
Exceptions:
CORBA::SystemException 

virtual CosLwLog::OperationalState Consumer_Impl::get_operational_state  )  throw (CORBA::SystemException) [virtual]
 

Access the maximum size of the log.

Returns:
The current OperationalState
Exceptions:
CORBA::SystemException 

virtual CosLwLog::RecordId Consumer_Impl::get_record_id_from_time const CosLwLog::LogTime from_time  )  throw (CosLwLog::InvalidParam, CORBA::SystemException) [virtual]
 

Obtain a Record Id recorded at a specific time.

Using a LogTime, obtain the Record Id that was recorded at the specified time or immediately greater then the specified time. If no record exists, i.e., the time is in the future, the next available Record Id is returned. If the time is before the Log was initialized, an InvalidParam is raised.

Parameters:
from_time - The LogTime to use to find the first Record Id recorded at the time or immediately greater than the time.
Returns:
A Record Id
Exceptions:
InvalidParam if the from_time is invalid
CORBA::SystemException 

virtual CosLwLog::LogRecordSequence* Consumer_Impl::retrieve_records CosLwLog::RecordId recid,
CORBA::ULong &  how_many
throw (CosLwLog::InvalidParam, CORBA::SystemException) [virtual]
 

Given a RecordId, obtain a set of records.

Obtain at least how_many records starting with recid.

Parameters:
recid [inout] The starting record id. On the outbound, it returns the next available record id.
how_many [inout] The maximum number of records to return. On the outbound, the number of records returned.
Returns:
A sequence of LogRecords if found

The next available RecordId in recId

The number of records returned

Exceptions:
InvalidParam if any of the inbound parameters are invalid
CORBA::SystemException 

virtual CosLwLog::LogRecordSequence* Consumer_Impl::retrieve_records_by_level CosLwLog::RecordId current_id,
CORBA::ULong &  how_many,
const CosLwLog::LogLevelSequence levels
throw (CosLwLog::InvalidParam, CORBA::SystemException) [virtual]
 

Given a record Id, find LogRecords recorded with a LogLevel.

Find LogRecords starting with current_id that were recorded with a LogLevel in levels.

Parameters:
current_id - [inout] The starting record id. On the outbound, the next record id
how_many - [inout] The maximum number of records to return. On the outbound, the number of records returned
levels - The LogLevels to use as the query filter
Returns:
A sequence LogRecords fitting the constraints

The next available record id

The number of records returned

Exceptions:
InvalidParam 
CORBA::SystemException 

virtual CosLwLog::LogRecordSequence* Consumer_Impl::retrieve_records_by_producer_id CosLwLog::RecordId current_id,
CORBA::ULong &  how_many,
const CosLwLog::StringSeq value_list
throw (CosLwLog::InvalidParam, CORBA::SystemException) [virtual]
 

Given a record Id, find LogRecords recorded by specified producers.

Find LogRecords starting with current_id that were recorded by specific producer Ids

Parameters:
current_id - [inout] The starting record id. On the outbound, the next record id
how_many - [inout] The maximum number of records to return. On the outbound, the number of records returned
value_list - The Producer Ids to use in the filter
Returns:
A sequence LogRecords fitting the constraints

The next available record id

The number of records returned

Exceptions:
InvalidParam 
CORBA::SystemException 
Note:
The difference between a Producer Id and a Producer Name is granularity. The Producer Id is equivalent to the Process Name. The Producer Name is equivalent to operation names, thread names, or a request id.

virtual CosLwLog::LogRecordSequence* Consumer_Impl::retrieve_records_by_producer_name CosLwLog::RecordId current_id,
CORBA::ULong &  how_many,
const CosLwLog::StringSeq value_list
throw (CosLwLog::InvalidParam, CORBA::SystemException) [virtual]
 

Given a record Id, find LogRecords recorded by specified producer names.

Find LogRecords starting with current_id that were recorded by specific producer names

Parameters:
current_id - [inout] The starting record id. On the outbound, the next record id
how_many - [inout] The maximum number of records to return. On the outbound, the number of records returned
value_list - The Producer Names to use in the filter
Returns:
A sequence LogRecords fitting the constraints

The next available record id

The number of records returned

Exceptions:
InvalidParam 
CORBA::SystemException 
Note:
The difference between a Producer Id and a Producer Name is granularity. The Producer Id is equivalent to the Process Name. The Producer Name is equivalent to operation names, thread names, or a request id.


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