Management of FESA classes' persistency.
More...
#include <PersistencyManager.h>
|
bool | registerPersistencyUnit (std::auto_ptr< PersistencyUnit > persistencyUnit) |
|
void | start () |
| Start the persistency thread.
|
|
void | trigger (const std::string &className) |
| Trigger the procedure to store the persistent data into the persistency file. This function is intended for the so called 'manual' persistency triggering. More...
|
|
void | triggerWithDelay (const std::string &className) |
| Trigger the procedure to store the persistent data into the persistency file. This function is intended for persistency triggering after a setting. The data storing procedure will start only if there are no sets for a configured time interval. The delay is specified in fesa.cfg. More...
|
|
void | persistAllNow () |
|
virtual | ~Thread () |
| Destructor.
|
|
void | setDetachState (int32_t state) |
| Modify the detach state of the thread. More...
|
|
void | start (bool blockingMode, const std::string &threadName, bool permanent=true) |
|
virtual void | stop () |
| Stop the thread.
|
|
int | join (void **status) |
|
bool | isRunning () const |
| Check if the thread is running. More...
|
|
pthread_t | getID () const |
| Get the process ID. More...
|
|
int32_t | getPriority () const |
| Get the priority of the thread. More...
|
|
cpu_set_t | getAffinity () const |
| Get the affinity of the thread.
|
|
void | setPriority (int32_t priority) |
| Set the priority of the thread. More...
|
|
void | setAffinity (cpu_set_t affinity) |
| Set the affinity of the thread. More...
|
|
ThreadType | getThreadType () const |
|
|
bool | isRunning_ |
| true if the thread is running
|
|
bool | hasFinished_ |
| true if the thread has finished.
|
|
bool | joinHasFinished_ |
| if true, a call to pthread_join has completed and a further pthread_cancel / pthread_join call is unsafe
|
|
bool | permanent_ |
|
pthread_t | tid_ |
| Id of this thread.
|
|
Management of FESA classes' persistency.
Get the instance of this class (unique in the system). The unique instance will be created the first time the function is called.
- Returns
- The instance of this class
void fesa::PersistencyManager::persistAllNow |
( |
| ) |
|
Persists all the persistent data. This is a blocking call, it returns when data has been persisted.
- Exceptions
-
FesaException | in cases such as an impossibility to write the xml, or to rename the temporary file |
bool fesa::PersistencyManager::registerPersistencyUnit |
( |
std::auto_ptr< PersistencyUnit > |
persistencyUnit | ) |
|
Registers a new persistency unit and checks that it can be persisted.
- Parameters
-
persistencyUnit | A persistency unit |
- Returns
- true if the persistency unit can be persisted or doesn't need to be persisted; false if it must be persisted but cannot.
void fesa::PersistencyManager::trigger |
( |
const std::string & |
className | ) |
|
Trigger the procedure to store the persistent data into the persistency file. This function is intended for the so called 'manual' persistency triggering.
- Parameters
-
className | The name of the FESA class whose data are to be stored |
void fesa::PersistencyManager::triggerWithDelay |
( |
const std::string & |
className | ) |
|
Trigger the procedure to store the persistent data into the persistency file. This function is intended for persistency triggering after a setting. The data storing procedure will start only if there are no sets for a configured time interval. The delay is specified in fesa.cfg.
- Parameters
-
className | The name of the FESA class whose data are to be stored |
The documentation for this class was generated from the following files:
- PersistencyManager.h
- PersistencyManager.cpp