1#ifndef __CMS_CLUSTER__H
2#define __CMS_CLUSTER__H
36#include <netinet/in.h>
124 int sport,
const char *theNID,
const char *theIF);
135 char *Data,
int Dlen=0);
138 void *Data,
int Dlen);
143 void *Data,
int Dlen);
174long long Refs() {
return SelWtot+SelRtot;}
196 int isrw,
int isMulti,
int ifWant);
200void SLock(
bool dolock,
bool wrmode=
true)
202 {
if (wrmode) STMutex.WriteLock();
203 else STMutex.ReadLock();
205 else STMutex.UnLock();
214int Stats(
char *bfr,
int bln);
215int Statt(
char *bfr,
int bln);
222 int sport,
const char *theNID,
const char *theIF);
224int Drop(
int sent,
int sinst,
XrdCmsDrop *djp=0);
225void Record(
char *path,
const char *reason,
bool force=
false);
226bool maxBits(
SMask_t mVec,
int mbits);
228enum {eExists, eDups, eROfs, eNoRep, eNoSel, eNoEnt};
229int SelFail(XrdCmsSelect &Sel,
int rc);
231XrdCmsNode *SelbyCost(
SMask_t, XrdCmsSelector &selR);
232XrdCmsNode *SelbyLoad(
SMask_t, XrdCmsSelector &selR);
233XrdCmsNode *SelbyLoadR(
SMask_t, XrdCmsSelector &selR);
234XrdCmsNode *SelbyRef (
SMask_t, XrdCmsSelector &selR);
235int SelDFS(XrdCmsSelect &Sel,
SMask_t amask,
237void sendAList(XrdLink *lp);
238void setAltMan(
int snum, XrdLink *lp,
int port);
239int Unreachable(XrdCmsSelect &Sel,
bool none);
240int Unuseable(XrdCmsSelect &Sel);
244static const int AltSize = 254;
247XrdCmsNode *NodeTab[
STMax];
248int NodeWeight[
STMax];
260char AltMans[
STMax*AltSize];
unsigned long long SMask_t
#define XRDOUC_ENUM_OPERATORS(T)
XrdSys::RAtomic< long long > RAtomic_llong
SMask_t getMask(const XrdNetAddr *addr)
void SLock(bool dolock, bool wrmode=true)
void Space(XrdCms::SpaceData &sData, SMask_t smask)
int Broadsend(SMask_t smask, XrdCms::CmsRRHdr &Hdr, void *Data, int Dlen)
int Select(XrdCmsSelect &Sel)
int Locate(XrdCmsSelect &Sel)
static const int EReplete
void ResetRef(SMask_t smask, bool isLocked=false)
SMask_t Broadcast(SMask_t, const struct iovec *, int, int tot=0)
XrdCmsSelected * List(SMask_t mask, CmsLSOpts opts, bool &oksel)
static const int RetryErr
XrdCmsNode * Add(XrdLink *lp, int dport, int Status, int sport, const char *theNID, const char *theIF)
static const int NotFound
static const int Wait4CBk
void Remove(XrdCmsNode *theNode)
int Stats(char *bfr, int bln)
virtual void BlackList(XrdOucTList *blP)
int Statt(char *bfr, int bln)
static const int CMS_hasAlts
static const int CMS_isSuper
static const int CMS_noSpace
static const int CMS_noStage
static const int CMS_Lost
static const int CMS_isMan
static const int CMS_Perm
static const int CMS_isVers3
static const int CMS_isPeer
static const int CMS_isProxy
static const int CMS_Suspend
static const int CMS_notServ