xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdMon
XrdMonBufferedOutput.hh
Go to the documentation of this file.
1
/*****************************************************************************/
2
/* */
3
/* XrdMonBufferedOutput.hh */
4
/* */
5
/* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */
6
/* All Rights Reserved */
7
/* Produced by Jacek Becla for Stanford University under contract */
8
/* DE-AC02-76SF00515 with the Department of Energy */
9
/*****************************************************************************/
10
11
// $Id$
12
13
#ifndef XRDMONBUFFEREDOUTPUT_HH
14
#define XRDMONBUFFEREDOUTPUT_HH
15
16
#include "
XrdSys/XrdSysPthread.hh
"
17
#include <string>
18
using
std::string;
19
20
class
XrdMonBufferedOutput
{
21
public
:
22
XrdMonBufferedOutput
(
const
char
* outFileName,
23
const
char
* lockFileName,
24
int
bufSize);
25
~XrdMonBufferedOutput
();
26
27
void
add
(
const
char
* s);
28
void
flush
(
bool
lockMutex=
true
);
29
30
private
:
31
char
*
_fName
;
32
char
*
_fNameLock
;
33
34
char
*
_buf
;
35
const
int
_bufSize
;
// flush when buffer is full, or when
36
// triggered by external thread
37
XrdSysMutex
_mutex
;
38
};
39
40
#endif
/* XRDMONBUFFEREDOUTPUT_HH */
Generated by
1.8.3.1