#include <server.h>
Public Member Functions | |
| void | stop () |
| void | start () |
| dbServer (dbDatabase *db, char const *serverURL, int optimalNumberOfThreads=8, int connectionQueueLen=64) | |
| ~dbServer () | |
Static Public Member Functions | |
| static dbServer * | find (char const *serverURL) |
| static void | cleanup () |
Protected Member Functions | |
| void | serveClient () |
| void | acceptConnection (socket_t *sock) |
| bool | freeze (dbSession *session, int stmt_id) |
| bool | unfreeze (dbSession *session, int stmt_id) |
| bool | get_first (dbSession *session, int stmt_id) |
| bool | get_last (dbSession *session, int stmt_id) |
| bool | get_next (dbSession *session, int stmt_id) |
| bool | get_prev (dbSession *session, int stmt_id) |
| bool | seek (dbSession *session, int stmt_id, char *buf) |
| bool | skip (dbSession *session, int stmt_id, char *buf) |
| bool | fetch (dbSession *session, dbStatement *stmt, oid_t result) |
| bool | fetch (dbSession *session, dbStatement *stmt) |
| bool | remove (dbSession *session, int stmt_id) |
| bool | remove_current (dbSession *session, int stmt_id) |
| bool | update (dbSession *session, int stmt_id, char *new_data) |
| bool | insert (dbSession *session, int stmt_id, char *data, bool prepare) |
| bool | select (dbSession *session, int stmt_id, char *data, bool prepare) |
| bool | show_tables (dbSession *session) |
| bool | describe_table (dbSession *session, char const *table) |
| bool | create_table (dbSession *session, char *data, bool create) |
| bool | drop_table (dbSession *session, char *data) |
| bool | alter_index (dbSession *session, char *data) |
| char * | checkColumns (dbStatement *stmt, int n_columns, dbTableDescriptor *desc, char *data, int4 &reponse) |
| dbStatement * | findStatement (dbSession *stmt, int stmt_id) |
Static Protected Member Functions | |
| static void thread_proc | serverThread (void *arg) |
| static void thread_proc | acceptLocalThread (void *arg) |
| static void thread_proc | acceptGlobalThread (void *arg) |
Protected Attributes | |
| dbServer * | next |
| char * | URL |
| dbSession * | freeList |
| dbSession * | waitList |
| dbSession * | activeList |
| int | optimalNumberOfThreads |
| int | nActiveThreads |
| int | nIdleThreads |
| int | waitListLength |
| bool | cancelWait |
| bool | cancelAccept |
| bool | cancelSession |
| dbMutex | mutex |
| dbLocalSemaphore | go |
| dbLocalSemaphore | done |
| socket_t * | globalAcceptSock |
| socket_t * | localAcceptSock |
| dbThread | localAcceptThread |
| dbThread | globalAcceptThread |
| dbDatabase * | db |
Static Protected Attributes | |
| static dbServer * | chain |
| dbServer | ( | dbDatabase * | db, | |
| char const * | serverURL, | |||
| int | optimalNumberOfThreads = 8, |
|||
| int | connectionQueueLen = 64 | |||
| ) |
| ~dbServer | ( | ) |
| void thread_proc serverThread | ( | void * | arg | ) | [static, protected] |
| void thread_proc acceptLocalThread | ( | void * | arg | ) | [static, protected] |
| void thread_proc acceptGlobalThread | ( | void * | arg | ) | [static, protected] |
| void serveClient | ( | ) | [protected] |
| void acceptConnection | ( | socket_t * | sock | ) | [protected] |
| bool freeze | ( | dbSession * | session, | |
| int | stmt_id | |||
| ) | [protected] |
| bool unfreeze | ( | dbSession * | session, | |
| int | stmt_id | |||
| ) | [protected] |
| bool get_first | ( | dbSession * | session, | |
| int | stmt_id | |||
| ) | [protected] |
| bool get_last | ( | dbSession * | session, | |
| int | stmt_id | |||
| ) | [protected] |
| bool get_next | ( | dbSession * | session, | |
| int | stmt_id | |||
| ) | [protected] |
| bool get_prev | ( | dbSession * | session, | |
| int | stmt_id | |||
| ) | [protected] |
| bool seek | ( | dbSession * | session, | |
| int | stmt_id, | |||
| char * | buf | |||
| ) | [protected] |
| bool skip | ( | dbSession * | session, | |
| int | stmt_id, | |||
| char * | buf | |||
| ) | [protected] |
| bool fetch | ( | dbSession * | session, | |
| dbStatement * | stmt, | |||
| oid_t | result | |||
| ) | [protected] |
| bool fetch | ( | dbSession * | session, | |
| dbStatement * | stmt | |||
| ) | [inline, protected] |
| bool remove | ( | dbSession * | session, | |
| int | stmt_id | |||
| ) | [protected] |
| bool remove_current | ( | dbSession * | session, | |
| int | stmt_id | |||
| ) | [protected] |
| bool update | ( | dbSession * | session, | |
| int | stmt_id, | |||
| char * | new_data | |||
| ) | [protected] |
| bool insert | ( | dbSession * | session, | |
| int | stmt_id, | |||
| char * | data, | |||
| bool | prepare | |||
| ) | [protected] |
| bool select | ( | dbSession * | session, | |
| int | stmt_id, | |||
| char * | data, | |||
| bool | prepare | |||
| ) | [protected] |
| bool show_tables | ( | dbSession * | session | ) | [protected] |
| bool describe_table | ( | dbSession * | session, | |
| char const * | table | |||
| ) | [protected] |
| bool create_table | ( | dbSession * | session, | |
| char * | data, | |||
| bool | create | |||
| ) | [protected] |
| bool drop_table | ( | dbSession * | session, | |
| char * | data | |||
| ) | [protected] |
| bool alter_index | ( | dbSession * | session, | |
| char * | data | |||
| ) | [protected] |
| char * checkColumns | ( | dbStatement * | stmt, | |
| int | n_columns, | |||
| dbTableDescriptor * | desc, | |||
| char * | data, | |||
| int4 & | reponse | |||
| ) | [protected] |
| dbStatement * findStatement | ( | dbSession * | stmt, | |
| int | stmt_id | |||
| ) | [inline, protected] |
| dbServer * find | ( | char const * | serverURL | ) | [static] |
| void cleanup | ( | ) | [static] |
| void stop | ( | ) |
| void start | ( | ) |
char* URL [protected] |
dbSession* activeList [protected] |
int optimalNumberOfThreads [protected] |
int nActiveThreads [protected] |
int nIdleThreads [protected] |
int waitListLength [protected] |
bool cancelWait [protected] |
bool cancelAccept [protected] |
bool cancelSession [protected] |
dbLocalSemaphore go [protected] |
dbLocalSemaphore done [protected] |
socket_t* globalAcceptSock [protected] |
socket_t* localAcceptSock [protected] |
dbThread localAcceptThread [protected] |
dbThread globalAcceptThread [protected] |
dbDatabase* db [protected] |