Scale Stack 0.3 Developer Documentation

scalestack::database_proxy::client_service Class Reference

#include <client_service.h>

Inheritance diagram for scalestack::database_proxy::client_service:
scalestack::network::stream_service scalestack::kernel::service

Public Member Functions

 client_service (kernel::module &module)
 ~client_service ()
network::streamadd_stream (void)
void remove_stream (network::stream *stream)
clientget_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_serviceoperator= (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

Detailed Description

Definition at line 40 of file client_service.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

network::stream * scalestack::database_proxy::client_service::add_stream ( void   )  [virtual]
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.


Field Documentation

Definition at line 85 of file client_service.h.

Definition at line 86 of file client_service.h.

Definition at line 87 of file client_service.h.

Definition at line 88 of file client_service.h.

Definition at line 89 of file client_service.h.

Definition at line 90 of file client_service.h.


The documentation for this class was generated from the following files:
Generated on Thu Feb 17 13:10:21 2011 by  doxygen 1.6.3