#include <XrdSsiFileReq.hh>
|
enum | reqState {
wtReq =0
, xqReq
, wtRsp
, doRsp
,
odRsp
, erRsp
, rsEnd
} |
|
enum | rspState {
isNew =0
, isBegun
, isBound
, isAbort
,
isDone
, isMax
} |
|
|
void | Activate (XrdOucBuffer *oP, XrdSfsXioHandle bR, int rSz) |
|
void | Alert (XrdSsiRespInfoMsg &aMsg) |
| Send or receive a server generated alert.
|
|
void | Finalize () |
|
void | Finished (XrdSsiRequest &rqstR, const XrdSsiRespInfo &rInfo, bool cancel=false) |
|
char * | GetRequest (int &rLen) |
|
bool | ProcessResponse (const XrdSsiErrInfo &eInfo, const XrdSsiRespInfo &resp) |
|
XrdSfsXferSize | Read (bool &done, char *buffer, XrdSfsXferSize blen) |
|
void | RelRequestBuffer () |
|
int | Send (XrdSfsDio *sfDio, XrdSfsXferSize size) |
|
bool | WantResponse (XrdOucErrInfo &eInfo) |
|
void | Done (int &Result, XrdOucErrInfo *cbInfo, const char *path=0) |
|
int | Same (unsigned long long arg1, unsigned long long arg2) |
|
void | DoIt () |
|
| XrdSsiFileReq (const char *cID=0) |
|
virtual | ~XrdSsiFileReq () |
|
bool | Finished (bool cancel=false) |
|
bool | Finished (bool cancel=false) |
|
uint32_t | GetDetachTTL () |
|
std::string | GetEndPoint () |
|
const char * | GetMetadata (int &dlen) |
|
const char * | GetRequestID () |
|
void | GetResponseData (char *buff, int blen) |
|
uint16_t | GetTimeOut () |
|
virtual void | ProcessResponseData (const XrdSsiErrInfo &eInfo, char *buff, int blen, bool last) |
|
void | ReleaseRequestBuffer () |
|
| XrdSsiRequest (const char *reqid=0, uint16_t tmo=0) |
|
| XrdOucEICB () |
| Constructor and destructor.
|
|
virtual | ~XrdOucEICB () |
|
| XrdJob (const char *desc="") |
|
virtual | ~XrdJob () |
|
|
void | BindDone () |
|
void | Dispose () |
|
int | Emsg (const char *pfx, int ecode, const char *op) |
|
int | Emsg (const char *pfx, XrdSsiErrInfo &eObj, const char *op) |
|
void | Init (const char *cID=0) |
|
XrdSfsXferSize | readStrmA (XrdSsiStream *strmP, char *buff, XrdSfsXferSize blen) |
|
XrdSfsXferSize | readStrmP (XrdSsiStream *strmP, char *buff, XrdSfsXferSize blen) |
|
int | sendStrmA (XrdSsiStream *strmP, XrdSfsDio *sfDio, XrdSfsXferSize blen) |
|
void | Recycle () |
|
void | WakeUp (XrdSsiAlert *aP=0) |
|
◆ reqState
Enumerator |
---|
wtReq | |
xqReq | |
wtRsp | |
doRsp | |
odRsp | |
erRsp | |
rsEnd | |
◆ rspState
Enumerator |
---|
isNew | |
isBegun | |
isBound | |
isAbort | |
isDone | |
isMax | |
◆ XrdSsiFileReq()
XrdSsiFileReq::XrdSsiFileReq |
( |
const char * |
cID = 0 | ) |
|
|
inline |
◆ ~XrdSsiFileReq()
virtual XrdSsiFileReq::~XrdSsiFileReq |
( |
| ) |
|
|
inlinevirtual |
◆ Activate()
◆ Alert()
Send or receive a server generated alert.
The Alert() method is used server-side to send one or more alerts before a response is posted (alerts afterwards are ignored). To avoid race conditions, server-side alerts should be sent via the Responder's Alert() method. Clients must implement this method in order to receive alerts.
- Parameters
-
aMsg | Reference to the message object containing the alert message. Non-positive alert lengths cause the alert call to be ignored. You should call the message RecycleMsg() method once you have consumed the message to release its resources. |
Reimplemented from XrdSsiRequest.
◆ Alloc()
◆ BindDone()
void XrdSsiFileReq::BindDone |
( |
| ) |
|
|
privatevirtual |
◆ Dispose()
void XrdSsiFileReq::Dispose |
( |
| ) |
|
|
privatevirtual |
◆ DoIt()
void XrdSsiFileReq::DoIt |
( |
| ) |
|
|
virtual |
◆ Done()
void XrdSsiFileReq::Done |
( |
int & |
Result, |
|
|
XrdOucErrInfo * |
eInfo, |
|
|
const char * |
Path = 0 |
|
) |
| |
|
virtual |
Invoke a callback after an operation completes.
- Parameters
-
Result | - the original function's result (may be changed). |
eInfo | - Associated error information. The eInfo object may not be modified until it's own callback Done() method is called, if supplied. If the callback function in eInfo is zero, then the eInfo object is deleted by the invoked callback. Otherwise, that method must be invoked by this callback function after the actual callback message is sent. This allows the callback requestor to do post-processing and be asynchronous being assured that the callback completed. |
Path | - Optionally, the path related to thid request. It is used for tracing and detailed monitoring purposes. |
Implements XrdOucEICB.
◆ Emsg() [1/2]
int XrdSsiFileReq::Emsg |
( |
const char * |
pfx, |
|
|
int |
ecode, |
|
|
const char * |
op |
|
) |
| |
|
private |
◆ Emsg() [2/2]
int XrdSsiFileReq::Emsg |
( |
const char * |
pfx, |
|
|
XrdSsiErrInfo & |
eObj, |
|
|
const char * |
op |
|
) |
| |
|
private |
◆ Finalize()
void XrdSsiFileReq::Finalize |
( |
| ) |
|
◆ Finished() [1/2]
bool XrdSsiRequest::Finished |
( |
bool |
cancel = false | ) |
|
Indicate that request processing has been finished. This method calls XrdSsiResponder::Finished() on the associated responder object.
Note: This method locks the object's recursive mutex.
- Parameters
-
cancel | False -> the request/response sequence completed normally. True -> the request/response sequence aborted because of an error or the client cancelled the request. |
- Returns
- true Finish accepted. Request object may be reclaimed.
-
false Finish cannot be accepted because this request object is not bound to a responder. This indicates a logic error.
◆ Finished() [2/2]
◆ GetRequest()
char * XrdSsiFileReq::GetRequest |
( |
int & |
dlen | ) |
|
|
virtual |
Obtain the request data sent by a client.
This method is duplicated in XrdSsiResponder to allow calling consistency.
- Parameters
-
dlen | holds the length of the request after the call. |
- Returns
- =0 No request data available, dlen has been set to zero.
-
!0 Pointer to the buffer holding the request, dlen has the length
Implements XrdSsiRequest.
◆ Init()
void XrdSsiFileReq::Init |
( |
const char * |
cID = 0 | ) |
|
|
private |
◆ ProcessResponse()
Notify request that a response is ready to be processed. This method must be supplied by the request object's implementation.
- Parameters
-
eInfo | Error information. You can check if an error occurred using eInfo.hasError() or eInfo.isOK(). |
rInfo | Raw response information. |
- Returns
- true Response processed.
-
false Response could not be processed, the request is not active.
Implements XrdSsiRequest.
◆ Read()
◆ readStrmA()
◆ readStrmP()
◆ Recycle()
void XrdSsiFileReq::Recycle |
( |
| ) |
|
|
private |
◆ RelRequestBuffer()
void XrdSsiFileReq::RelRequestBuffer |
( |
| ) |
|
|
virtual |
Release the request buffer. Use this method to optimize storage use; this is especially relevant for long-running requests. If the request buffer has been consumed and is no longer needed, early return of the buffer will minimize memory usage. This method is also invoked via XrdSsiResponder.
Note: This method is called with the object's recursive mutex locked when it is invoked via XrdSsiResponder's ReleaseRequestBuffer().
Reimplemented from XrdSsiRequest.
◆ Same()
int XrdSsiFileReq::Same |
( |
unsigned long long |
arg1, |
|
|
unsigned long long |
arg2 |
|
) |
| |
|
inlinevirtual |
Determine if two callback arguments refer to the same client.
- Parameters
-
arg1 | - The first callback argument. |
arg2 | - The second callback argument. |
- Returns
- !0 - The arguments refer to the same client.
-
=0 - The arguments refer to the different clients.
Implements XrdOucEICB.
◆ Send()
◆ sendStrmA()
◆ SetMax()
static void XrdSsiFileReq::SetMax |
( |
int |
mVal | ) |
|
|
inlinestatic |
◆ WakeUp()
◆ WantResponse()
◆ [union]
◆ alrtLast
◆ alrtPend
◆ alrtSent
◆ aqMutex
◆ cbInfo
◆ fileP
◆ fileR
◆ fileSz
long long XrdSsiFileReq::fileSz |
◆ finWait
◆ freeCnt
int XrdSsiFileReq::freeCnt |
|
staticprivate |
◆ freeMax
int XrdSsiFileReq::freeMax |
|
staticprivate |
◆ freeReq
◆ frqMutex
◆ haveResp
bool XrdSsiFileReq::haveResp |
|
private |
◆ isEnding
bool XrdSsiFileReq::isEnding |
|
private |
◆ myState
◆ nextReq
◆ oucBuff
◆ reqID
unsigned int XrdSsiFileReq::reqID |
|
private |
◆ reqSize
int XrdSsiFileReq::reqSize |
|
private |
◆ respBuf
char* XrdSsiFileReq::respBuf |
|
private |
◆ respCB
◆ respCBarg
unsigned long long XrdSsiFileReq::respCBarg |
|
private |
◆ respLen
int XrdSsiFileReq::respLen |
◆ respOff
long long XrdSsiFileReq::respOff |
|
private |
◆ respWait
bool XrdSsiFileReq::respWait |
|
private |
◆ rID
char XrdSsiFileReq::rID[8] |
|
private |
◆ schedDone
bool XrdSsiFileReq::schedDone |
|
private |
◆ sessN
const char* XrdSsiFileReq::sessN |
|
private |
◆ sfsBref
◆ strBuff
◆ strmEOF
bool XrdSsiFileReq::strmEOF |
|
private |
◆ tident
char* XrdSsiFileReq::tident |
|
private |
◆ urState
The documentation for this class was generated from the following file: