0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Hypertable::FsBroker::Lib::StatusManager Class Reference

Manages file system broker status. More...

#include <StatusManager.h>

Collaboration diagram for Hypertable::FsBroker::Lib::StatusManager:
Collaboration graph
[legend]

Public Member Functions

 StatusManager ()
 Constructor. More...
 
void set_read_status (Status::Code code, const std::string &text)
 Sets read status. More...
 
void set_write_status (Status::Code code, const std::string &text)
 Sets write status. More...
 
void set_read_error (int error)
 Sets status to CRITICAL with status text associated with errno. More...
 
void set_write_error (int error)
 Sets status to CRITICAL with status text associated with errno. More...
 
void clear_status ()
 Clears status by setting it to OK. More...
 
Statusget ()
 Gets status information. More...
 

Private Member Functions

void set_status (Status::Code code, const std::string &text)
 Sets status. More...
 
void set_error (int error)
 Sets status to CRITICAL with status text associated with errno. More...
 

Private Attributes

std::mutex m_mutex
 Mutex for serializaing access to members More...
 
Status m_status
 Status information. More...
 
std::chrono::steady_clock::time_point m_last_read_error
 Time of last reported read error. More...
 
std::chrono::steady_clock::time_point m_last_write_error
 Time of last reported write error. More...
 
Status::Code m_current_status {}
 Current status. More...
 

Detailed Description

Manages file system broker status.

Definition at line 44 of file StatusManager.h.

Constructor & Destructor Documentation

StatusManager::StatusManager ( )

Constructor.

Definition at line 44 of file StatusManager.cc.

Member Function Documentation

void StatusManager::clear_status ( )

Clears status by setting it to OK.

Definition at line 84 of file StatusManager.cc.

Status& Hypertable::FsBroker::Lib::StatusManager::get ( )
inline

Gets status information.

Returns
Status information.

Definition at line 73 of file StatusManager.h.

void StatusManager::set_error ( int  error)
private

Sets status to CRITICAL with status text associated with errno.

Parameters
errorError code (errno)

Definition at line 102 of file StatusManager.cc.

void StatusManager::set_read_error ( int  error)

Sets status to CRITICAL with status text associated with errno.

Parameters
errorError code (errno)

Definition at line 66 of file StatusManager.cc.

void StatusManager::set_read_status ( Status::Code  code,
const std::string &  text 
)

Sets read status.

Parameters
codeStatus code.
textStatus text.

Definition at line 48 of file StatusManager.cc.

void StatusManager::set_status ( Status::Code  code,
const std::string &  text 
)
private

Sets status.

Parameters
codeStatus code.
textStatus text.

Definition at line 96 of file StatusManager.cc.

void StatusManager::set_write_error ( int  error)

Sets status to CRITICAL with status text associated with errno.

Parameters
errorError code (errno)

Definition at line 75 of file StatusManager.cc.

void StatusManager::set_write_status ( Status::Code  code,
const std::string &  text 
)

Sets write status.

Parameters
codeStatus code.
textStatus text.

Definition at line 57 of file StatusManager.cc.

Member Data Documentation

Status::Code Hypertable::FsBroker::Lib::StatusManager::m_current_status {}
private

Current status.

Definition at line 99 of file StatusManager.h.

std::chrono::steady_clock::time_point Hypertable::FsBroker::Lib::StatusManager::m_last_read_error
private

Time of last reported read error.

Definition at line 93 of file StatusManager.h.

std::chrono::steady_clock::time_point Hypertable::FsBroker::Lib::StatusManager::m_last_write_error
private

Time of last reported write error.

Definition at line 96 of file StatusManager.h.

std::mutex Hypertable::FsBroker::Lib::StatusManager::m_mutex
private

Mutex for serializaing access to members

Definition at line 87 of file StatusManager.h.

Status Hypertable::FsBroker::Lib::StatusManager::m_status
private

Status information.

Definition at line 90 of file StatusManager.h.


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