SearchSECODatabaseAPI
ConnectionHandler Class Reference

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...
 
RequestHandlergetRequestHandler ()
 

Detailed Description

Handles connections with database.

Member Function Documentation

◆ startListen()

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.

Parameters
databaseHandlerHandles the connection with the database for the main keyspace.
databaseConnectionHandles the connection with the database for the job keyspace.
raftThe raft system for the job queue.
portThe port on which we will listen.
handlerThe request handler that will be used. A new request handler will be made if the given request handler is a nullptr.

The documentation for this class was generated from the following files: