~registry/scalestack/trunk

« back to all changes in this revision

Viewing changes to scalestack/database_proxy/service.h

  • Committer: Eric Day
  • Date: 2010-12-04 17:17:34 UTC
  • mfrom: (56.1.9)
  • Revision ID: git-v1:9c392b034d652023a4b28ae2976aca128bb856c2
Merged Eric's branch with style updates, config file support, and other cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#include <scalestack/database_proxy/client_service.h>
20
20
#include <scalestack/network/ip/tcp/connection_service.h>
21
21
#include <scalestack/network/ip/tcp/listener_service.h>
 
22
#include <scalestack/network/stream_service.h>
22
23
 
23
24
namespace scalestack
24
25
{
28
29
class client;
29
30
class connection;
30
31
 
31
 
class service: public network::ip::tcp::connection_service
 
32
class service: public network::stream_service
32
33
{
33
34
public:
34
35
 
35
 
  service(kernel::module& creator);
 
36
  service(kernel::module& module);
36
37
 
37
38
  ~service();
38
39
 
44
45
  /**
45
46
   * See network::stream_service::remove_stream().
46
47
   */
47
 
  void remove_stream(network::stream* old_stream);
 
48
  void remove_stream(network::stream* stream);
48
49
 
49
50
  /**
50
51
   * Get a client connection to proxy to.
51
52
   */
52
 
  client* get_client(connection* bound_connection, bool need_handshake);
 
53
  client* get_client(connection* connection, bool need_handshake);
53
54
 
54
55
  /**
55
56
   * Yield a client to other pending transactions.
56
57
   */
57
 
  void yield_client(client* bound_client);
 
58
  void yield_client(client* client);
58
59
 
59
60
  /**
60
61
   * Erase a connection from the queue.
61
62
   */
62
 
  void remove_from_queue(connection* bound_connection);
 
63
  void remove_from_queue(connection* connection);
63
64
 
64
65
private:
65
66
 
73
74
   */
74
75
  service& operator=(const service&);
75
76
 
 
77
  network::ip::tcp::connection_service _connection_service;
76
78
  network::ip::tcp::listener_service _listener_service;
77
79
  client_service _client_service;
78
80
};