24#ifndef MYSQL_SERVER_REGISTRY_H
25#define MYSQL_SERVER_REGISTRY_H
112 (
const char *service_implementation_name,
128 (
const char *service_implementation_name));
140 (
const char *service_implementation_name));
162 (
const char *service_name_pattern,
185 const char **out_name));
216#define OBJECT_ITERATOR my_h_service_iterator
217#define METADATA_ITERATOR my_h_service_metadata_iterator
Locks RW-lock and releases lock on scope exit.
Definition: rwlock_scoped_lock.h:33
Definition: registry_imp.h:30
static void init()
Initializes registry for usage.
Definition: registry.cc:74
static mysql_service_status_t register_service(const char *service_implementation_name, my_h_service ptr) noexcept
Registers a new Service Implementation.
Definition: registry.cc:179
static mysql_rwlock_t LOCK_registry
Definition: registry_imp.h:31
static mysql_service_status_t iterator_get(my_h_service_iterator iterator, const char **out_name) noexcept
Gets name of Service pointed to by iterator.
Definition: registry.cc:313
static mysql_service_status_t iterator_is_valid(my_h_service_iterator iterator) noexcept
Checks if specified iterator is valid, i.e.
Definition: registry.cc:369
static mysql_service_status_t acquire(const char *service_name, my_h_service *out_service) noexcept
Finds and acquires a Service by name.
Definition: registry.cc:119
static mysql_service_status_t set_default(const char *service_implementation_name) noexcept
Sets new default Service Implementation for corresponding Service name.
Definition: registry.cc:217
static minimal_chassis::rwlock_scoped_lock lock_registry_for_write()
Locks whole registry for write.
Definition: registry.cc:102
static void deinit()
De-initializes registry.
Definition: registry.cc:84
static mysql_service_status_t acquire_related(const char *service_name, my_h_service service, my_h_service *out_service) noexcept
Finds a Service by name.
Definition: registry.cc:141
static mysql_service_status_t unregister(const char *service_implementation_name) noexcept
Removes previously registered Service Implementation from registry.
Definition: registry.cc:200
static mysql_service_status_t iterator_next(my_h_service_iterator iterator) noexcept
Advances specified iterator to next element.
Definition: registry.cc:343
static void iterator_release(my_h_service_iterator iterator) noexcept
Releases Service implementations iterator.
Definition: registry.cc:289
static mysql_service_status_t release(my_h_service service) noexcept
Releases the Service Implementation previously acquired.
Definition: registry.cc:159
static void rw_lock_deinit()
De-initializes RW lock.
Definition: registry.cc:92
static mysql_service_status_t iterator_create(const char *service_name_pattern, my_h_service_iterator *out_iterator) noexcept
Creates iterator that iterates through all registered Service Implementations.
Definition: registry.cc:245
Definition: registry_no_lock_imp.h:39
struct my_h_service_imp * my_h_service
A handle type for acquired Service.
Definition: registry.h:33
#define DEFINE_BOOL_METHOD(name, args)
A short macro to define method that returns bool, which is the most common case.
Definition: service_implementation.h:88
#define DEFINE_METHOD(retval, name, args)
A macro to ensure method implementation has required properties, that is it does not throw exceptions...
Definition: service_implementation.h:79
Definition: registry.cc:48
An instrumented rwlock structure.
Definition: mysql_rwlock_bits.h:51