Transformer SDK For C  8.0.1.209428-2690cd2c
cluster.h
Go to the documentation of this file.
1 /*
2  * Transformer Clustering
3  *
4  * Copyright CAPLIN Systems Ltd 2000-2006
5  *
6  *
7  * $Author$
8  * $DateTime$
9  * $Change$
10  * $Id$
11  *
12  *
13  */
14 
15 #ifndef CLUSTER_H
16 #define CLUSTER_H
17 
18 #include "transformer.h"
19 #include "datasrc_extra.h"
20 
21 
22 
26 #define CLUSTER_ALL_NODES (-1)
27 
28 
29 #define CLUSTER_CONNECT_EVENT "cluster-node-connect"
30 #define CLUSTER_DISCONNECT_EVENT "cluster-node-disconnect"
31 
34 #define CLUSTER_STATE_EVENT "cluster-state"
35 
36 #define CLUSTER_PACKET_LOG_VERSION 2
37 #define CLUSTER_PACKET_LOG_HEADER "TCBLog packet v"
38 
42 typedef struct {
43  int version;
44  int patch;
52  int (*cluster_check_primary)();
53 
58  void (*cluster_send_update)(ds_data_t *dsdata);
59 
65  void (*cluster_send_update_to_node)(int node, ds_data_t *dsdata);
66 
77  void (*cluster_monitor_method)(char *template, char *key, char *property, int argc, char *argv[]);
78 
90  void (*cluster_monitor_method_to_node)(int node, char *template, char *key, char *property, int argc, char *argv[]);
91 
92 
99  void (*cluster_reset_uptime)();
100 
109  int (*cluster_is_node_up)(int node);
110 
111 
116  void (*cluster_send_nodata)(char *subject, u_short flags);
117 
123  void (*cluster_send_nodata_to_node)(int node, char *subject, u_short flags);
124 
129  int (*cluster_get_node_index)(void);
130 
131 
141  int (*cluster_should_assign_to_this_node)(char *to_assign);
142 
147  int (*cluster_get_cluster_size)();
149 
150 
151 #endif /* CLUSTER_H */
int patch
Definition: cluster.h:44
int version
Definition: cluster.h:43
A data update object.
Definition: datasrc.h:2477
Definition of the cluster interface.
Definition: cluster.h:42

Generated on Wed Feb 28 2024 18:03:10 for Transformer SDK For C