#include <client_service.h>
Public Member Functions | |
| client_service (kernel::module &module) | |
| ~client_service () | |
| network::stream * | add_stream (void) |
| void | remove_stream (network::stream *stream) |
| client * | get_client (connection *connection, bool need_handshake) |
| void | yield_client (client *client) |
| void | remove_from_queue (connection *connection) |
Private Member Functions | |
| client_service (const client_service &) | |
| client_service & | operator= (const client_service &) |
Private Attributes | |
| size_t | _max_clients |
| size_t | _current_clients |
| pthread_mutex_t | _queue_mutex |
| std::vector< connection * > | _waiting_connections |
| std::vector< client * > | _free_clients |
| network::ip::tcp::connection_service | _connection_service |
Definition at line 40 of file client_service.h.
| scalestack::database_proxy::client_service::client_service | ( | kernel::module & | module | ) |
Definition at line 45 of file client_service.cc.
| scalestack::database_proxy::client_service::~client_service | ( | ) |
Definition at line 59 of file client_service.cc.
| scalestack::database_proxy::client_service::client_service | ( | const client_service & | ) | [private] |
Don't allow copying of objects.
| network::stream * scalestack::database_proxy::client_service::add_stream | ( | void | ) | [virtual] |
See network::stream_service::add_stream().
Implements scalestack::network::stream_service.
Definition at line 66 of file client_service.cc.
| void scalestack::database_proxy::client_service::remove_stream | ( | network::stream * | stream | ) |
See network::stream_service::remove_stream().
Definition at line 71 of file client_service.cc.
| client * scalestack::database_proxy::client_service::get_client | ( | connection * | connection, | |
| bool | need_handshake | |||
| ) |
Get a client connection to proxy to.
Definition at line 79 of file client_service.cc.
| void scalestack::database_proxy::client_service::yield_client | ( | client * | client | ) |
Yield a client to other pending transactions.
Definition at line 118 of file client_service.cc.
| void scalestack::database_proxy::client_service::remove_from_queue | ( | connection * | connection | ) |
Erase a connection from the queue.
Definition at line 129 of file client_service.cc.
| client_service& scalestack::database_proxy::client_service::operator= | ( | const client_service & | ) | [private] |
Don't allow assignment of objects.
size_t scalestack::database_proxy::client_service::_max_clients [private] |
Definition at line 85 of file client_service.h.
size_t scalestack::database_proxy::client_service::_current_clients [private] |
Definition at line 86 of file client_service.h.
pthread_mutex_t scalestack::database_proxy::client_service::_queue_mutex [private] |
Definition at line 87 of file client_service.h.
std::vector<connection*> scalestack::database_proxy::client_service::_waiting_connections [private] |
Definition at line 88 of file client_service.h.
std::vector<client*> scalestack::database_proxy::client_service::_free_clients [private] |
Definition at line 89 of file client_service.h.
network::ip::tcp::connection_service scalestack::database_proxy::client_service::_connection_service [private] |
Definition at line 90 of file client_service.h.
1.6.3