Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

NSConfiguration.h

Go to the documentation of this file.
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 long connection_timeout( long def = 120 ) const
00047   {
00048     return static_cast<long>( this->getInt( "ConnectionTimeout", def ) );
00049   }
00050 
00051   inline long command_timeout( long def = 300 ) const
00052   {
00053     return static_cast<long>( this->getInt( "CommandTimeout", def ) );
00054   }
00055 
00056   inline std::string sandbox_staging_path( const std::string &def = "${EDG_WL_SANDBOX_DIR}" ) const
00057   {
00058     return this->getAndParseFileName( "SandboxStagingPath", def );
00059   }
00060 
00061   inline double max_input_sandbox_size( double def = 10000000 ) const
00062   {
00063     return this->getDouble( "MaxInputSandboxSize", def );
00064   }
00065 
00066   inline bool enable_quota_management( bool def = false ) const
00067   {
00068     return this->getBool( "EnableQuotaManagement", def );
00069   }
00070 
00071   inline bool enable_dynamic_quota_adjustment( bool def = false ) const
00072   {
00073     return this->getBool( "EnableDynamicQuotaAdjustment", def );
00074   }
00075 
00076   inline long quota_adjustment_amount( long def = 10000 ) const
00077   {
00078     return static_cast<long>( this->getInt( "QuotaAdjustmentAmount", def ) );
00079   }
00080 
00081   inline double quota_insensible_disk_portion( double def = 0.0 ) const
00082   {
00083     return this->getDouble( "QuotaInsensibleDiskPortion", def );
00084   }
00085 
00086   inline int ii_port( int def = 2170 ) const
00087   {
00088     return this->getInt( "II_Port", def );
00089   }
00090 
00091   inline int gris_port( int def = 2135 ) const
00092   {
00093     return this->getInt( "Gris_Port", def );
00094   }
00095 
00096   inline int ii_timeout( int def = 60 ) const
00097   {
00098     return this->getInt( "II_Timeout", def );
00099   }
00100 
00101   inline int gris_timeout( int def = 60 ) const
00102   {
00103     return this->getInt( "GrisTimeout", def );
00104   }
00105 
00106   inline std::string ii_dn( const std::string &def = "" ) const
00107   {
00108     return this->getString( "II_DN", def );
00109   }
00110 
00111   inline std::string gris_dn( const std::string &def = "" ) const
00112   {
00113     return this->getString( "Gris_DN", def );
00114   }
00115 
00116   inline std::string ii_contact( const std::string &def = "" ) const
00117   {
00118     return this->getString( "II_Contact", def );
00119   }
00120 
00121   inline std::vector<std::string> rlscatalog( void ) const
00122   {
00123     return this->getVector( "RLSCatalog" );
00124   }
00125 
00126   inline std::vector<std::string> dlicatalog( void ) const
00127   {
00128     return this->getVector( "DLICatalog" );
00129   }
00130 
00131   inline int log_level( int def = 0 ) const
00132   {
00133     return this->getInt( "LogLevel", def );
00134   }
00135 
00136   inline unsigned int log_rotation_max_file_number( unsigned int def = 5 ) const
00137   {
00138     return static_cast<unsigned int>( this->getInt( "LogRotationMaxFileNumber", def ) );
00139   }
00140 
00141   inline std::streamsize log_file_max_size( std::streamsize def = 100000000 ) const
00142   {
00143     return static_cast<std::streamsize>( this->getInt( "LogFileMaxSize", def ) );
00144   }
00145 
00146   inline std::string log_file( const std::string &def = "" ) const
00147   {
00148     return this->getAndParseFileName( "LogFile", def );
00149   }
00150 
00151   inline std::string log_rotation_base_file( const std::string &def = "[[LogFile]]" ) const
00152   {
00153     return this->getAndParseFileName( "LogRotationBaseFile", def );
00154   }
00155 
00156   inline std::string lock_file( const std::string &def = "" ) const
00157   {
00158     return this->getAndParseFileName( "LockFile", def );
00159   }
00160 
00161 };
00162 
00163 }; // configuration namespace closure
00164 
00165 } COMMON_NAMESPACE_END;
00166 
00167 #endif /* EDG_WORKLOAD_COMMON_CONFIGURATION_NSCONFIGURATION_H */
00168 
00169 // Local Variables:
00170 // mode: c++
00171 // End:

Generated on Wed Mar 1 00:37:55 2006 for COMMON API - configuration, jobid, ldif2classadi, logger, process, requestad, socket++i, task, utilities by doxygen 1.3.5