Add configuration capabilities for persistent connections.

This commit is contained in:
counterpoint
2015-06-02 15:44:57 +01:00
parent 739ea82e36
commit 1a76fc141d
6 changed files with 82 additions and 33 deletions

View File

@ -335,6 +335,7 @@ int dcb_remove_callback(DCB *, DCB_REASON, int (*)(struct dcb *, DCB_REASON, vo
void *);
int dcb_isvalid(DCB *); /* Check the DCB is in the linked list */
int dcb_count_by_usage(DCB_USAGE); /* Return counts of DCBs */
int dcb_persistent_clean_count(DCB *); /* Clean persistent and return count */
bool dcb_set_state(DCB* dcb, dcb_state_t new_state, dcb_state_t* old_state);
void dcb_call_foreach (struct server* server, DCB_REASON reason);

View File

@ -97,6 +97,8 @@ typedef struct server {
bool master_err_is_logged; /*< If node failed, this indicates whether it is logged */
DCB *persistent; /**< List of unused persistent connections to the server */
SPINLOCK persistlock; /**< Lock for adjusting the persistent connections list */
long persistpoolmax; /**< Maximum size of persistent connections pool */
long persistmaxtime; /**< Maximum number of seconds connection can live */
} SERVER;
/**