XrdXrootdGSReal Class Reference
#include <XrdXrootdGSReal.hh>
List of all members.
Detailed Description
This class implements a generic reporter for the XRootD monitoring stream, also known as the G-Stream. It's base class is passed around to various plugins to allow them to add monitoring information into the G-Stream.
Constructor & Destructor Documentation
XrdXrootdGSReal::XrdXrootdGSReal |
( |
const char * |
gNamePI, |
|
|
char |
gDataID, |
|
|
int |
mtype, |
|
|
int |
flint | |
|
) |
| | |
Constructor
- Parameters:
-
| gNamePI | the plugin name. |
| gDataID | the G-Stream identifier associated with all of the data that will be placed in the stream using this object. See XrdXrootdMonData.hh for valid subtypes. |
| mtype | the monitor type for send routing. |
| flint | the autoflush interval. |
XrdXrootdGSReal::~XrdXrootdGSReal |
( |
|
) |
[inline] |
Destructor. Normally, this object is never deleted.
Member Function Documentation
void XrdXrootdGSReal::AutoFlush |
( |
|
) |
[private] |
void XrdXrootdGSReal::DoIt |
( |
|
) |
[virtual] |
void XrdXrootdGSReal::Expel |
( |
int |
dlen |
) |
[private] |
void XrdXrootdGSReal::Flush |
( |
|
) |
|
uint32_t XrdXrootdGSReal::GetDictID |
( |
const char * |
text, |
|
|
bool |
isPath = false | |
|
) |
| | |
Obtain a dictionary ID to map a string to an integer ID. The mapping is automatically sent to the monitor collector for future use using the 'd' or 'i' mapping identifier.
- Parameters:
-
| text | -> the null terminated string to be assigned an ID. The text must be less than or equal to 1024 characters. |
| isPath | when true the text specified a file system path and identified as a XROOTD_MON_MAPPATH item. Otherwise, it is identified as a XROOTD_MON_MAPINFO item. |
- Returns:
- the integer identifier assigned to the string information. The returned value is in network byte order!
Reimplemented from XrdXrootdGStream.
bool XrdXrootdGSReal::Insert |
( |
int |
dlen |
) |
|
Insert information into the G-Stream using the data placed in the buffer space obtained by a previous call to Reserve(). Upon return, this object is unlocked.
- Parameters:
-
| dlen | the number of bytes actually present in the buffer. The text must end with a null byte and dlen must be 8 <= dlen <= dlen used in the previous Reserve() call. |
- Returns:
- true data included.
-
false data rejected; invalid length or no buffer outstanding.
Reimplemented from XrdXrootdGStream.
bool XrdXrootdGSReal::Insert |
( |
const char * |
data, |
|
|
int |
dlen | |
|
) |
| | |
Insert information into the G-Stream.
- Parameters:
-
| data | -> to null-terminated text to be included in the G-Stream. |
| dlen | the length of the text *including* the null character. Requires that (8 <= dlen <= MaxDataLen); defined below. |
- Returns:
- true data included.
-
false data rejected; invalid length or is not null terminated.
Reimplemented from XrdXrootdGStream.
char* XrdXrootdGSReal::Reserve |
( |
int |
dlen |
) |
|
Obtain a buffer space for information. This object is locked and no other thread can insert information until the buffer is inserted using Insert().
- Parameters:
-
| dlen | the number of bytes required to be available for use. Requires that (8 <= dlen <= MaxDataLen); defined below. |
- Returns:
- !0 pointer to a dlen sized buffer.
-
=0 invalid length specified or a buffer is outstanding.
Reimplemented from XrdXrootdGStream.
int XrdXrootdGSReal::SetAutoFlush |
( |
int |
afsec |
) |
|
Set autoflush time interval (or disable it). Disabling autoflush may be useful when data is periodically generated at a low rate and manual flushing would produce more consistent results.
- Parameters:
-
| afsec | Number of seconds between autoflushing. A zero or negative value disables autoflush. The default is 600 seconds (i.e. 10 minutes) subject to what is specified via the xrootd.monitor flush directive. Positive values less that 60 are considered to be 60. |
- Returns:
- The previous auto-flush setting.
Reimplemented from XrdXrootdGStream.
Member Data Documentation
The documentation for this class was generated from the following file: