ACE  6.3.3
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ACE_Token_Invariant_Manager Class Reference

Token Invariants. More...

#include <Token_Invariants.h>

Inheritance diagram for ACE_Token_Invariant_Manager:
Inheritance graph
[legend]
Collaboration diagram for ACE_Token_Invariant_Manager:
Collaboration graph
[legend]

Public Member Functions

int acquired (const ACE_Token_Proxy *proxy)
 
void releasing (const ACE_Token_Proxy *proxy)
 Updates internal database. More...
 
int mutex_acquired (const ACE_TCHAR *token_name)
 
void mutex_releasing (const ACE_TCHAR *token_name)
 Updates internal database. More...
 
int reader_acquired (const ACE_TCHAR *token_name)
 
int writer_acquired (const ACE_TCHAR *token_name)
 
void rwlock_releasing (const ACE_TCHAR *token_name)
 Updates internal database. More...
 
void dump (void) const
 Dump the state of the class. More...
 
 ACE_Token_Invariant_Manager (void)
 Prevent non-singleton construction. More...
 
virtual ~ACE_Token_Invariant_Manager (void)
 Destruction. More...
 
- Public Member Functions inherited from ACE_Cleanup
 ACE_Cleanup (void)
 No-op constructor. More...
 
virtual ~ACE_Cleanup (void)
 Destructor. More...
 
virtual void cleanup (void *param=0)
 Cleanup method that, by default, simply deletes itself. More...
 

Static Public Member Functions

static ACE_Token_Invariant_Managerinstance (void)
 Singleton access point. More...
 

Protected Types

typedef ACE_Token_Name TOKEN_NAME
 This may be changed to a template type. More...
 
typedef ACE_Map_Manager< TOKEN_NAME, ACE_Mutex_Invariants *, ACE_Null_MutexMUTEX_COLLECTION
 COLLECTION maintains a mapping from token names to mutexes. More...
 
typedef ACE_Map_Manager< TOKEN_NAME, ACE_RWLock_Invariants *, ACE_Null_MutexRWLOCK_COLLECTION
 COLLECTION maintains a mapping from token names to mutexes. More...
 

Protected Member Functions

int get_mutex (const ACE_TCHAR *token_name, ACE_Mutex_Invariants *&inv)
 Return or create. More...
 
int get_rwlock (const ACE_TCHAR *token_name, ACE_RWLock_Invariants *&inv)
 Return or create. More...
 

Protected Attributes

ACE_TOKEN_CONST::MUTEX lock_
 ACE_Mutex_Token used to lock internal data structures. More...
 
MUTEX_COLLECTION mutex_collection_
 MUTEX_COLLECTION maintains a mapping from token names to mutexes. More...
 
RWLOCK_COLLECTION rwlock_collection_
 MUTEX_COLLECTION maintains a mapping from token names to mutexes. More...
 

Static Protected Attributes

static ACE_Token_Invariant_Managerinstance_ = 0
 Singleton pointer. More...
 

Detailed Description

Token Invariants.

The Token Invariant Manager allows applications to test that invariants are always satisfied. Currently, Token_Invariants can test mutexes and readers/writer locks. Does not test recursive acquisition. Note that this class does not ever clean its database. Until destroyed, it's size will forever increase.

Member Typedef Documentation

COLLECTION maintains a mapping from token names to mutexes.

COLLECTION maintains a mapping from token names to mutexes.

This may be changed to a template type.

Constructor & Destructor Documentation

ACE_Token_Invariant_Manager::ACE_Token_Invariant_Manager ( void  )

Prevent non-singleton construction.

ACE_Token_Invariant_Manager::~ACE_Token_Invariant_Manager ( void  )
virtual

Destruction.

Member Function Documentation

int ACE_Token_Invariant_Manager::acquired ( const ACE_Token_Proxy proxy)

Returns 1 on success, 0 when an invariant has been violated and -1 on error.

void ACE_Token_Invariant_Manager::dump ( void  ) const

Dump the state of the class.

int ACE_Token_Invariant_Manager::get_mutex ( const ACE_TCHAR token_name,
ACE_Mutex_Invariants *&  inv 
)
protected

Return or create.

int ACE_Token_Invariant_Manager::get_rwlock ( const ACE_TCHAR token_name,
ACE_RWLock_Invariants *&  inv 
)
protected

Return or create.

ACE_Token_Invariant_Manager * ACE_Token_Invariant_Manager::instance ( void  )
static

Singleton access point.

int ACE_Token_Invariant_Manager::mutex_acquired ( const ACE_TCHAR token_name)

Returns 1 on success, 0 when an invariant has been violated and -1 on error.

void ACE_Token_Invariant_Manager::mutex_releasing ( const ACE_TCHAR token_name)

Updates internal database.

int ACE_Token_Invariant_Manager::reader_acquired ( const ACE_TCHAR token_name)

Returns 1 on success, 0 when an invariant has been violated and -1 on error.

void ACE_Token_Invariant_Manager::releasing ( const ACE_Token_Proxy proxy)

Updates internal database.

void ACE_Token_Invariant_Manager::rwlock_releasing ( const ACE_TCHAR token_name)

Updates internal database.

int ACE_Token_Invariant_Manager::writer_acquired ( const ACE_TCHAR token_name)

Returns 1 on success, 0 when an invariant has been violated and -1 on error.

Member Data Documentation

ACE_Token_Invariant_Manager * ACE_Token_Invariant_Manager::instance_ = 0
staticprotected

Singleton pointer.

ACE_TOKEN_CONST::MUTEX ACE_Token_Invariant_Manager::lock_
protected

ACE_Mutex_Token used to lock internal data structures.

MUTEX_COLLECTION ACE_Token_Invariant_Manager::mutex_collection_
protected

MUTEX_COLLECTION maintains a mapping from token names to mutexes.

RWLOCK_COLLECTION ACE_Token_Invariant_Manager::rwlock_collection_
protected

MUTEX_COLLECTION maintains a mapping from token names to mutexes.


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