#include <Service_Repository.h>
Collaboration diagram for ACE_Service_Repository:
Public Types | |
enum | { DEFAULT_SIZE = ACE_DEFAULT_SERVICE_REPOSITORY_SIZE } |
Public Methods | |
ACE_Service_Repository (void) | |
Initialize the repository. | |
ACE_Service_Repository (int size) | |
Initialize the repository. | |
int | open (int size=DEFAULT_SIZE) |
Initialize the repository. | |
~ACE_Service_Repository (void) | |
int | close (void) |
int | fini (void) |
int | insert (const ACE_Service_Type *) |
int | find (const ACE_TCHAR name[], const ACE_Service_Type **srp=0, int ignore_suspended=1) |
int | remove (const ACE_TCHAR[]) |
Remove an existing service record. | |
int | resume (const ACE_TCHAR[], const ACE_Service_Type **=0) |
Resume a service record. | |
int | suspend (const ACE_TCHAR[], const ACE_Service_Type **=0) |
Suspend a service record. | |
int | current_size (void) const |
Return the current size of the repository. | |
int | total_size (void) const |
Return the total size of the repository. | |
void | dump (void) const |
Dump the state of an object. | |
Static Public Methods | |
ACE_Service_Repository * | instance (int size=ACE_Service_Repository::DEFAULT_SIZE) |
Get pointer to a process-wide <ACE_Service_Repository>. | |
ACE_Service_Repository * | instance (ACE_Service_Repository *) |
void | close_singleton (void) |
Delete the dynamically allocated Singleton. | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
Private Methods | |
int | find_i (const ACE_TCHAR service_name[], const ACE_Service_Type **=0, int ignore_suspended=1) |
Private Attributes | |
const ACE_Service_Type ** | service_vector_ |
Contains all the configured services. | |
int | current_size_ |
Current number of services. | |
int | total_size_ |
Maximum number of services. | |
Static Private Attributes | |
ACE_Service_Repository * | svc_rep_ = 0 |
Pointer to a process-wide <ACE_Service_Repository>. | |
int | delete_svc_rep_ = 0 |
Must delete the <svc_rep_> if non-0. | |
Friends | |
class | ACE_Service_Repository_Iterator |
This class contains a vector of <ACE_Service_Types> *'s and allows an administrative entity to centrally manage and control the behavior of application services. Note that if services are removed from the middle of the repository the order won't necessarily be maintained since the <remove> method performs compaction. However, the common case is not to remove services, so typically they are deleted in the reverse order that they were added originally.
|
|
|
Initialize the repository.
|
|
Initialize the repository.
|
|
Close down the repository and free up dynamically allocated resources. |
|
Close down the repository and free up dynamically allocated resources. |
|
Delete the dynamically allocated Singleton.
|
|
Return the current size of the repository.
|
|
Dump the state of an object.
|
|
Locate an entry with <name> in the table. If <ignore_suspended> is set then only consider services marked as resumed. If the caller wants the located entry, pass back a pointer to the located entry via <srp>. If <name> is not found, -1 is returned. If <name> is found, but it is suspended and the caller wants to ignore suspended services a -2 is returned. |
|
Locates <service_name>. Must be called without locks being held... |
|
Finalize all the services by calling <fini> and deleting dynamically allocated services. |
|
Insert a new service record. Returns -1 when the service repository is full and 0 on success. |
|
Set pointer to a process-wide <ACE_Service_Repository> and return existing pointer. |
|
Get pointer to a process-wide <ACE_Service_Repository>.
|
|
Initialize the repository.
|
|
Remove an existing service record.
|
|
Resume a service record.
|
|
Suspend a service record.
|
|
Return the total size of the repository.
|
|
|
|
Declare the dynamic allocation hooks.
|
|
Current number of services.
|
|
Must delete the <svc_rep_> if non-0.
|
|
Contains all the configured services.
|
|
Pointer to a process-wide <ACE_Service_Repository>.
|
|
Maximum number of services.
|