~codership/galera/0.8

« back to all changes in this revision

Viewing changes to gcs/src/gcs_state_msg.h

  • Committer: Alex Yurchenko
  • Date: 2011-11-28 12:17:40 UTC
  • Revision ID: ayurchen@void-20111128121740-p9868m7nrhmnsn5f
References lp:863346, lp:897121 - synced with SVN r2565

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Copyright (C) 2008-2011 Codership Oy <info@codership.com>
3
3
 *
4
 
 * $Id: gcs_state_msg.h 2308 2011-08-15 07:33:07Z alex $
 
4
 * $Id: gcs_state_msg.h 2549 2011-11-25 12:52:29Z alex $
5
5
 */
6
6
/*
7
7
 * Interface to state messages
20
20
 
21
21
/* State flags */
22
22
#define GCS_STATE_FREP 0x01  // group representative
 
23
#define GCS_STATE_FCLA 0x02  // count last applied (for JOINED node)
23
24
 
24
25
#ifdef GCS_STATE_MSG_ACCESS
25
26
typedef struct gcs_state_msg
26
27
{
27
28
    gu_uuid_t        state_uuid;    // UUID of the current state exchange
28
29
    gu_uuid_t        group_uuid;    // UUID of the group
29
 
    gu_uuid_t        prim_uuid;     // UUID of the last PC
30
 
    long             prim_joined;   // number of joined nodes in the last PC
31
 
    gcs_seqno_t      prim_seqno;    // last primary configuration seqno
32
 
    gcs_seqno_t      act_seqno;     // last action seqno (received up to)
33
 
    gcs_node_state_t prim_state;    // state of the node in the last PC
 
30
    gu_uuid_t        prim_uuid;     // last PC state UUID
 
31
    gcs_seqno_t      prim_seqno;    // last PC state seqno
 
32
    gcs_seqno_t      received;      // last action seqno (received up to)
 
33
    long             prim_joined;   // number of joined nodes in its last PC
 
34
    gcs_node_state_t prim_state;    // state of the node in its last PC
34
35
    gcs_node_state_t current_state; // current state of the node
35
36
    const char*      name;          // human assigned node name
36
37
    const char*      inc_addr;      // incoming address string
71
72
gcs_state_msg_create (const gu_uuid_t* state_uuid,
72
73
                      const gu_uuid_t* group_uuid,
73
74
                      const gu_uuid_t* prim_uuid,
 
75
                      gcs_seqno_t      prim_seqno,
 
76
                      gcs_seqno_t      received,
74
77
                      long             prim_joined,
75
 
                      gcs_seqno_t      prim_seqno,
76
 
                      gcs_seqno_t      act_seqno,
77
78
                      gcs_node_state_t prim_state,
78
79
                      gcs_node_state_t current_state,
79
80
                      const char*      name,
110
111
//extern const gu_uuid_t*
111
112
//gcs_state_prim_uuid (const gcs_state_msg_t* state);
112
113
 
113
 
/* Get action seqno */
 
114
/* Get last received action seqno */
114
115
extern gcs_seqno_t
115
 
gcs_state_msg_act_id (const gcs_state_msg_t* state);
 
116
gcs_state_msg_received (const gcs_state_msg_t* state);
116
117
 
117
118
/* Get current node state */
118
119
extern gcs_node_state_t