Transformer SDK For C  6.2.11.309924
persistence.h
Go to the documentation of this file.
1 /*
2  * Transformer Persistence
3  *
4  * Copyright CAPLIN Systems Ltd 2000-2014
5  *
6  *
7  * $Author: christophs $
8  * $DateTime: 2014/01/21 15:46:13 $
9  * $Change: 282187 $
10  * $Id: //CDev/main/rtas/modules/cluster/cluster.h#5 $
11  *
12  *
13  */
14 
15 #ifndef PERSIST_H
16 #define PERSIST_H
17 
18 #include "transformer.h"
19 
20 
24 #define PERSISTENCE_SEND_CLUSTER 1
25 #define PERSISTENCE_SEND_LISTENERS 2
26 
27 
28 typedef void (*persistence_rebalance_cb)(void *context, const char *key, const char *value);
29 
30 
35 typedef void (*persistence_query_cb)(void *context, const char *key, const char *value);
36 
37 
44 typedef struct {
45  void (*key_updated)(void *ctx, const char *key, const char *value);
46  void (*key_deleted)(void *ctx, const char *key);
48 
49 
57 typedef struct {
58  int version;
59  int patch;
60  int (*replicate_should_enable)(const char *key); /*< Load balance helper */
61  void (*replicate_send_update)(ds_data_t *dsdata); /*< send update to cluster nodes */
62  void (*replicate_add_rebalance_listener)(const char *query_prefix, persistence_rebalance_cb cb, void *context);
63  int (*persist_add_key)(const char *key, const char *value, int flags);
64  int (*persist_delete_key)(const char *key, int flags);
65  char *(*persist_get)(const char *identifier);
66  void (*persist_query)( const char *query, persistence_query_cb callback, void *context);
67  void (*replicate_add_change_listener)(const char *prefix, persistence_listener_t *listener, void *ctx);
70 
71 
72 #endif /* PERSIST_H */
Persistence execution functions.
Definition: persistence.h:57
void(* persistence_query_cb)(void *context, const char *key, const char *value)
Persistence query callback type.
Definition: persistence.h:35
A data update object.
Definition: datasrc.h:2425
Persistence change listener functions.
Definition: persistence.h:44
int version
Definition: persistence.h:58
int patch
Definition: persistence.h:59

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