xrootd
Loading...
Searching...
No Matches
XrdSsiServReal.hh
Go to the documentation of this file.
1#ifndef __XRDSSISERVREAL_HH__
2#define __XRDSSISERVREAL_HH__
3/******************************************************************************/
4/* */
5/* X r d S s i S e r v R e a l . h h */
6/* */
7/* (c) 2013 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
32#include <map>
33#include <string>
34
37
38class XrdSsiResource;
39class XrdSsiSessReal;
40
42{
43public:
44
46
47void Recycle(XrdSsiSessReal *sObj, bool reuse);
48
49bool Stop(bool immed=false);
50
51void StopReuse(const char *resKey);
52
53 XrdSsiServReal(const char *contact, int hObj)
54 : manNode(strdup(contact)), freeSes(0),
55 freeCnt(0), freeMax(hObj), actvSes(0),
56 doStop(false) {}
57
59private:
60
61XrdSsiSessReal *Alloc(const char *sName, int uent, bool hold);
62bool GenURL(XrdSsiResource *rP, char *buff, int blen, int uEnt);
64 std::string &resKey);
65
66std::map<std::string, XrdSsiSessReal *> resCache;
68
69char *manNode;
75bool doStop;
76};
77#endif
Definition XrdSsiRequest.hh:71
Definition XrdSsiResource.hh:43
Definition XrdSsiServReal.hh:42
XrdSsiSessReal * Alloc(const char *sName, int uent, bool hold)
void ProcessRequest(XrdSsiRequest &reqRef, XrdSsiResource &resRef)
Process a request; client-side or server-side.
void StopReuse(const char *resKey)
bool GenURL(XrdSsiResource *rP, char *buff, int blen, int uEnt)
bool doStop
Definition XrdSsiServReal.hh:75
int freeCnt
Definition XrdSsiServReal.hh:72
std::map< std::string, XrdSsiSessReal * > resCache
Definition XrdSsiServReal.hh:66
XrdSsiSessReal * freeSes
Definition XrdSsiServReal.hh:71
char * manNode
Definition XrdSsiServReal.hh:69
int actvSes
Definition XrdSsiServReal.hh:74
int freeMax
Definition XrdSsiServReal.hh:73
XrdSysMutex rcMutex
Definition XrdSsiServReal.hh:67
void Recycle(XrdSsiSessReal *sObj, bool reuse)
bool ResReuse(XrdSsiRequest &reqRef, XrdSsiResource &resRef, std::string &resKey)
XrdSysMutex myMutex
Definition XrdSsiServReal.hh:70
bool Stop(bool immed=false)
Stop the client-side service. This is never called server-side.
XrdSsiServReal(const char *contact, int hObj)
Definition XrdSsiServReal.hh:53
Definition XrdSsiService.hh:55
Definition XrdSsiSessReal.hh:45
Definition XrdSysPthread.hh:165