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

WMConfiguration.h

Go to the documentation of this file.
00001 
00010 // File: WMConfiguration.h
00011 // Author: Francesco Giacomini <Francesco.Giacomini@cnaf.infn.it>
00012 // Copyright (c) 2002 EU DataGrid.
00013 // For license conditions see http://www.eu-datagrid.org/license.html
00014 
00015 // $Id: WMConfiguration.h.G,v 1.4 2003/03/13 11:48:53 peluso Exp $
00016 
00017 #ifndef EDG_WORKLOAD_COMMON_CONFIGURATION_WMCONFIGURATION_H
00018 #define EDG_WORKLOAD_COMMON_CONFIGURATION_WMCONFIGURATION_H
00019 
00020 #ifndef EDG_WORKLOAD_COMMON_CONFIGURATION_CONFBASE_H
00021 #include "edg/workload/common/configuration/confbase.h"
00022 #endif
00023 
00024 namespace classad {
00025 class ClassAd;
00026 }
00027 
00028 namespace edg {
00029 namespace workload {
00030 namespace common {
00031 namespace configuration {
00032 
00033 class WMConfiguration: public confbase_c
00034 {
00035 public:
00036   WMConfiguration(classad::ClassAd const* ad);
00037   ~WMConfiguration();
00038 
00039 
00040   inline bool fake( bool def = false ) const
00041   {
00042     return this->getBool( "Fake", def );
00043   }
00044 
00045   inline int pipe_depth( int def = 10 ) const
00046   {
00047     return this->getInt( "PipeDepth", def );
00048   }
00049 
00050   inline int worker_threads( int def = 5 ) const
00051   {
00052     return this->getInt( "WorkerThreads", def );
00053   }
00054 
00055   inline int input_iterations( int def = 1 ) const
00056   {
00057     return this->getInt( "InputIterations", def );
00058   }
00059 
00060   inline int max_retry_count( int def = 10 ) const
00061   {
00062     return this->getInt( "MaxRetryCount", def );
00063   }
00064 
00065   inline int max_shallow_count( int def = 0 ) const
00066   {
00067     return this->getInt( "MaxShallowCount", def );
00068   }
00069 
00070   inline std::string input( const std::string &def = "${EDG_WL_TMP}/workload_manager/input.fl" ) const
00071   {
00072     return this->getAndParseFileName( "Input", def );
00073   }
00074 
00075   inline std::string dispatcher_type( const std::string &def = "filelist" ) const
00076   {
00077     return this->getString( "DispatcherType", def );
00078   }
00079 
00080   inline double max_output_sandbox_size( double def = 100000000 ) const
00081   {
00082     return this->getDouble( "MaxOutputSandboxSize", def );
00083   }
00084 
00085   inline int log_level( int def = 0 ) const
00086   {
00087     return this->getInt( "LogLevel", def );
00088   }
00089 
00090   inline unsigned int log_rotation_max_file_number( unsigned int def = 5 ) const
00091   {
00092     return static_cast<unsigned int>( this->getInt( "LogRotationMaxFileNumber", def ) );
00093   }
00094 
00095   inline std::streamsize log_file_max_size( std::streamsize def = 100000000 ) const
00096   {
00097     return static_cast<std::streamsize>( this->getInt( "LogFileMaxSize", def ) );
00098   }
00099 
00100   inline std::string log_file( const std::string &def = "" ) const
00101   {
00102     return this->getAndParseFileName( "LogFile", def );
00103   }
00104 
00105   inline std::string log_rotation_base_file( const std::string &def = "[[LogFile]]" ) const
00106   {
00107     return this->getAndParseFileName( "LogRotationBaseFile", def );
00108   }
00109 
00110   inline std::string lock_file( const std::string &def = "" ) const
00111   {
00112     return this->getAndParseFileName( "LockFile", def );
00113   }
00114 
00115 };
00116 
00117 }}}} // edg::workload::common::configuration
00118 
00119 #endif
00120 
00121 // Local Variables:
00122 // mode: c++
00123 // 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