The Storage API class - this class is responsible for the registration of all API entry points in the storage API and the dispatch of those API calls to the internals of the storage service and the storage plugin itself.
More...
|
| StorageApi (const unsigned short port, const unsigned int threads, const unsigned int workerPoolSize) |
| Construct the singleton Storage API.
|
|
| ~StorageApi () |
| Destructor for the storage API class. More...
|
|
void | initResources () |
| Initialise the API entry points for the common data resource and the readings resource.
|
|
void | setPlugin (StoragePlugin *) |
| Connect with the storage plugin.
|
|
void | setReadingPlugin (StoragePlugin *) |
| Connect with the storage plugin.
|
|
void | start () |
| Start the HTTP server.
|
|
void | startServer () |
|
void | wait () |
| Wait for the HTTP server to shutdown.
|
|
void | stopServer () |
|
unsigned short | getListenerPort () |
| Return the current listener port.
|
|
void | commonInsert (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Perform an insert into a table of the data provided in the payload. More...
|
|
void | commonSimpleQuery (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Perform a simple query on the table using the query parameters as conditions TODO make this work for multiple column queries. More...
|
|
void | commonQuery (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Perform query on a table using the JSON encoded query in the payload. More...
|
|
void | commonUpdate (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Perform an update on a table of the data provided in the payload. More...
|
|
void | commonDelete (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Perform a delete on a table using the condition encoded in the JSON payload. More...
|
|
void | defaultResource (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Handle a bad URL endpoint call.
|
|
void | readingAppend (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Perform an append operation on the readings. More...
|
|
void | readingFetch (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Fetch a block of readings. More...
|
|
void | readingQuery (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Perform a query on a set of readings. More...
|
|
void | readingPurge (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Purge the readings. More...
|
|
void | readingRegister (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Register interest in readings for an asset.
|
|
void | readingUnregister (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Unregister interest in readings for an asset.
|
|
void | tableRegister (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Register interest in readings for an asset.
|
|
void | tableUnregister (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Unregister interest in readings for an asset.
|
|
void | createTableSnapshot (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Create a table snapshot.
|
|
void | loadTableSnapshot (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Load a table snapshot.
|
|
void | deleteTableSnapshot (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Delete a table snapshot.
|
|
void | getTableSnapshots (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Get list of a table snapshots.
|
|
void | createStorageStream (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Create a stream for high speed storage ingestion. More...
|
|
bool | readingStream (ReadingStream **readings, bool commit) |
| Append the readings that have arrived via a stream to the storage plugin. More...
|
|
void | createStorageSchema (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Perform an create table and create index for schema provided in the payload. More...
|
|
void | storageTableInsert (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Perform an insert table operation. More...
|
|
void | storageTableUpdate (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Perform an update on a table of the data provided in the payload. More...
|
|
void | storageTableDelete (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Perform a delete on a table using the condition encoded in the JSON payload. More...
|
|
void | storageTableSimpleQuery (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Perform a simple query on the table using the query parameters as conditions TODO make this work for multiple column queries. More...
|
|
void | storageTableQuery (shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request) |
| Perform query on a table using the JSON encoded query in the payload. More...
|
|
void | printList () |
|
bool | createSchema (const std::string &schema) |
|
void | setTimeout (long timeout) |
|
StoragePlugin * | getStoragePlugin () |
|
StoragePerformanceMonitor * | getPerformanceMonitor () |
|
void | worker () |
| The worker thread.
|
|
void | queue (StorageOperation::Operations op, shared_ptr< HttpServer::Request > request, shared_ptr< HttpServer::Response > response) |
| Append a request to the readings request queue. More...
|
|
The Storage API class - this class is responsible for the registration of all API entry points in the storage API and the dispatch of those API calls to the internals of the storage service and the storage plugin itself.