NAME

ACE_Service_Repository - A container for all services offered by a Service Configurator-based application. This allows an administrative entity to centrally manage and control the behavior of application services.

SYNOPSIS

#include <ace/Service_Repository.h>

class ACE_Service_Repository { public: friend class ACE_Service_Repository_Iterator; enum {DEFAULT_SIZE = 50}; ACE_Service_Repository (void); ACE_Service_Repository (int size); static ACE_Service_Repository *instance ( int size = ACE_Service_Repository::DEFAULT_SIZE ); static ACE_Service_Repository *instance ( ACE_Service_Repository * ); static void close_singleton (void); int open (int size = DEFAULT_SIZE); ~ACE_Service_Repository (void); int close (void); int insert (const ACE_Service_Type *); int find ( const ASYS_TCHAR name[], const ACE_Service_Type **srp = 0, int ignore_suspended = 1 ); int remove (const ASYS_TCHAR[]); int resume (const ASYS_TCHAR[], const ACE_Service_Type ** = 0); int suspend (const ASYS_TCHAR[], const ACE_Service_Type ** = 0); int current_size (void); int total_size (void); void dump (void) const; ACE_ALLOC_HOOK_DECLARE; private: int find_i ( const ASYS_TCHAR service_name[], const ACE_Service_Type ** = 0, int ignore_suspended = 1 ); const ACE_Service_Type **service_vector_; int current_size_; int total_size_; static ACE_Service_Repository *svc_rep_; static int delete_svc_rep_; ACE_Thread_Mutex lock_; };

DESCRIPTION

This class contains a vector of ACE_Service_Types *'s.

Search structure operations (all acquire locks as necessary).

int insert (const ACE_Service_Type *);

int find (
    const ASYS_TCHAR name[],
    const ACE_Service_Type **srp = 0,
    int ignore_suspended = 1
    );

int remove (const ASYS_TCHAR[]);

Liveness control

int resume (const ASYS_TCHAR[], const ACE_Service_Type ** = 0);

int suspend (const ASYS_TCHAR[], const ACE_Service_Type ** = 0);

int current_size (void);

int total_size (void);

void dump (void) const;

ACE_ALLOC_HOOK_DECLARE;

AUTHOR

Doug Schmidt

LIBRARY

ace