NCBI C++ ToolKit
Public Types | Static Public Member Functions | Static Private Member Functions | List of all members
CNCAlerts Class Reference

Search Toolkit Book for CNCAlerts

#include "nc_utils.hpp"
(Private to src/app/netcache.)

Public Types

enum  EAlertType {
  eUnknown , eStartupConfigChanged , ePidFileFailed , eStartAfterCrash ,
  eStorageReinit , eAccessDenied , eSyncFailed , ePeerIpChanged ,
  eDiskSpaceNormal , eDatabaseTooLarge , eDatabaseOverLimit , eDiskSpaceLow ,
  eDiskSpaceCritical , eDebugOrphanRecordFound , eDebugOrphanRecordFound2 , eDebugWriteBlobInfoFailed ,
  eDebugReadBlobInfoFailed0 , eDebugReadBlobInfoFailed1 , eDebugReadBlobInfoFailed2 , eDebugUpdateUpCoords1 ,
  eDebugUpdateUpCoords2 , eDebugWriteBlobInfo1 , eDebugWriteBlobInfo2 , eDebugWriteBlobInfo3 ,
  eDebugWriteBlobInfo4 , eDebugMoveDataToGarbage , eDebugReadMapInfo1 , eDebugReadMapInfo2 ,
  eDebugReadChunkData1 , eDebugReadChunkData2 , eDebugReadChunkData3 , eDebugReadChunkData4 ,
  eDebugDeleteNextData1 , eDebugDeleteNextData2 , eDebugDeleteVersionData , eDebugSaveOneMapImpl1 ,
  eDebugSaveOneMapImpl2 , eDebugWriteChunkData1 , eDebugWriteChunkData2 , eDebugMoveRecord0 ,
  eDebugMoveRecord1 , eDebugMoveRecord2 , eDebugMoveRecord3 , eDebugDeleteFile ,
  eDebugReleaseCacheData1 , eDebugReleaseCacheData2 , eDebugDeleteSNCBlobVerData , eDebugDeleteCNCBlobVerManager ,
  eDebugExtraWrite , eDebugCacheDeleted1 , eDebugCacheDeleted2 , eDebugCacheDeleted3 ,
  eDebugCacheDeleted4 , eDebugCacheFailedMgrAttach , eDebugCacheFailedMgrDetach , eDebugCacheWrongMgr ,
  eDebugCacheWrong , eDebugWrongCacheFound1 , eDebugWrongCacheFound2 , eDebugSyncAborted1 ,
  eDebugSyncAborted2 , eDebugConnAdjusted1 , eDebugConnAdjusted2 , eDebugDbFileNotFound ,
  eLastAlert
}
 
enum  EAlertAckResult { eNotFound , eAcknowledged }
 

Static Public Member Functions

static void Register (EAlertType alert_type, const string &message)
 
static EAlertAckResult Acknowledge (const string &alert_id, const string &user)
 
static void Report (CSrvSocketTask &task, bool report_all)
 

Static Private Member Functions

static EAlertType x_IdToType (const string &alert_id)
 
static string x_TypeToId (EAlertType type)
 

Detailed Description

Definition at line 181 of file nc_utils.hpp.

Member Enumeration Documentation

◆ EAlertAckResult

Enumerator
eNotFound 
eAcknowledged 

Definition at line 255 of file nc_utils.hpp.

◆ EAlertType

Enumerator
eUnknown 
eStartupConfigChanged 

Configuration file changed.

ePidFileFailed 

Reporting Pid failed.

eStartAfterCrash 

InstanceGuard file was present on startup.

eStorageReinit 

Data storage was reinitialized.

eAccessDenied 

Command was rejected because client lacks administrative privileges.

eSyncFailed 

Synchronization failed.

ePeerIpChanged 

Peer IP address changed.

eDiskSpaceNormal 

Free disk space is back to normal.

eDatabaseTooLarge 

Database is too large (warning)

eDatabaseOverLimit 

Database size exceeded its limit (error, stop write)

eDiskSpaceLow 

Free disk space is below threshold.

eDiskSpaceCritical 

Free disk space is below critical threshold.

eDebugOrphanRecordFound 
eDebugOrphanRecordFound2 
eDebugWriteBlobInfoFailed 
eDebugReadBlobInfoFailed0 
eDebugReadBlobInfoFailed1 
eDebugReadBlobInfoFailed2 
eDebugUpdateUpCoords1 
eDebugUpdateUpCoords2 
eDebugWriteBlobInfo1 
eDebugWriteBlobInfo2 
eDebugWriteBlobInfo3 
eDebugWriteBlobInfo4 
eDebugMoveDataToGarbage 
eDebugReadMapInfo1 
eDebugReadMapInfo2 
eDebugReadChunkData1 
eDebugReadChunkData2 
eDebugReadChunkData3 
eDebugReadChunkData4 
eDebugDeleteNextData1 
eDebugDeleteNextData2 
eDebugDeleteVersionData 
eDebugSaveOneMapImpl1 
eDebugSaveOneMapImpl2 
eDebugWriteChunkData1 
eDebugWriteChunkData2 
eDebugMoveRecord0 
eDebugMoveRecord1 
eDebugMoveRecord2 
eDebugMoveRecord3 
eDebugDeleteFile 
eDebugReleaseCacheData1 
eDebugReleaseCacheData2 
eDebugDeleteSNCBlobVerData 
eDebugDeleteCNCBlobVerManager 
eDebugExtraWrite 
eDebugCacheDeleted1 
eDebugCacheDeleted2 
eDebugCacheDeleted3 
eDebugCacheDeleted4 
eDebugCacheFailedMgrAttach 
eDebugCacheFailedMgrDetach 
eDebugCacheWrongMgr 
eDebugCacheWrong 
eDebugWrongCacheFound1 
eDebugWrongCacheFound2 
eDebugSyncAborted1 
eDebugSyncAborted2 
eDebugConnAdjusted1 
eDebugConnAdjusted2 
eDebugDbFileNotFound 
eLastAlert 

Definition at line 184 of file nc_utils.hpp.

Member Function Documentation

◆ Acknowledge()

CNCAlerts::EAlertAckResult CNCAlerts::Acknowledge ( const string alert_id,
const string user 
)
static

◆ Register()

void CNCAlerts::Register ( EAlertType  alert_type,
const string message 
)
static

◆ Report()

void CNCAlerts::Report ( CSrvSocketTask task,
bool  report_all 
)
static

◆ x_IdToType()

CNCAlerts::EAlertType CNCAlerts::x_IdToType ( const string alert_id)
staticprivate

Definition at line 292 of file nc_utils.cpp.

References NStr::CompareNocase(), eUnknown, s_alertToIdMap, s_alertToIdMapSize, and AlertToId::type.

Referenced by Acknowledge().

◆ x_TypeToId()

string CNCAlerts::x_TypeToId ( CNCAlerts::EAlertType  type)
staticprivate

Definition at line 301 of file nc_utils.cpp.

References AlertToId::id, s_alertToIdMap, and s_alertToIdMapSize.

Referenced by Register().


The documentation for this class was generated from the following files:
Modified on Tue May 28 05:51:08 2024 by modify_doxy.py rev. 669887