Logo Search packages:      
Sourcecode: dbbalancer version File versions

DBBalancer.hh

#include <string>
#include <iostream>
#include <vector>

using std::string;
using std::vector;

class DBPoolContainer;
class DBThreadPool;
class DBBalancerConfig;
class DBManagementMO;

class DBBalancer {

public:

  DBBalancer(DBBalancerConfig *config);
  ~DBBalancer();

  int getMajVersion() {return MAJ_VERSION ;};
  int getMinVersion() {return MIN_VERSION ;};
  int getPatchLevel() {return PATCH_LEVEL ;};
  string getStatus() {return "ALPHA";};

  void processConnection(int socket);

  DBBalancerConfig* getConfig() { return _config; };
  DBPoolContainer* getPoolContainer() { return _dbpc; };
  DBThreadPool* getThreadPool() { return _threadPool; };

  // Operation modes
  const static unsigned int READER_PROCESS = 0;
  const static unsigned int WRITER_PROCESS = 1;


private:

  // Config container instance.
  DBBalancerConfig* _config;
  // Pools container instance.
  DBPoolContainer* _dbpc;
  // The thread pool
  DBThreadPool* _threadPool;
  // The management thread
  DBManagementMO* _managementThread;

  const static int MAJ_VERSION = 0 ;
  const static int MIN_VERSION = 4 ;
  const static int PATCH_LEVEL = 4 ;

  
};

Generated by  Doxygen 1.6.0   Back to index