xrootd
Loading...
Searching...
No Matches
XrdSsiRRAgent.hh
Go to the documentation of this file.
1#ifndef __XRDSSIRRAGENT_HH__
2#define __XRDSSIRRAGENT_HH__
3/******************************************************************************/
4/* */
5/* X r d S s i R R A g e n t . h h */
6/* */
7/* (c) 2017 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* Produced by Andrew Hanushevsky for Stanford University under contract */
9/* DE-AC02-76-SFO0515 with the Department of Energy */
10/* */
11/* This file is part of the XRootD software suite. */
12/* */
13/* XRootD is free software: you can redistribute it and/or modify it under */
14/* the terms of the GNU Lesser General Public License as published by the */
15/* Free Software Foundation, either version 3 of the License, or (at your */
16/* option) any later version. */
17/* */
18/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
19/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
20/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
21/* License for more details. */
22/* */
23/* You should have received a copy of the GNU Lesser General Public License */
24/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
25/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
26/* */
27/* The copyright holder's institutional names and contributor's names may not */
28/* be used to endorse or promote products derived from this software without */
29/* specific prior written permission of the institution or contributor. */
30/******************************************************************************/
31
34
35class XrdSsiMuex;
36
38{
39public:
40
41static void Alert(XrdSsiRequest &reqR, XrdSsiRespInfoMsg &aMsg)
42 {reqR.Alert(aMsg);}
43
44static void CleanUp(XrdSsiRequest &reqR) {reqR.CleanUp();}
45
46static void Dispose(XrdSsiRequest &reqR) {reqR.Dispose();}
47
49
50static bool isaRetry(XrdSsiRequest *rP, bool reset=false)
52 {if (reset)
54 return true;
55 }
56 return false;
57 }
58
59static void onServer(XrdSsiRequest *rP) {rP->onClient = false;}
60
61static XrdSsiRequest *Request(XrdSsiResponder *rP) {return rP->reqP;}
62
63static XrdSsiRespInfo *RespP(XrdSsiRequest *rP) {return &(rP->Resp);}
64
65static void SetNode(XrdSsiRequest *rP, const char *name)
66 {rP->epNode = name;}
67
69 {rP->spMutex.Lock();
70 rP->reqP = 0;
71 rP->spMutex.UnLock();
72 }
73
74static void SetMutex(XrdSsiRequest *rP, XrdSsiMutex *mP)
75 {rP->rrMutex = mP;}
76};
77#endif
Definition XrdSsiErrInfo.hh:41
Definition XrdSsiAtomics.hh:110
void UnLock()
Definition XrdSsiAtomics.hh:117
void Lock()
Definition XrdSsiAtomics.hh:115
Definition XrdSsiRRAgent.hh:38
static void Dispose(XrdSsiRequest &reqR)
Definition XrdSsiRRAgent.hh:46
static void SetMutex(XrdSsiRequest *rP, XrdSsiMutex *mP)
Definition XrdSsiRRAgent.hh:74
static XrdSsiRequest * Request(XrdSsiResponder *rP)
Definition XrdSsiRRAgent.hh:61
static bool isaRetry(XrdSsiRequest *rP, bool reset=false)
Definition XrdSsiRRAgent.hh:50
static void onServer(XrdSsiRequest *rP)
Definition XrdSsiRRAgent.hh:59
static XrdSsiRespInfo * RespP(XrdSsiRequest *rP)
Definition XrdSsiRRAgent.hh:63
static void Alert(XrdSsiRequest &reqR, XrdSsiRespInfoMsg &aMsg)
Definition XrdSsiRRAgent.hh:41
static XrdSsiErrInfo & ErrInfoRef(XrdSsiRequest *rP)
Definition XrdSsiRRAgent.hh:48
static void ResetResponder(XrdSsiResponder *rP)
Definition XrdSsiRRAgent.hh:68
static void CleanUp(XrdSsiRequest &reqR)
Definition XrdSsiRRAgent.hh:44
static void SetNode(XrdSsiRequest *rP, const char *name)
Definition XrdSsiRRAgent.hh:65
Definition XrdSsiRequest.hh:71
char flags
Definition XrdSsiRequest.hh:315
virtual void Dispose()
Definition XrdSsiRequest.hh:303
static const int isaRetry
Definition XrdSsiRequest.hh:316
bool onClient
Definition XrdSsiRequest.hh:314
virtual void Alert(XrdSsiRespInfoMsg &aMsg)
Send or receive a server generated alert.
Definition XrdSsiRequest.hh:238
const char * epNode
Definition XrdSsiRequest.hh:311
XrdSsiErrInfo errInfo
Definition XrdSsiRequest.hh:309
XrdSsiRespInfo Resp
Definition XrdSsiRequest.hh:308
XrdSsiMutex * rrMutex
Definition XrdSsiRequest.hh:306
Definition XrdSsiRespInfo.hh:87
Definition XrdSsiResponder.hh:69
XrdSsiRequest * reqP
Definition XrdSsiResponder.hh:262
XrdSsiMutex spMutex
Definition XrdSsiResponder.hh:261
Definition XrdSsiRespInfo.hh:44