Resource Tuner
Loading...
Searching...
No Matches

CocoTable. More...

#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.
 

Private Attributes

std::vector< std::vector< std::pair< CocoNode *, CocoNode * > > > mCocoTable
 The main data structure which is a 2D vector. It stores entries for each resource and each entry stores a priority vector. For each resource, for each priority, you store a head (second) and tail (first) pointers to store a linked list in memory.
 
std::vector< int32_t > mCurrentlyAppliedPriority
 Data structure storing the c2urrently applied priority for each resource. It is referred to whenever a new request comes in.
 

Detailed Description

CocoTable.

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.

Member Function Documentation

◆ insertRequest()

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.

Parameters
reqA pointer to the Request to be inserted
Returns
int8_t:

◆ removeRequest()

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.

Parameters
reqA pointer to the Request to be removed
Returns
int8_t:

◆ updateRequest()

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.

Parameters
reqA pointer to the Request to be modified
durationThe new duration of the request
Returns
int8_t:

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