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
35
#include "
XrdSsi/XrdSsiService.hh
"
36
#include "
XrdSys/XrdSysPthread.hh
"
37
38
class
XrdSsiResource
;
39
class
XrdSsiSessReal
;
40
41
class
XrdSsiServReal
:
public
XrdSsiService
42
{
43
public
:
44
45
void
ProcessRequest
(
XrdSsiRequest
&reqRef,
XrdSsiResource
&resRef);
46
47
void
Recycle
(
XrdSsiSessReal
*sObj,
bool
reuse);
48
49
bool
Stop
(
bool
immed=
false
);
50
51
void
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
58
~XrdSsiServReal
();
59
private
:
60
61
XrdSsiSessReal
*Alloc(
const
char
*sName,
int
uent,
bool
hold);
62
bool
GenURL(
XrdSsiResource
*rP,
char
*buff,
int
blen,
int
uEnt);
63
bool
ResReuse(
XrdSsiRequest
&reqRef,
XrdSsiResource
&resRef,
64
std::string &resKey);
65
66
std::map<std::string, XrdSsiSessReal *> resCache;
67
XrdSysMutex
rcMutex;
68
69
char
*manNode;
70
XrdSysMutex
myMutex;
71
XrdSsiSessReal
*freeSes;
72
int
freeCnt;
73
int
freeMax;
74
int
actvSes;
75
bool
doStop;
76
};
77
#endif
XrdSsiService.hh
XrdSysPthread.hh
XrdSsiRequest
Definition
XrdSsiRequest.hh:71
XrdSsiResource
Definition
XrdSsiResource.hh:43
XrdSsiServReal::ProcessRequest
void ProcessRequest(XrdSsiRequest &reqRef, XrdSsiResource &resRef)
Process a request; client-side or server-side.
Definition
XrdSsiServReal.cc:170
XrdSsiServReal::~XrdSsiServReal
~XrdSsiServReal()
Definition
XrdSsiServReal.cc:61
XrdSsiServReal::StopReuse
void StopReuse(const char *resKey)
Definition
XrdSsiServReal.cc:342
XrdSsiServReal::Recycle
void Recycle(XrdSsiSessReal *sObj, bool reuse)
Definition
XrdSsiServReal.cc:242
XrdSsiServReal::Stop
bool Stop(bool immed=false)
Stop the client-side service. This is never called server-side.
Definition
XrdSsiServReal.cc:322
XrdSsiServReal::XrdSsiServReal
XrdSsiServReal(const char *contact, int hObj)
Definition
XrdSsiServReal.hh:53
XrdSsiService::XrdSsiService
XrdSsiService()
Constructor.
Definition
XrdSsiService.hh:181
XrdSsiSessReal
Definition
XrdSsiSessReal.hh:45
XrdSysMutex
Definition
XrdSysPthread.hh:165
XrdSsi
XrdSsiServReal.hh
Generated by
1.13.2