Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
connection_pool: some declarations made private
  • Loading branch information
franku committed Jul 2, 2018
1 parent 1057946 commit 9a7a185
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions core/src/lib/connection_pool.h
Expand Up @@ -62,26 +62,20 @@ class DLL_IMP_EXP ConnectionPool : public SmartAlloc {
ConnectionPool();
~ConnectionPool();

void cleanup();
Connection *add_connection(const char* name, int protocol_version, BareosSocket* socket, bool authenticated = true);
Connection *remove(const char* name, int timeout_in_seconds = 0);
alist *get_as_alist();

private:
alist *connections_;
int WaitForNewConnection(timespec &timeout);
bool add(Connection *connection);
Connection *add_connection(const char* name, int protocol_version, BareosSocket* socket, bool authenticated = true);
bool remove(Connection *connection);
bool exists(const char *name);
void cleanup();
Connection *get_connection(const char *name);
Connection *get_connection(const char *name, int timeout_seconds);
Connection *get_connection(const char *name, timespec &timeout);
int WaitForNewConnection(timespec &timeout);
/*
* remove specific connection.
*/
bool remove(Connection *connection);
/*
* remove connection from pool to be used by some other component.
*/
Connection *remove(const char* name, int timeout_in_seconds = 0);

private:
alist *connections_;
pthread_mutex_t add_mutex_;
pthread_cond_t add_cond_var_;
};
Expand Down

0 comments on commit 9a7a185

Please sign in to comment.