summaryrefslogtreecommitdiff
path: root/server-tools/instance-manager/guardian.h
diff options
context:
space:
mode:
authorunknown <petr@mysql.com>2004-10-26 23:22:12 +0400
committerunknown <petr@mysql.com>2004-10-26 23:22:12 +0400
commit234ca309b9e1e49b6425fbf0dfd662e7d0f7b383 (patch)
tree84047e5c9807f54931f2d0793890253e8b140755 /server-tools/instance-manager/guardian.h
parenta3d9a1eb066d7cca01bef104d065864f2a7c65ec (diff)
downloadmariadb-git-234ca309b9e1e49b6425fbf0dfd662e7d0f7b383.tar.gz
Various post-review fixes
server-tools/instance-manager/buffer.cc: simplified buffer interface server-tools/instance-manager/buffer.h: simplified buffer interface server-tools/instance-manager/command.cc: Command class now uses instance_map directly server-tools/instance-manager/command.h: Made Command to use instance_map directly (not through the factory, which is not needed here in fact) server-tools/instance-manager/commands.cc: Moved mysql client/server protocol-specific functions to the commands server-tools/instance-manager/commands.h: Added a comment for Syntax_error command, fixed classes to use instance map instead of the factory server-tools/instance-manager/factory.cc: Fixed factory to give appropriate class to the commands server-tools/instance-manager/guardian.cc: Fixed guardian to delay start of new instances monitoring. Moved guardian initialization to the class from Instance map. server-tools/instance-manager/guardian.h: interface fixed server-tools/instance-manager/instance.cc: added some loging server-tools/instance-manager/instance_map.cc: All non-instance map specific functions moved from the class. Added iterator for instance_map server-tools/instance-manager/instance_map.h: All non-instance map related functions moved from the class. Added iterator for instance_map. server-tools/instance-manager/listener.cc: Added FD_CLOEXEC flag to sockets, as we don't want instances to inherit them after exec. server-tools/instance-manager/manager.cc: use guardian method moved from the instance map server-tools/instance-manager/mysql_connection.cc: cleanup server-tools/instance-manager/protocol.cc: fix according to the changes in the Buffer class
Diffstat (limited to 'server-tools/instance-manager/guardian.h')
-rw-r--r--server-tools/instance-manager/guardian.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/server-tools/instance-manager/guardian.h b/server-tools/instance-manager/guardian.h
index 5d0cdcd7c92..0ae2161f1dc 100644
--- a/server-tools/instance-manager/guardian.h
+++ b/server-tools/instance-manager/guardian.h
@@ -66,13 +66,19 @@ public:
~Guardian_thread();
void run();
int init();
- int guard(const char *instance_name, uint name_len);
- int stop_guard(const char *instance_name, uint name_len);
+ int start();
+ int guard(Instance *instance);
+ int stop_guard(Instance *instance);
+
+private:
+ int add_instance_to_list(Instance *instance, LIST **list);
+ void move_to_list(LIST **from, LIST **to);
private:
pthread_mutex_t LOCK_guardian;
Thread_info thread_info;
LIST *guarded_instances;
+ LIST *starting_instances;
MEM_ROOT alloc;
enum { MEM_ROOT_BLOCK_SIZE= 512 };
};