policyHelper.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 #ifndef POLICYHELPER_H
00009 #define POLICYHELPER_H
00010 
00011 #include <cadef.h>
00012 #include "helper.h"
00013 #include "defines.h"
00014 #include "hashConduit.h"
00015 #include "hashConduitGroup.h"
00016 #include "conduitFriends.h"
00017 
00018 class PolicyHelper : Helper
00019 {
00020 private:
00021     CAFEStatus cafeStatus;
00022     cafeConduit_set::iterator itcs;
00023                 cafeGroup_set::iterator itgs;
00024 public:
00025      PolicyHelper(){};
00026     ~PolicyHelper(){};
00027 
00028           int  getChannelGetActionWhenMonitorPolicy(unsigned int _handle, ChannelGetActionWhenMonitorPolicy & awmp);
00029           int  setChannelGetActionWhenMonitorPolicy(unsigned int _handle, ChannelGetActionWhenMonitorPolicy awmp);
00030           int  setChannelGetActionWhenMonitorPolicy(ChannelGetActionWhenMonitorPolicy awmp);
00031           int  setChannelGetActionWhenMonitorPolicyAllHandles(ChannelGetActionWhenMonitorPolicy awmp){
00032                 return  setChannelGetActionWhenMonitorPolicy(awmp);}
00033 
00034           int  getChannelGetCacheWaitPolicy(unsigned int  _handle, ChannelGetCacheWaitPolicy & cwp);
00035           int  setChannelGetCacheWaitPolicy(unsigned int  _handle, ChannelGetCacheWaitPolicy  cwp);
00036           int  setChannelGetCacheWaitPolicy(ChannelGetCacheWaitPolicy  cwp);
00037           int  setChannelGetCacheWaitPolicyAllHandles(ChannelGetCacheWaitPolicy  cwp){
00038                 return  setChannelGetCacheWaitPolicy(cwp);}
00039 
00040     int  getChannelRequestDataTypePolicy(unsigned int  _handle, ChannelRequestDataTypePolicy &crdtp);
00041     int  setChannelRequestDataTypePolicy(unsigned int  _handle, ChannelRequestDataTypePolicy crdtp);
00042     int  setChannelRequestDataTypePolicy(ChannelRequestDataTypePolicy crdtp);
00043           int  setChannelRequestDataTypePolicyAllHandles(ChannelRequestDataTypePolicy crdtp){
00044                                                                                                                                         return  setChannelRequestDataTypePolicy(crdtp);}
00045 
00046     int  getChannelRequestPolicyGet (unsigned int  _handle, ChannelRequestPolicy & crpg);
00047     int  setChannelRequestPolicyGet (unsigned int  _handle, ChannelRequestPolicy crpg);
00048     int  setChannelRequestPolicyGet (ChannelRequestPolicy crpg);
00049           int  setChannelRequestPolicyGetAllHandles (ChannelRequestPolicy crpg) {return setChannelRequestPolicyGet (crpg);}
00050         
00051     int  getChannelRequestPolicyPut (unsigned int  _handle, ChannelRequestPolicy & crpp);
00052     int  setChannelRequestPolicyPut (unsigned int  _handle, ChannelRequestPolicy crpp);
00053     int  setChannelRequestPolicyPut (ChannelRequestPolicy crpp);
00054           int  setChannelRequestPolicyPutAllHandles (ChannelRequestPolicy crpp) {return setChannelRequestPolicyPut (crpp);}
00055 
00056     int  getChannelTimeoutPolicyGet (unsigned int  _handle, ChannelTimeoutPolicy & ctpg);
00057     int  setChannelTimeoutPolicyGet (unsigned int  _handle, ChannelTimeoutPolicy ctpg);
00058 
00059     int  getChannelTimeoutPolicyPut (unsigned int  _handle, ChannelTimeoutPolicy & ctpp);
00060     int  setChannelTimeoutPolicyPut (unsigned int  _handle, ChannelTimeoutPolicy ctpp);
00061 
00062 
00063           int  setSelfGoverningTimeout(bool b);
00064           int  setSelfGoverningTimeout(unsigned int _handle, bool b);
00065           int  setSelfGoverningTimeoutPut(unsigned int _handle, bool p);
00066           int  setSelfGoverningTimeoutGet(unsigned int _handle, bool g);
00067           int  getSelfGoverningTimeout(unsigned int _handle, bool &p, bool &g);
00068 
00069           int  setSGSelfGoverningTimeout(bool b);
00070           int  setSGSelfGoverningTimeout(unsigned int _handle, bool b);
00071           int  setSGSelfGoverningTimeoutPut(unsigned int _handle, bool p);
00072           int  setSGSelfGoverningTimeoutGet(unsigned int _handle, bool g);
00073           int  getSGSelfGoverningTimeout(unsigned int _handle, bool &p, bool &g);
00074 
00075     //Short cuts
00076     //put, get, put, get
00077     int  getTimeoutRange (double &p, double &p2, double &g, double &g2) { int  stp; int  stg;
00078             stp=getTimeoutMin(p,g);  stg=getTimeoutMax(p2, g2);
00079             if (stp!=ICAFE_NORMAL){return stp;} else if(stg!=ICAFE_NORMAL){return stg;}
00080             else {return ICAFE_NORMAL;}
00081     };
00082 
00083     int  getTimeoutMin (double &p, double &g);
00084     int  getTimeoutMax (double &p, double &g);
00085 
00086     int  getTimeout (unsigned int  _handle, double &p, double &g);
00087     //returns lesser of the two
00088     int  getTimeout (unsigned int  _handle, double &pg) {double p; double g; int  st;
00089                      st=getTimeout(_handle, p, g); pg=std::min(p,g); return st;}
00090     int  getTimeoutPut(unsigned int  _handle, double &p) {double g; return getTimeout(_handle, p, g);}
00091     int  getTimeoutGet(unsigned int  _handle, double &g) {double p; return getTimeout(_handle, p, g);}
00092 
00093     int  printTimeout ();
00094     int  printTimeout (unsigned int  _handle);
00095 
00096     int  setTimeout   (double p, double g); // for all handles put and get separately
00097     int  setTimeout   (double pg){return setTimeout(pg, pg);};
00098     int  setTimeoutPut(double p) {return setTimeout(p, (double) NULL);};
00099     int  setTimeoutGet(double g) {return setTimeout((double) NULL, g);};
00100 
00101     int  setTimeout   (unsigned int  _handle, double p, double g);
00102     int  setTimeout   (unsigned int  _handle, double pg){return setTimeout(_handle, pg, pg); };
00103     int  setTimeoutPut(unsigned int  _handle, double p) {return setTimeout(_handle, p, (double) NULL);};
00104     int  setTimeoutGet(unsigned int  _handle, double g) {return setTimeout(_handle, (double) NULL, g);};
00105     int  setTimeoutToDefault(unsigned int  _handle);
00106                 int  setTimeoutToDefault(); 
00107 
00108           //get SGTimeout
00109                 int  getSGTimeoutRange (double &p, double &p2, double &g, double &g2) { int  stp; int  stg;
00110             stp=getSGTimeoutMin(p,g);  stg=getSGTimeoutMax(p2, g2);
00111             if (stp!=ICAFE_NORMAL){return stp;} else if(stg!=ICAFE_NORMAL){return stg;}
00112             else {return ICAFE_NORMAL;}
00113     };
00114                 
00115                 int  getSGTimeoutMin (double &p, double &g);
00116     int  getSGTimeoutMax (double &p, double &g);   
00117                 int  printSGTimeout ();
00118     int  printSGTimeout (unsigned int  _handle);         
00119                          
00120                         
00121     int  getSGTimeout (unsigned int  _handle, double &p, double &g);
00122     //returns lesser of the two
00123     int  getSGTimeout (unsigned int  _handle, double &pg) {double p; double g; int  st;
00124                      st=getSGTimeout(_handle, p, g); pg=std::min(p,g); return st;}
00125     int  getSGTimeoutPut(unsigned int  _handle, double &p) {double g; return getSGTimeout(_handle, p, g);}
00126     int  getSGTimeoutGet(unsigned int  _handle, double &g) {double p; return getSGTimeout(_handle, p, g);}
00127 
00128 
00129                 //set SGTimeout
00130                 int  setSGTimeout   (double p, double g); // for all group handles put and get separately
00131     int  setSGTimeout   (double pg){return setSGTimeout(pg, pg);};
00132     int  setSGTimeoutPut(double p) {return setSGTimeout(p, (double) NULL);};
00133     int  setSGTimeoutGet(double g) {return setSGTimeout((double) NULL, g);};
00134                 int  setSGTimeout   (unsigned int  _gHandle, double p, double g);
00135     int  setSGTimeout   (unsigned int  _gHandle, double pg){return setSGTimeout(_gHandle, pg, pg); };
00136     int  setSGTimeoutPut(unsigned int  _gHandle, double p) {return setSGTimeout(_gHandle, p, (double) NULL);};
00137     int  setSGTimeoutGet(unsigned int  _gHandle, double g) {return setSGTimeout(_gHandle, (double) NULL, g);};
00138 
00139     int  setSGTimeoutToDefault(unsigned int  _handle);
00140                 int  setSGTimeoutToDefault();
00141 
00142 
00143 };
00144 #endif

Generated on 28 May 2018 for CAFE by  doxygen 1.6.1