NAME

ACE_Service_Repository - Provide the abstract base class that supplies common server repository operations.

SYNOPSIS


#include <ace/Service_Repository.h>


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

Search structure operations (all acquire locks as necessary).

int insert (const ACE_Service_Record *);
int find (
    const char[],
    const ACE_Service_Record ** = 0,
    int ignore_suspended = 1
    );
int remove (const char[]);

Liveness control

int resume (const char[], const ACE_Service_Record ** = 0);
int suspend (const char[], const ACE_Service_Record ** = 0);
int current_size (void);
int total_size (void);
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;

AUTHOR

Doug Schmidt

LIBRARY

ace