ACE
6.3.3
|
Token Invariants. More...
#include <Token_Invariants.h>
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_Manager * | instance (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_Mutex > | MUTEX_COLLECTION |
COLLECTION maintains a mapping from token names to mutexes. More... | |
typedef ACE_Map_Manager< TOKEN_NAME, ACE_RWLock_Invariants *, ACE_Null_Mutex > | RWLOCK_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_Manager * | instance_ = 0 |
Singleton pointer. More... | |
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.
|
protected |
COLLECTION maintains a mapping from token names to mutexes.
|
protected |
COLLECTION maintains a mapping from token names to mutexes.
|
protected |
This may be changed to a template type.
ACE_Token_Invariant_Manager::ACE_Token_Invariant_Manager | ( | void | ) |
Prevent non-singleton construction.
|
virtual |
Destruction.
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.
|
protected |
Return or create.
|
protected |
Return or create.
|
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.
|
staticprotected |
Singleton pointer.
|
protected |
ACE_Mutex_Token used to lock internal data structures.
|
protected |
MUTEX_COLLECTION maintains a mapping from token names to mutexes.
|
protected |
MUTEX_COLLECTION maintains a mapping from token names to mutexes.