|
SearchSECODatabaseAPI
|
Handles connections with database. More...
#include <ConnectionHandler.h>
Public Member Functions | |
| void | startListen (DatabaseHandler *databaseHandler, DatabaseConnection *databaseConnection, RAFTConsensus *raft, Statistics *stats, int port=PORT, RequestHandler *handler=nullptr) |
| Starts listening for requests. Takes in a pointer to the database handler. More... | |
| RequestHandler * | getRequestHandler () |
Handles connections with database.
| void ConnectionHandler::startListen | ( | DatabaseHandler * | databaseHandler, |
| DatabaseConnection * | databaseConnection, | ||
| RAFTConsensus * | raft, | ||
| Statistics * | stats, | ||
| int | port = PORT, |
||
| RequestHandler * | handler = nullptr |
||
| ) |
Starts listening for requests. Takes in a pointer to the database handler.
| databaseHandler | Handles the connection with the database for the main keyspace. |
| databaseConnection | Handles the connection with the database for the job keyspace. |
| raft | The raft system for the job queue. |
| port | The port on which we will listen. |
| handler | The request handler that will be used. A new request handler will be made if the given request handler is a nullptr. |