OSB_LIB::ResourceCache Class Reference

List of all members.

Detailed Description

Application interface to cache the relationship between resources and the details of a rated party.

Definition at line 69 of file resourcecache.h.

Public Member Functions

Client interface:
Application interface:

Static Protected Member Functions

Errros common to all resource caches.

Private Member Functions

Prevent copying and assignment:

Constructor & Destructor Documentation

OSB_LIB::ResourceCache::ResourceCache ( bool  useLocks  )  [explicit]

Constructor.

Parameters:
useLocks Flag if the cache should use locks, i.e.,
if the application is multi-threaded or not.
Note:
useLocks is actually ignored, it is just a reminder for derived classes.

virtual OSB_LIB::ResourceCache::~ResourceCache (  )  [virtual]

Empty virtual destructor.

OSB_LIB::ResourceCache::ResourceCache ( const ResourceCache  )  [private]

Not implemented until needed.


Member Function Documentation

virtual void OSB_LIB::ResourceCache::finalize ( bool  doLog  )  [pure virtual]

Clean-up the resource cache.

Parameters:
doLog Flag to print log messages if applicable.
Todo:
We might think of providing an OSB_DB::Session. This would allow a concrete cache to store statistics.

virtual bool OSB_LIB::ResourceCache::getDetails ( const OSB_DB::Session session,
const DateTime ts,
RatedParty rp,
OsbError error 
) [pure virtual]

Determine the details of the rated party.

Parameters:
session Database session to use.
ts Applicable timestamp (usually from the CDR).
rp Rated party to populate:
its ResourceKey should be set when calling the function.
error Gets the error if the function returns false.
Returns:
true if the details of the rated party can be determined (see below), else false.
Determines the details of the rated party based on ts and RatedParty::resourceKey_. If the function returns successful at least the tariff system should be set.
It depends on the concrete implementation whether the contract and the id of the subscribed product are mandatory or not.

Note:
The resource key itself may be modified if grouping of resources (e.g., trunk groups via TrunkResource) is applicable.

virtual bool OSB_LIB::ResourceCache::initialize ( const OSB_DB::Session session,
const ModuleConfig config 
) [pure virtual]

Initialize the resource cache.

Parameters:
session Database session to use.
config Module configuration to use.
Returns:
true in case of success, else false.

static OsbError OSB_LIB::ResourceCache::noResourceType (  )  [static, protected]

Unknown resource type.

static OsbError OSB_LIB::ResourceCache::notSupported ( ResourceType  type  )  [static, protected]

Resource type is not supported.

ResourceCache& OSB_LIB::ResourceCache::operator= ( const ResourceCache  )  [private]

Not implemented until needed.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:16:08 2006 for OSB Library by  doxygen 1.4.7