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

XrdCmsClientConfig.hh

Go to the documentation of this file.
00001 #ifndef _CMS_CLIENTCONFIG_H
00002 #define _CMS_CLIENTCONFIG_H
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                 X r d C m s C l i e n t C o n f i g . h h                  */
00006 /*                                                                            */
00007 /* (c) 2007 by the Board of Trustees of the Leland Stanford, Jr., University  */
00008 /*                            All Rights Reserved                             */
00009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00010 /*              DE-AC02-76-SFO0515 with the Department of Energy              */
00011 /******************************************************************************/
00012 
00013 #include "XrdOuc/XrdOucTList.hh"
00014 #include "XrdOuc/XrdOuca2x.hh"
00015   
00016 class XrdOucStream;
00017 class XrdSysError;
00018 
00019 #define ODC_FAILOVER 'f'
00020 #define ODC_ROUNDROB 'r'
00021   
00022 class XrdCmsClientConfig
00023 {
00024 public:
00025 
00026 enum configHow  {configMeta   = 1, configNorm  = 2, configProxy  = 4};
00027 enum configWhat {configMan    = 1, configSuper = 2, configServer = 4};
00028 
00029 int           Configure(char *cfn, configWhat What, configHow How);
00030 
00031 int           ConWait;      // Seconds to wait for a manager connection
00032 int           RepWait;      // Seconds to wait for manager replies
00033 int           RepWaitMS;    // RepWait*1000 for poll()
00034 int           RepDelay;     // Seconds to delay before retrying manager
00035 int           RepNone;      // Max number of consecutive non-responses
00036 int           PrepWait;     // Millisecond wait between prepare requests
00037 int           FwdWait;      // Millisecond wait between foward  requests
00038 int           haveMeta;     // Have a meta manager (only if we are a manager)
00039 
00040 char         *CMSPath;      // Path to the local cmsd for target nodes
00041 char         *myHost;
00042 const char   *myName;
00043 
00044 XrdOucTList  *ManList;      // List of managers for remote redirection
00045 XrdOucTList  *PanList;      // List of managers for proxy  redirection
00046 unsigned char SMode;        // Manager selection mode
00047 unsigned char SModeP;       // Manager selection mode (proxy)
00048 
00049 enum {FailOver = 'f', RoundRob = 'r'};
00050 
00051       XrdCmsClientConfig() : ConWait(10), RepWait(3),  RepWaitMS(3000),
00052                              RepDelay(5), RepNone(8),  PrepWait(33),
00053                              FwdWait(0),  haveMeta(0), CMSPath(0),
00054                              myHost(0),   myName(0),
00055                              ManList(0),  PanList(0),
00056                              SMode(FailOver), SModeP(FailOver), isMeta(0) {}
00057      ~XrdCmsClientConfig();
00058 
00059 private:
00060 int isMeta;   // We are  a meta manager
00061 int isMan;    // We are  a      manager
00062 
00063 int ConfigProc(char *cfn);
00064 int ConfigXeq(char *var, XrdOucStream &Config);
00065 int xapath(XrdOucStream &Config);
00066 int xconw(XrdOucStream  &Config);
00067 int xmang(XrdOucStream  &Config);
00068 int xreqs(XrdOucStream  &Config);
00069 int xtrac(XrdOucStream  &Config);
00070 };
00071 #endif

Generated on Sun Nov 6 13:35:16 2011 for xrootd by  doxygen 1.3.9.1