CUBRID Engine  latest
shard_metadata.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 
20 /*
21  * shard_metadata.h - shard metadata information
22  */
23 
24 #ifndef _SHARD_METADATA_H_
25 #define _SHARD_METADATA_H_
26 
27 #ident "$Id$"
28 
29 #include "config.h"
30 
31 #include "broker_config.h"
32 #include "cas_protocol.h"
33 
34 #include "shard_key.h"
35 
36 #include "broker_shm.h"
37 
39 
40 
42 
46 extern void shard_metadata_dump_internal (FILE * fp, T_SHM_PROXY * shm_proxy_p);
47 extern void shard_metadata_dump (FILE * fp, int shmid);
48 
49 extern T_SHARD_KEY *shard_metadata_bsearch_key (T_SHM_SHARD_KEY * shm_key_p, const char *keycolumn);
50 extern T_SHARD_KEY_RANGE *shard_metadata_bsearch_range (T_SHARD_KEY * key_p, unsigned int hash_res);
52  unsigned int hash_res);
55 
56 extern int load_shard_key_function (const char *library_name, const char *function_name);
57 extern void close_shard_key_function (void);
58 #endif /* _SHARD_METADATA_H_ */
T_SHARD_USER * shard_metadata_get_shard_user_from_shm(T_SHM_PROXY *shm_proxy_p)
T_SHARD_USER * shard_metadata_get_shard_user(T_SHM_SHARD_USER *shm_user_p)
T_SHM_SHARD_KEY * shard_metadata_get_key(T_SHM_PROXY *shm_proxy_p)
static T_SHM_PROXY * shm_proxy_p
Definition: broker.c:313
int shard_metadata_initialize(T_BROKER_INFO *br_info, T_SHM_PROXY *shm_proxy_p)
void close_shard_key_function(void)
int(* FN_GET_SHARD_KEY)(const char *shard_key, T_SHARD_U_TYPE type, const void *val, int val_size)
Definition: shard_key.h:93
T_SHM_SHARD_CONN * shard_metadata_get_conn(T_SHM_PROXY *shm_proxy_p)
T_SHM_SHARD_KEY * shm_key_p
Definition: shard_proxy.c:51
T_SHM_SHARD_USER * shard_metadata_get_user(T_SHM_PROXY *shm_proxy_p)
int load_shard_key_function(const char *library_name, const char *function_name)
T_SHM_SHARD_USER * shm_user_p
Definition: shard_proxy.c:50
T_SHARD_KEY_RANGE * shard_metadata_bsearch_range(T_SHARD_KEY *key_p, unsigned int hash_res)
void shard_metadata_dump_internal(FILE *fp, T_SHM_PROXY *shm_proxy_p)
T_SHARD_KEY * shard_metadata_bsearch_key(T_SHM_SHARD_KEY *shm_key_p, const char *keycolumn)
T_SHARD_KEY_RANGE * shard_metadata_find_shard_range(T_SHM_SHARD_KEY *shm_key_p, const char *key, unsigned int hash_res)
void shard_metadata_dump(FILE *fp, int shmid)
FN_GET_SHARD_KEY fn_get_shard_key