#include <Cache.h>
Public Member Functions | |
Cache (const string &configurationDirectory) throw (Exception) | |
Establishes cache. | |
virtual | ~Cache () |
Sweeps the cache. | |
void | reloadConfig (const string &configurationDirectory) |
Reads config files and applies the changes safely. | |
User * | login (const string &name) |
Returns a User reference or NULL if it has not been read from a configuration file. | |
Static Public Member Functions | |
static time_t | getCurrentTime () |
Returns actual time by using time() function from ctime. | |
Public Attributes | |
Settings | config |
Current configuration read from file by Cache() or reloadConfig(). | |
Logger | logger |
Logger. | |
GarbageCollector * | gc |
GarbageCollector reference. | |
Static Public Attributes | |
static const unsigned int | MAX_OBJECT_SIZE = 1024 * 1024 |
Size of the biggest value that can be stored. |
It responsible for reading the configuration from file system, creation of User objects and it is a User interface provider.
Definition at line 40 of file Cache.h.
Cache::Cache | ( | const string & | configurationDirectory | ) | throw (Exception) |
Establishes cache.
Reads config files and creates appropriate structure of config and users. Creates appropriate Allocator. Creates User objects read from configuration. Creates GarbageCollector object.
configurationDirectory | configuration files directory |
FileNotFound | When at least one of the given files does not exist. | |
ConfigParseException | When file is malformed. | |
ConfigSemanticException | When illegal value in file exists. |
Cache::~Cache | ( | ) | [virtual] |
void Cache::reloadConfig | ( | const string & | configurationDirectory | ) |
Reads config files and applies the changes safely.
(the word safely is not fully supported yet)
configurationDirectory | configuration files directory |
FileNotFound | When at least one of the given files does not exist. | |
ConfigParseException | When file is malformed. | |
ConfigSemanticException | When illegal value in file exists. |
User * Cache::login | ( | const string & | name | ) |
static time_t Cache::getCurrentTime | ( | ) | [inline, static] |