Transformer SDK For C  6.2.11.309924
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: andys $
8  * $DateTime: 2016/08/03 11:14:36 $
9  * $Change: 306914 $
10  * $Id: //CDev/V-6_2/rtas/modules/cluster/cluster.h#2 $
11  *
12  *
13  */
14 
15 #ifndef CLUSTER_H
16 #define CLUSTER_H
17 
18 #include "transformer.h"
19 
20 
21 
25 #define CLUSTER_ALL_NODES (-1)
26 
27 
28 #define CLUSTER_CONNECT_EVENT "cluster-node-connect"
29 #define CLUSTER_DISCONNECT_EVENT "cluster-node-disconnect"
30 
33 #define CLUSTER_STATE_EVENT "cluster-state"
34 
35 #define CLUSTER_PACKET_LOG_VERSION 1
36 #define CLUSTER_PACKET_LOG_HEADER "TCBLog packet v"
37 
41 typedef struct {
42  int version;
43  int patch;
51  int (*cluster_check_primary)();
52 
57  void (*cluster_send_update)(ds_data_t *dsdata);
58 
64  void (*cluster_send_update_to_node)(int node, ds_data_t *dsdata);
65 
76  void (*cluster_monitor_method)(char *template, char *key, char *property, int argc, char *argv[]);
77 
89  void (*cluster_monitor_method_to_node)(int node, char *template, char *key, char *property, int argc, char *argv[]);
90 
91 
98  void (*cluster_reset_uptime)();
99 
108  int (*cluster_is_node_up)(int node);
109 
110 
115  void (*cluster_send_nodata)(char *subject, u_short flags);
116 
122  void (*cluster_send_nodata_to_node)(int node, char *subject, u_short flags);
123 
128  int (*cluster_get_node_index)(void);
129 
130 
140  int (*cluster_should_assign_to_this_node)(char *to_assign);
141 
146  int (*cluster_get_cluster_size)();
148 
149 
150 #endif /* CLUSTER_H */
int patch
Definition: cluster.h:43
int version
Definition: cluster.h:42
A data update object.
Definition: datasrc.h:2425
Definition of the cluster interface.
Definition: cluster.h:41

Generated on Sat Aug 26 2017 12:36:31 for Transformer SDK For C