#include <ClientDataManager.h>
|
| int8_t | clientExists (int32_t clientPID, int32_t clientTID) |
| | Checks if the client with the given ID exists in the Client Data Table.
|
| |
| int8_t | createNewClient (int32_t clientPID, int32_t clientTID) |
| | Create a new entry for the client with the given PID in the ClientData Table.
|
| |
| std::unordered_set< int64_t > * | getRequestsByClientID (int32_t clientTID) |
| | Returns a list of active requests for the client with the given PID.
|
| |
| void | insertRequestByClientId (int32_t clientTID, int64_t requestHandle) |
| | This method is called by the RequestMap to insert a new Request (represented by it's handle) for the client with the given ID in the Client Data Table.
|
| |
| void | deleteRequestByClientId (int32_t clientTID, int64_t requestHandle) |
| | This method is called by the RequestMap to delete a Request (represented by it's handle) for the client with the given ID in the Client Data Table.
|
| |
| double | getHealthByClientID (int32_t clientTID) |
| | This method is called by the RateLimiter to fetch the current health for a given client in the Client Data Table.
|
| |
| int64_t | getLastRequestTimestampByClientID (int32_t clientTID) |
| | This method is called by the RateLimiter to fetch the Last Request Timestamp for a given client in the Client Data Table.
|
| |
| void | updateHealthByClientID (int32_t clientTID, double health) |
| | This method is called by the RateLimiter to update the current health for a given client in the Client Data Table.
|
| |
| void | updateLastRequestTimestampByClientID (int32_t clientTID, int64_t currentMillis) |
| | This method is called by the RateLimiter to update the Last Request Timestamp for a given client in the Client Data Table.
|
| |
| int8_t | getClientLevelByClientID (int32_t clientPID) |
| | This method is called by the Verifier to fetch the Permission Level for a given client in the Client Data Table, i.e. whether the client has SYSTEM (Root) or THIRD_PARTY (User) permissions.
|
| |
| void | getActiveClientList (std::vector< int32_t > &clientList) |
| | This method is called by the PulseMonitor to fetch the list of all active clients.
|
| |
| void | deleteClientPID (int32_t clientPID) |
| | Delete a client PID Entry from the Client Table.
|
| |
| void | deleteClientTID (int32_t clientTID) |
| | Delete a client TID Entry from the Client TID Data Table.
|
| |
|
|
std::unordered_map< int32_t, ClientInfo * > | mClientRepo |
| | Maintains Client Info indexed by PID.
|
| |
|
std::unordered_map< int32_t, ClientTidData * > | mClientTidRepo |
| | Maintains Client Info indexed by TID.
|
| |
Stores and Maintains Client Tracking Data for all the Active Clients (i.e. clients with outstanding Requests). The Data Tracked for each Client includes:
Definition at line 51 of file ClientDataManager.h.
◆ clientExists()
| int8_t ClientDataManager::clientExists |
( |
int32_t |
clientPID, |
|
|
int32_t |
clientTID |
|
) |
| |
Checks if the client with the given ID exists in the Client Data Table.
- Parameters
-
| clientPID | PID of the client |
| clientTID | TID of the client |
- Returns
- int8_t:
- 1: if the client already exists
- 0: otherwise
◆ createNewClient()
| int8_t ClientDataManager::createNewClient |
( |
int32_t |
clientPID, |
|
|
int32_t |
clientTID |
|
) |
| |
Create a new entry for the client with the given PID in the ClientData Table.
This method should only be called if the clientExists method returns 0.
- Parameters
-
| clientPID | PID of the client |
| clientTID | TID of the client |
- Returns
- int8_t:
- 1: Indicating that a new Client Tracking Entry was successfully Created.
- 0: Otherwise
◆ deleteClientPID()
| void ClientDataManager::deleteClientPID |
( |
int32_t |
clientPID | ) |
|
Delete a client PID Entry from the Client Table.
- Parameters
-
| clientPID | Process ID of the client |
◆ deleteClientTID()
| void ClientDataManager::deleteClientTID |
( |
int32_t |
clientTID | ) |
|
Delete a client TID Entry from the Client TID Data Table.
- Parameters
-
| clientTID | TID of the client |
◆ deleteRequestByClientId()
| void ClientDataManager::deleteRequestByClientId |
( |
int32_t |
clientTID, |
|
|
int64_t |
requestHandle |
|
) |
| |
This method is called by the RequestMap to delete a Request (represented by it's handle) for the client with the given ID in the Client Data Table.
- Parameters
-
| clientTID | Process TID of the client |
| requestHandle | Handle of the Request |
◆ getActiveClientList()
| void ClientDataManager::getActiveClientList |
( |
std::vector< int32_t > & |
clientList | ) |
|
This method is called by the PulseMonitor to fetch the list of all active clients.
- Parameters
-
| clientList | An IN/OUT parameter to store the list of active clients. |
◆ getClientLevelByClientID()
| int8_t ClientDataManager::getClientLevelByClientID |
( |
int32_t |
clientPID | ) |
|
This method is called by the Verifier to fetch the Permission Level for a given client in the Client Data Table, i.e. whether the client has SYSTEM (Root) or THIRD_PARTY (User) permissions.
- Parameters
-
| clientPID | Process ID of the client |
- Returns
- int8_t:
- PERMISSION_SYSTEM: If the client has System level access
- PERMISSION_THIRD_PARTY: If the Client has Third Party level access
- -1: If the Client could not be determined.
◆ getHealthByClientID()
| double ClientDataManager::getHealthByClientID |
( |
int32_t |
clientTID | ) |
|
This method is called by the RateLimiter to fetch the current health for a given client in the Client Data Table.
- Parameters
-
| clientPID | Process ID of the client |
- Returns
- double:
◆ getLastRequestTimestampByClientID()
| int64_t ClientDataManager::getLastRequestTimestampByClientID |
( |
int32_t |
clientTID | ) |
|
This method is called by the RateLimiter to fetch the Last Request Timestamp for a given client in the Client Data Table.
- Parameters
-
| clientTID | TID of the client |
- Returns
- int64_t:
- Timestamp of Last Request (A value of 0, indicates no prior Requests).
◆ getRequestsByClientID()
| std::unordered_set< int64_t > * ClientDataManager::getRequestsByClientID |
( |
int32_t |
clientTID | ) |
|
Returns a list of active requests for the client with the given PID.
- Parameters
-
| clientTID | Process TID of the client |
- Returns
- std::unordered_set<int64_t>*:
- Pointer to an unordered_set containing the requests.
◆ insertRequestByClientId()
| void ClientDataManager::insertRequestByClientId |
( |
int32_t |
clientTID, |
|
|
int64_t |
requestHandle |
|
) |
| |
This method is called by the RequestMap to insert a new Request (represented by it's handle) for the client with the given ID in the Client Data Table.
- Parameters
-
| clientTID | Process TID of the client |
| requestHandle | Handle of the Request |
◆ updateHealthByClientID()
| void ClientDataManager::updateHealthByClientID |
( |
int32_t |
clientTID, |
|
|
double |
health |
|
) |
| |
This method is called by the RateLimiter to update the current health for a given client in the Client Data Table.
- Parameters
-
| clientTID | TID of the client |
| health | Update value of the Health for the client |
◆ updateLastRequestTimestampByClientID()
| void ClientDataManager::updateLastRequestTimestampByClientID |
( |
int32_t |
clientTID, |
|
|
int64_t |
currentMillis |
|
) |
| |
This method is called by the RateLimiter to update the Last Request Timestamp for a given client in the Client Data Table.
- Parameters
-
| clientTID | TID of the client |
| currentMillis | New value for the Last Request Timestamp for the client |
The documentation for this class was generated from the following file: