Resource Tuner
|
#include <CocoTable.h>
Public Member Functions | |
int8_t | insertRequest (Request *req) |
Used to insert a request into the CocoTable, so that it can be applied to the desired Resource Nodes. | |
int8_t | removeRequest (Request *req) |
Used to untune a previously issued Tune Request. | |
int8_t | updateRequest (Request *req, int64_t duration) |
Used to update the duration of an Active Request. | |
Concurrency Coordinator, synchronizes and orders the different requests for the a Resource with respect to the Resource Policy and Request Priorities. The actual resource applier, teardown callbacks are invoked through the CocoTable.
Definition at line 90 of file CocoTable.h.
int8_t CocoTable::insertRequest | ( | Request * | req | ) |
Used to insert a request into the CocoTable, so that it can be applied to the desired Resource Nodes.
As part of this routine, CocoNodes are allocated for each Resource part of the Request, as well as creating and starting the timer, and finally inserting the request to the appropriate Resource level Linked Lists.
req | A pointer to the Request to be inserted |
int8_t CocoTable::removeRequest | ( | Request * | req | ) |
Used to untune a previously issued Tune Request.
This routine is invoked when an untune request is received, as part of the routine, the Request Timer for the corresponding Tune Request will be killed, and subsequently the Tune request will be cleaned up from the Resource Level Linked Lists.
req | A pointer to the Request to be removed |
int8_t CocoTable::updateRequest | ( | Request * | req, |
int64_t | duration | ||
) |
Used to update the duration of an Active Request.
This routine is invoked when a retune request is received, to modify the duration of a previously issued Tune Request. Note, only extending the duration is allowed.
req | A pointer to the Request to be modified |
duration | The new duration of the request |