XCollieChecker
|
virtual void CheckBlock()
|
Provides the callback of the suspension detection result.
Input arguments: none
Output arguments: none
Return value: none
|
XCollieChecker
|
virtual void CheckThreadBlock()
|
Provides the callback of the thread suspension detection result.
Input arguments: none
Output arguments: none
Return value: none
|
XCollie
|
void RegisterXCollieChecker(const sptr<XCollieChecker> &checker, unsigned int type)
|
Registers the callback of the thread suspension detection result.
Input arguments:
- checker: Indicates the pointer to the XCollieChecker instance.
- type: Indicates the suspension detection type. Set it to XCOLLIE_THREAD.
Output arguments: none
Return value: none
|
XCollie
|
int SetTimer(const std::string &name, unsigned int timeout, std::function<void (void *)> func, void *arg, unsigned int flag)
|
Adds timers.
Input arguments:
- name: Indicates the timer name.
- timeout: Indicates the timeout duration, in seconds.
- func: Indicates the timeout callback.
- arg: Indicates the pointer to the timeout callback.
- flag: Indicates the timer operation type.
XCOLLIE_FLAG_DEFAULT // Indicates the default flag, which is the combination of the other three options.
XCOLLIE_FLAG_NOOP // Calls only the timeout callback.
XCOLLIE_FLAG_LOG // Generates a timeout fault log.
XCOLLIE_FLAG_RECOVERY // Exits the process.
Output arguments: none
Return value: Returns the timer ID if the operation is successful; returns -1 otherwise.
|
XCollie
|
bool UpdateTimer(int id, unsigned int timeout)
|
Updates timers.
Input arguments:
- id: Indicates the timer ID.
- timeout: Indicates the timeout duration, in seconds.
Output arguments: none
Return value: Returns true if the operation is successful; returns false otherwise.
|
XCollie
|
void CancelTimer(int id)
|
Cancels timers.
Input arguments:
id: Indicates the timer ID.
Output arguments: none
Return value: none
|