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

WMConfiguration.h

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 = 1 ) 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 std::string input( const std::string &def = "${EDG_WL_TMP}/workload_manager/input.fl" ) const
00066   {
00067     return this->getAndParseFileName( "Input", def );
00068   }
00069 
00070   inline std::string dispatcher_type( const std::string &def = "filelist" ) const
00071   {
00072     return this->getString( "DispatcherType", def );
00073   }
00074 
00075   inline int log_level( int def = 0 ) const
00076   {
00077     return this->getInt( "LogLevel", def );
00078   }
00079 
00080   inline unsigned int log_rotation_max_file_number( unsigned int def = 5 ) const
00081   {
00082     return static_cast<unsigned int>( this->getInt( "LogRotationMaxFileNumber", def ) );
00083   }
00084 
00085   inline std::streamsize log_file_max_size( std::streamsize def = 100000000 ) const
00086   {
00087     return static_cast<std::streamsize>( this->getInt( "LogFileMaxSize", def ) );
00088   }
00089 
00090   inline std::string log_file( const std::string &def = "" ) const
00091   {
00092     return this->getAndParseFileName( "LogFile", def );
00093   }
00094 
00095   inline std::string log_rotation_base_file( const std::string &def = "[[LogFile]]" ) const
00096   {
00097     return this->getAndParseFileName( "LogRotationBaseFile", def );
00098   }
00099 
00100   inline std::string lock_file( const std::string &def = "" ) const
00101   {
00102     return this->getAndParseFileName( "LockFile", def );
00103   }
00104 
00105 };
00106 
00107 }}}} // edg::workload::common::configuration
00108 
00109 #endif
00110 
00111 // Local Variables:
00112 // mode: c++
00113 // End:

Generated on Fri May 14 14:18:26 2004 for COMMON API - configuration, jobid, ldif2classadi, logger, process, requestad, socket++i, task, utilities by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002