From 8a5afa8bd0a846deef2a03609bdb4444b468a463 Mon Sep 17 00:00:00 2001 From: dimitr Date: Sun, 10 Nov 2002 13:41:20 +0000 Subject: [PATCH] Guardian option is added to the config manager. --- src/common/config/config.cpp | 10 +++++++++- src/common/config/config.h | 5 +++++ src/common/config/config_impl.h | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/common/config/config.cpp b/src/common/config/config.cpp index d8a9569294..022216d31d 100644 --- a/src/common/config/config.cpp +++ b/src/common/config/config.cpp @@ -52,7 +52,8 @@ const string keys[] = { "SortMemBlockSize", // 1 "SortMemUpperLimit", // 2 "RemoteFileOpenAbility", // 3 - "TempDirectories" // 4 + "TempDirectories", // 4 + "GuardianOption" // 5 }; /****************************************************************************** @@ -185,3 +186,10 @@ string_vector Config::getTempDirectories(string default_value) ConfigImpl::instance().getValueList(TEMP_DIRECTORIES, result); return result; } + +int Config::getGuardianOption(int default_value) +{ + int result = default_value; + ConfigImpl::instance().getValue(GUARDIAN_OPTION, result); + return result; +} diff --git a/src/common/config/config.h b/src/common/config/config.h index 5da9c778da..b00f8d0472 100644 --- a/src/common/config/config.h +++ b/src/common/config/config.h @@ -90,6 +90,11 @@ public: List of directories to store temporary files in */ static string_vector getTempDirectories(string default_value = ""); + + /* + Startup option for the guardian + */ + static int getGuardianOption(int default_value = 0); }; #endif // CONFIG_H diff --git a/src/common/config/config_impl.h b/src/common/config/config_impl.h index ef39d7bb1e..f1596c52e4 100644 --- a/src/common/config/config_impl.h +++ b/src/common/config/config_impl.h @@ -44,7 +44,8 @@ enum ConfigKey SORT_MEM_BLOCK_SIZE, // 1 SORT_MEM_UPPER_LIMIT, // 2 REMOTE_FILE_OPEN_ABILITY, // 3 - TEMP_DIRECTORIES // 4 + TEMP_DIRECTORIES, // 4 + GUARDIAN_OPTION // 5 }; /******************************************************************************