diff options
Diffstat (limited to 'libglusterfs/src/gfdb/gfdb_data_store.h')
-rw-r--r-- | libglusterfs/src/gfdb/gfdb_data_store.h | 48 |
1 files changed, 11 insertions, 37 deletions
diff --git a/libglusterfs/src/gfdb/gfdb_data_store.h b/libglusterfs/src/gfdb/gfdb_data_store.h index 0aac4611153..beb954c190a 100644 --- a/libglusterfs/src/gfdb/gfdb_data_store.h +++ b/libglusterfs/src/gfdb/gfdb_data_store.h @@ -20,42 +20,6 @@ #include "gfdb_data_store_types.h" -#define GFDB_IPC_CTR_KEY "gfdb.ipc-ctr-op" - -/* - * CTR IPC OPERATIONS - * - * - */ -#define GFDB_IPC_CTR_QUERY_OPS "gfdb.ipc-ctr-query-op" -#define GFDB_IPC_CTR_CLEAR_OPS "gfdb.ipc-ctr-clear-op" -#define GFDB_IPC_CTR_GET_DB_PARAM_OPS "gfdb.ipc-ctr-get-db-parm" -#define GFDB_IPC_CTR_GET_DB_VERSION_OPS "gfdb.ipc-ctr-get-db-version" -#define GFDB_IPC_CTR_SET_COMPACT_PRAGMA "gfdb.ipc-ctr-set-compact-pragma" -/* - * CTR IPC INPUT/OUTPUT - * - * - */ -#define GFDB_IPC_CTR_GET_QFILE_PATH "gfdb.ipc-ctr-get-qfile-path" -#define GFDB_IPC_CTR_GET_QUERY_PARAMS "gfdb.ipc-ctr-get-query-parms" -#define GFDB_IPC_CTR_RET_QUERY_COUNT "gfdb.ipc-ctr-ret-rec-count" -#define GFDB_IPC_CTR_GET_DB_KEY "gfdb.ipc-ctr-get-params-key" -#define GFDB_IPC_CTR_RET_DB_VERSION "gfdb.ipc-ctr-ret-db-version" - -/* - * gfdb ipc ctr params for query - * - * - */ -typedef struct gfdb_ipc_ctr_params { - gf_boolean_t is_promote; - int write_freq_threshold; - int read_freq_threshold; - gfdb_time_t time_stamp; -} gfdb_ipc_ctr_params_t; - - /* GFDB Connection Node: * ~~~~~~~~~~~~~~~~~~~~ * Represents the connection to the database while using libgfdb @@ -146,11 +110,20 @@ delete_record(gfdb_conn_node_t *, gfdb_db_record_t *gfdb_db_record); * for every record found * _query_cbk_args : Custom argument passed for the call back * function query_callback + * query_limit : 0 - umlimited, + * any positive value - adds the LIMIT clause + * to the SQL query + * * Returns : if successful return 0 or * -ve value in case of failure*/ int find_all(gfdb_conn_node_t *, gf_query_callback_t query_callback, - void *_query_cbk_args); + void *_query_cbk_args, + int query_limit); +typedef int (*find_all_t) (gfdb_conn_node_t *, + gf_query_callback_t query_callback, + void *_query_cbk_args, + int query_limit); @@ -368,6 +341,7 @@ typedef int (*compact_db_t)(gfdb_conn_node_t *db_conn, typedef struct gfdb_methods_s { init_db_t init_db; fini_db_t fini_db; + find_all_t find_all; find_unchanged_for_time_t find_unchanged_for_time; find_recently_changed_files_t find_recently_changed_files; find_unchanged_for_time_freq_t find_unchanged_for_time_freq; |