00001
00010 #ifndef EDG_WORKLOAD_COMMON_CONFIGURATION_NSCONFIGURATION_H
00011 #define EDG_WORKLOAD_COMMON_CONFIGURATION_NSCONFIGURATION_H
00012
00013 #include "confbase.h"
00014
00015 COMMON_NAMESPACE_BEGIN {
00016
00017 namespace configuration {
00018
00019 class NSConfiguration : public confbase_c {
00020 public:
00021 NSConfiguration( const classad::ClassAd *ad );
00022
00023 ~NSConfiguration( void );
00024
00025
00026 inline int backlog_size( int def = 16 ) const
00027 {
00028 return this->getInt( "BacklogSize", def );
00029 }
00030
00031 inline int listening_port( int def = 0 ) const
00032 {
00033 return this->getInt( "ListeningPort", def );
00034 }
00035
00036 inline int master_threads( int def = 0 ) const
00037 {
00038 return this->getInt( "MasterThreads", def );
00039 }
00040
00041 inline int dispatcher_threads( int def = 0 ) const
00042 {
00043 return this->getInt( "DispatcherThreads", def );
00044 }
00045
00046 inline std::string sandbox_staging_path( const std::string &def = "${EDG_WL_SANDBOX_DIR}" ) const
00047 {
00048 return this->getAndParseFileName( "SandboxStagingPath", def );
00049 }
00050
00051 inline double max_input_sandbox_size( double def = 10000000 ) const
00052 {
00053 return this->getDouble( "MaxInputSandboxSize", def );
00054 }
00055
00056 inline bool enable_quota_management( bool def = false ) const
00057 {
00058 return this->getBool( "EnableQuotaManagement", def );
00059 }
00060
00061 inline bool enable_dynamic_quota_adjustment( bool def = false ) const
00062 {
00063 return this->getBool( "EnableDynamicQuotaAdjustment", def );
00064 }
00065
00066 inline long quota_adjustment_amount( long def = 10000 ) const
00067 {
00068 return static_cast<long>( this->getInt( "QuotaAdjustmentAmount", def ) );
00069 }
00070
00071 inline double quota_insensible_disk_portion( double def = 0.0 ) const
00072 {
00073 return this->getDouble( "QuotaInsensibleDiskPortion", def );
00074 }
00075
00076 inline int ii_port( int def = 2170 ) const
00077 {
00078 return this->getInt( "II_Port", def );
00079 }
00080
00081 inline int gris_port( int def = 2135 ) const
00082 {
00083 return this->getInt( "Gris_Port", def );
00084 }
00085
00086 inline int ii_timeout( int def = 60 ) const
00087 {
00088 return this->getInt( "II_Timeout", def );
00089 }
00090
00091 inline int gris_timeout( int def = 60 ) const
00092 {
00093 return this->getInt( "GrisTimeout", def );
00094 }
00095
00096 inline std::string ii_dn( const std::string &def = "" ) const
00097 {
00098 return this->getString( "II_DN", def );
00099 }
00100
00101 inline std::string gris_dn( const std::string &def = "" ) const
00102 {
00103 return this->getString( "Gris_DN", def );
00104 }
00105
00106 inline std::string ii_contact( const std::string &def = "" ) const
00107 {
00108 return this->getString( "II_Contact", def );
00109 }
00110
00111 inline int log_level( int def = 0 ) const
00112 {
00113 return this->getInt( "LogLevel", def );
00114 }
00115
00116 inline unsigned int log_rotation_max_file_number( unsigned int def = 5 ) const
00117 {
00118 return static_cast<unsigned int>( this->getInt( "LogRotationMaxFileNumber", def ) );
00119 }
00120
00121 inline std::streamsize log_file_max_size( std::streamsize def = 100000000 ) const
00122 {
00123 return static_cast<std::streamsize>( this->getInt( "LogFileMaxSize", def ) );
00124 }
00125
00126 inline std::string log_file( const std::string &def = "" ) const
00127 {
00128 return this->getAndParseFileName( "LogFile", def );
00129 }
00130
00131 inline std::string log_rotation_base_file( const std::string &def = "[[LogFile]]" ) const
00132 {
00133 return this->getAndParseFileName( "LogRotationBaseFile", def );
00134 }
00135
00136 inline std::string lock_file( const std::string &def = "" ) const
00137 {
00138 return this->getAndParseFileName( "LockFile", def );
00139 }
00140
00141 };
00142
00143 };
00144
00145 } COMMON_NAMESPACE_END;
00146
00147 #endif
00148
00149
00150
00151