xrootd
XrdXrootdGSReal.hh
Go to the documentation of this file.
1 #ifndef __XRDXROOTDGSREAL_HH_
2 #define __XRDXROOTDGSREAL_HH_
3 /******************************************************************************/
4 /* */
5 /* X r d X r o o t d G S R e a l . h h */
6 /* */
7 /* (c) 2019 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* All Rights Reserved */
9 /* Produced by Andrew Hanushevsky for Stanford University under contract */
10 /* DE-AC02-76-SFO0515 with the Department of Energy */
11 /* */
12 /* This file is part of the XRootD software suite. */
13 /* */
14 /* XRootD is free software: you can redistribute it and/or modify it under */
15 /* the terms of the GNU Lesser General Public License as published by the */
16 /* Free Software Foundation, either version 3 of the License, or (at your */
17 /* option) any later version. */
18 /* */
19 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22 /* License for more details. */
23 /* */
24 /* You should have received a copy of the GNU Lesser General Public License */
25 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27 /* */
28 /* The copyright holder's institutional names and contributor's names may not */
29 /* be used to endorse or promote products derived from this software without */
30 /* specific prior written permission of the institution or contributor. */
31 /******************************************************************************/
32 
33 #include "Xrd/XrdJob.hh"
34 #include "XrdSys/XrdSysPthread.hh"
38 
39 //-----------------------------------------------------------------------------
43 //-----------------------------------------------------------------------------
44 
45 class XrdXrootdGSReal : public XrdJob, public XrdXrootdGStream
46 {
47 public:
48 
49 void DoIt(); // XrdJob override
50 
51 void Flush();
52 
53 uint32_t GetDictID(const char *text, bool isPath=false);
54 
55 bool Insert(const char *data, int dlen);
56 
57 bool Insert(int dlen);
58 
59 char *Reserve(int dlen);
60 
61 int SetAutoFlush(int afsec);
62 
63 //-----------------------------------------------------------------------------
72 //-----------------------------------------------------------------------------
73 
74  XrdXrootdGSReal(const char *gNamePI, char gDataID,
75  int mtype, int flint);
76 
77 //-----------------------------------------------------------------------------
79 //-----------------------------------------------------------------------------
80 
82 
83 private:
84 
85 void AutoFlush();
86 void Expel(int dlen);
87 
89 char *udpBFirst;
90 char *udpBNext;
91 char *udpBEnd;
93 int monType;
94 int afTime;
95 bool afRunning;
96 
98 
100  char buff[64536-sizeof(info)];
101  } gMsg;
102 };
103 #endif
Definition: XrdXrootdGSReal.hh:45
char * udpBEnd
Definition: XrdXrootdGSReal.hh:91
Definition: XrdSysPthread.hh:239
int afTime
Definition: XrdXrootdGSReal.hh:94
uint32_t GetDictID(const char *text, bool isPath=false)
bool Insert(const char *data, int dlen)
int monType
Definition: XrdXrootdGSReal.hh:93
XrdXrootdMonitor::User gMon
Definition: XrdXrootdGSReal.hh:97
struct XrdXrootdGSReal::GStream gMsg
void Expel(int dlen)
Definition: XrdXrootdMonitor.hh:141
Definition: XrdXrootdGSReal.hh:99
int rsvbytes
Definition: XrdXrootdGSReal.hh:92
bool afRunning
Definition: XrdXrootdGSReal.hh:95
~XrdXrootdGSReal()
Destructor. Normally, this object is never deleted.
Definition: XrdXrootdGSReal.hh:81
char * udpBNext
Definition: XrdXrootdGSReal.hh:90
Definition: XrdXrootdMonData.hh:80
Definition: XrdXrootdGStream.hh:43
int SetAutoFlush(int afsec)
char * Reserve(int dlen)
XrdXrootdGSReal(const char *gNamePI, char gDataID, int mtype, int flint)
XrdXrootdMonGS info
Definition: XrdXrootdGSReal.hh:99
XrdSysRecMutex gMutex
Definition: XrdXrootdGSReal.hh:88
char buff[64536-sizeof(info)]
Definition: XrdXrootdGSReal.hh:100
char * udpBFirst
Definition: XrdXrootdGSReal.hh:89
Definition: XrdJob.hh:42