|
Ripples 1.0
High Performant Software Architecture For Transaction Processing
|
#include <resource.h>

Data Fields | |
| char * | name |
| char * | filepath |
| size_t | update_frequency |
| channel_bss_ops_t | channel_op |
| struct timespec | create_time |
| struct timespec | next_update_time |
| resource_check_load_fn | check_load_fn |
| resource_release_fn | release_fn |
| void * | current_resource |
| void * | incoming_resource |
Structure describes a resource which is a file on disk. A resource is loaded at application start and used by other parts of the application. Resource could be periodically checked for change and updated resource data loaded.
| channel_bss_ops_t resource_s::channel_op |
Channel OP for this resource.
| resource_check_load_fn resource_s::check_load_fn |
Pointer to function that checks for resource change, loads and if necessary transforms data into consumable object.
| struct timespec resource_s::create_time |
Create time for resource currently loaded into application. This is compared to file on filesystem change time to detect if resource has changed.
| void* resource_s::current_resource |
Pointer to current resource object.
| char* resource_s::filepath |
Full path on disk for resource.
| void* resource_s::incoming_resource |
Pointer to incoming (updated) resource.
| char* resource_s::name |
Name of resource.
| struct timespec resource_s::next_update_time |
Time to check if resource on disk has changed. This value is modified after each check.
| resource_release_fn resource_s::release_fn |
Pointer to function that releases the resource.
| size_t resource_s::update_frequency |
Frequency at which to check if resource on disk has changed. Unit is seconds. Value of 0 means load resource at startup and then do not check for updates.