XrdClientConn Class Reference

#include <XrdClientConn.hh>

Collaboration diagram for XrdClientConn:
Collaboration graph
[legend]

List of all members.

Classes

struct  SessionIDInfo

Public Types

enum  ESrvErrorHandlerRetval {
  kSEHRReturnMsgToCaller = 0, kSEHRBreakLoop = 1, kSEHRContinue = 2, kSEHRReturnNoMsgToCaller = 3,
  kSEHRRedirLimitReached = 4
}
enum  EThreeStateReadHandler { kTSRHReturnMex = 0, kTSRHReturnNullMex = 1, kTSRHContinue = 2 }

Public Member Functions

 XrdClientConn ()
virtual ~XrdClientConn ()
bool CacheWillFit (long long bytes)
bool CheckHostDomain (XrdOucString hostToCheck)
short Connect (XrdClientUrlInfo Host2Conn, XrdClientAbsUnsolMsgHandler *unsolhandler)
void Disconnect (bool ForcePhysicalDisc)
virtual bool GetAccessToSrv ()
XReqErrorType GoBackToRedirector ()
XrdOucString GetClientHostDomain ()
long GetDataFromCache (const void *buffer, long long begin_offs, long long end_offs, bool PerfCalc, XrdClientIntvList &missingblks, long &outstandingblks)
bool SubmitDataToCache (XrdClientMessage *xmsg, long long begin_offs, long long end_offs)
bool SubmitRawDataToCache (const void *buffer, long long begin_offs, long long end_offs)
void SubmitPlaceholderToCache (long long begin_offs, long long end_offs)
void RemoveAllDataFromCache (bool keepwriteblocks=true)
void RemoveDataFromCache (long long begin_offs, long long end_offs, bool remove_overlapped=false)
void RemovePlaceholdersFromCache ()
void PrintCache ()
bool GetCacheInfo (int &size, long long &bytessubmitted, long long &byteshit, long long &misscount, float &missrate, long long &readreqcnt, float &bytesusefulness)
void SetCacheSize (int CacheSize)
void SetCacheRmPolicy (int RmPolicy)
void UnPinCacheBlk (long long begin_offs, long long end_offs)
int GetLogConnID () const
ERemoteServerType GetServerType () const
kXR_unt16 GetStreamID () const
XrdClientUrlInfoGetLBSUrl ()
XrdClientUrlInfoGetMetaUrl ()
XrdClientUrlInfo GetCurrentUrl ()
XrdClientUrlInfo GetRedirUrl ()
XErrorCode GetOpenError () const
virtual XReqErrorType GoToAnotherServer (XrdClientUrlInfo &newdest)
virtual XReqErrorType GoToMetaManager ()
bool IsConnected () const
bool IsPhyConnConnected ()
void ClearLastServerError ()
UnsolRespProcResult ProcessAsynResp (XrdClientMessage *unsolmsg)
virtual bool SendGenCommand (ClientRequest *req, const void *reqMoreData, void **answMoreDataAllocated, void *answMoreData, bool HasToAlloc, char *CmdName, int substreamid=0)
int GetOpenSockFD () const
void SetClientHostDomain (const char *src)
void SetConnected (bool conn)
void SetOpenError (XErrorCode err)
int GetParallelStreamToUse (int reqsperstream)
int GetParallelStreamCount ()
void SetRedirHandler (XrdClientAbs *rh)
void SetRequestedDestHost (char *newh, kXR_int32 port)
void SetREQPauseState (kXR_int32 wsec)
void SetREQDelayedConnectState (kXR_int32 wsec)
void SetSID (kXR_char *sid)
void SetUrl (XrdClientUrlInfo thisUrl)
XReqErrorType WriteToServer_Async (ClientRequest *req, const void *reqMoreData, int substreamid=0)
void GetSessionID (SessionIDInfo &sess)
long GetServerProtocol ()
short GetMaxRedirCnt () const
void SetMaxRedirCnt (short mx)
short GetRedirCnt () const
bool DoWriteSoftCheckPoint ()
bool DoWriteHardCheckPoint ()
void UnPinCacheBlk ()
void SetOpTimeLimit (int delta_secs)
bool IsOpTimeLimitElapsed (time_t timenow)

Static Public Member Functions

static XrdClientPhyConnectionGetPhyConn (int LogConnID)
static XrdClientConnectionMgrGetConnectionMgr ()
static void DelSessionIDRepo ()

Public Attributes

int fLastDataBytesRecv
int fLastDataBytesSent
XErrorCode fOpenError
XrdOucString fRedirOpaque
struct ServerResponseHeader LastServerResp
struct ServerResponseBody_Error LastServerError
XrdOucString fRedirCGI

Protected Member Functions

void SetLogConnID (int cid)
void SetStreamID (kXR_unt16 sid)

Protected Attributes

XrdClientAbsUnsolMsgHandlerfUnsolMsgHandler
XrdClientUrlInfo fUrl
XrdClientUrlInfofLBSUrl
XrdClientUrlInfo fREQUrl
short fGlobalRedirCnt

Private Member Functions

bool CheckErrorStatus (XrdClientMessage *, short &, char *)
void CheckPort (int &port)
void CheckREQPauseState ()
void CheckREQConnectWaitState ()
bool CheckResp (struct ServerResponseHeader *resp, const char *method)
XrdClientMessageClientServerCmd (ClientRequest *req, const void *reqMoreData, void **answMoreDataAllocated, void *answMoreData, bool HasToAlloc, int substreamid=0)
XrdSecProtocolDoAuthentication (char *plist, int plsiz)
ERemoteServerType DoHandShake (short log)
bool DoLogin ()
bool DomainMatcher (XrdOucString dom, XrdOucString domlist)
XrdOucString GetDomainToMatch (XrdOucString hostname)
ESrvErrorHandlerRetval HandleServerError (XReqErrorType &, XrdClientMessage *, ClientRequest *)
bool MatchStreamid (struct ServerResponseHeader *ServerResponse)
bool PanicClose ()
XrdOucString ParseDomainFromHostname (XrdOucString hostname)
XrdClientMessageReadPartialAnswer (XReqErrorType &, size_t &, ClientRequest *, bool, void **, EThreeStateReadHandler &)
XReqErrorType WriteToServer (ClientRequest *req, const void *reqMoreData, short LogConnID, int substreamid=0)
bool WaitResp (int secsmax)

Private Attributes

bool fConnected
bool fGettingAccessToSrv
time_t fGlobalRedirLastUpdateTimestamp
int fLogConnID
kXR_unt16 fPrimaryStreamid
short fMaxGlobalRedirCnt
XrdClientReadCachefMainReadCache
time_t fOpTimeLimit
XrdClientAbsfRedirHandler
XrdOucString fRedirInternalToken
XrdSysCondVarfREQWaitResp
ServerResponseBody_Attn_asynrespfREQWaitRespData
time_t fREQWaitTimeLimit
XrdSysCondVarfREQWait
time_t fREQConnectWaitTimeLimit
XrdSysCondVarfREQConnectWait
long fServerProto
ERemoteServerType fServerType
SessionIDInfo mySessionID
int fOpenSockFD
XrdSysCondVarfWriteWaitAck
XrdClientVector< ClientRequestfWriteReqsToRetry
XrdClientUrlInfofMetaUrl
bool fLBSIsMeta

Static Private Attributes

static XrdOucString fgClientHostDomain
static XrdSysMutex fSessionIDRMutex
static XrdOucHash< SessionIDInfofSessionIDRepo
static XrdClientConnectionMgrfgConnectionMgr

Member Enumeration Documentation

Enumerator:
kSEHRReturnMsgToCaller 
kSEHRBreakLoop 
kSEHRContinue 
kSEHRReturnNoMsgToCaller 
kSEHRRedirLimitReached 
Enumerator:
kTSRHReturnMex 
kTSRHReturnNullMex 
kTSRHContinue 

Constructor & Destructor Documentation

XrdClientConn::XrdClientConn (  ) 
virtual XrdClientConn::~XrdClientConn (  )  [virtual]

Member Function Documentation

bool XrdClientConn::CacheWillFit ( long long  bytes  )  [inline]
bool XrdClientConn::CheckErrorStatus ( XrdClientMessage ,
short &  ,
char *   
) [private]
bool XrdClientConn::CheckHostDomain ( XrdOucString  hostToCheck  ) 
void XrdClientConn::CheckPort ( int &  port  )  [private]
void XrdClientConn::CheckREQConnectWaitState (  )  [private]
void XrdClientConn::CheckREQPauseState (  )  [private]
bool XrdClientConn::CheckResp ( struct ServerResponseHeader resp,
const char *  method 
) [private]
void XrdClientConn::ClearLastServerError (  )  [inline]
XrdClientMessage* XrdClientConn::ClientServerCmd ( ClientRequest req,
const void *  reqMoreData,
void **  answMoreDataAllocated,
void *  answMoreData,
bool  HasToAlloc,
int  substreamid = 0 
) [private]
short XrdClientConn::Connect ( XrdClientUrlInfo  Host2Conn,
XrdClientAbsUnsolMsgHandler unsolhandler 
)
static void XrdClientConn::DelSessionIDRepo (  )  [inline, static]
void XrdClientConn::Disconnect ( bool  ForcePhysicalDisc  ) 
XrdSecProtocol* XrdClientConn::DoAuthentication ( char *  plist,
int  plsiz 
) [private]
ERemoteServerType XrdClientConn::DoHandShake ( short  log  )  [private]
bool XrdClientConn::DoLogin (  )  [private]
bool XrdClientConn::DomainMatcher ( XrdOucString  dom,
XrdOucString  domlist 
) [private]
bool XrdClientConn::DoWriteHardCheckPoint (  ) 
bool XrdClientConn::DoWriteSoftCheckPoint (  ) 
virtual bool XrdClientConn::GetAccessToSrv (  )  [virtual]
bool XrdClientConn::GetCacheInfo ( int &  size,
long long &  bytessubmitted,
long long &  byteshit,
long long &  misscount,
float &  missrate,
long long &  readreqcnt,
float &  bytesusefulness 
) [inline]
XrdOucString XrdClientConn::GetClientHostDomain (  )  [inline]

References fgClientHostDomain.

static XrdClientConnectionMgr* XrdClientConn::GetConnectionMgr (  )  [inline, static]

References fgConnectionMgr.

XrdClientUrlInfo XrdClientConn::GetCurrentUrl (  )  [inline]

References fUrl.

long XrdClientConn::GetDataFromCache ( const void *  buffer,
long long  begin_offs,
long long  end_offs,
bool  PerfCalc,
XrdClientIntvList missingblks,
long &  outstandingblks 
)
XrdOucString XrdClientConn::GetDomainToMatch ( XrdOucString  hostname  )  [private]
XrdClientUrlInfo* XrdClientConn::GetLBSUrl (  )  [inline]

References fLBSUrl.

int XrdClientConn::GetLogConnID (  )  const [inline]

References fLogConnID.

short XrdClientConn::GetMaxRedirCnt (  )  const [inline]

References fMaxGlobalRedirCnt.

XrdClientUrlInfo* XrdClientConn::GetMetaUrl (  )  [inline]

References fMetaUrl.

XErrorCode XrdClientConn::GetOpenError (  )  const [inline]

References fOpenError.

int XrdClientConn::GetOpenSockFD (  )  const [inline]

References fOpenSockFD.

int XrdClientConn::GetParallelStreamCount (  ) 
int XrdClientConn::GetParallelStreamToUse ( int  reqsperstream  ) 
static XrdClientPhyConnection* XrdClientConn::GetPhyConn ( int  LogConnID  )  [static]
short XrdClientConn::GetRedirCnt (  )  const [inline]

References fGlobalRedirCnt.

XrdClientUrlInfo XrdClientConn::GetRedirUrl (  )  [inline]

References fREQUrl.

long XrdClientConn::GetServerProtocol (  )  [inline]

References fServerProto.

ERemoteServerType XrdClientConn::GetServerType (  )  const [inline]

References fServerType.

void XrdClientConn::GetSessionID ( SessionIDInfo sess  )  [inline]

References mySessionID.

kXR_unt16 XrdClientConn::GetStreamID (  )  const [inline]

References fPrimaryStreamid.

XReqErrorType XrdClientConn::GoBackToRedirector (  ) 
virtual XReqErrorType XrdClientConn::GoToAnotherServer ( XrdClientUrlInfo newdest  )  [virtual]
virtual XReqErrorType XrdClientConn::GoToMetaManager (  )  [virtual]
ESrvErrorHandlerRetval XrdClientConn::HandleServerError ( XReqErrorType ,
XrdClientMessage ,
ClientRequest  
) [private]
bool XrdClientConn::IsConnected (  )  const [inline]

References fConnected.

bool XrdClientConn::IsOpTimeLimitElapsed ( time_t  timenow  ) 
bool XrdClientConn::IsPhyConnConnected (  ) 
bool XrdClientConn::MatchStreamid ( struct ServerResponseHeader ServerResponse  )  [private]
bool XrdClientConn::PanicClose (  )  [private]
XrdOucString XrdClientConn::ParseDomainFromHostname ( XrdOucString  hostname  )  [private]
void XrdClientConn::PrintCache (  )  [inline]
UnsolRespProcResult XrdClientConn::ProcessAsynResp ( XrdClientMessage unsolmsg  ) 
XrdClientMessage* XrdClientConn::ReadPartialAnswer ( XReqErrorType ,
size_t &  ,
ClientRequest ,
bool  ,
void **  ,
EThreeStateReadHandler  
) [private]
void XrdClientConn::RemoveAllDataFromCache ( bool  keepwriteblocks = true  )  [inline]
void XrdClientConn::RemoveDataFromCache ( long long  begin_offs,
long long  end_offs,
bool  remove_overlapped = false 
) [inline]
void XrdClientConn::RemovePlaceholdersFromCache (  )  [inline]
virtual bool XrdClientConn::SendGenCommand ( ClientRequest req,
const void *  reqMoreData,
void **  answMoreDataAllocated,
void *  answMoreData,
bool  HasToAlloc,
char *  CmdName,
int  substreamid = 0 
) [virtual]
void XrdClientConn::SetCacheRmPolicy ( int  RmPolicy  )  [inline]
void XrdClientConn::SetCacheSize ( int  CacheSize  )  [inline]
void XrdClientConn::SetClientHostDomain ( const char *  src  )  [inline]

References fgClientHostDomain.

void XrdClientConn::SetConnected ( bool  conn  )  [inline]

References fConnected.

void XrdClientConn::SetLogConnID ( int  cid  )  [inline, protected]

References fLogConnID.

void XrdClientConn::SetMaxRedirCnt ( short  mx  )  [inline]

References fMaxGlobalRedirCnt.

void XrdClientConn::SetOpenError ( XErrorCode  err  )  [inline]

References fOpenError.

void XrdClientConn::SetOpTimeLimit ( int  delta_secs  ) 
void XrdClientConn::SetRedirHandler ( XrdClientAbs rh  )  [inline]

References fRedirHandler.

void XrdClientConn::SetREQDelayedConnectState ( kXR_int32  wsec  )  [inline]
void XrdClientConn::SetREQPauseState ( kXR_int32  wsec  )  [inline]
void XrdClientConn::SetRequestedDestHost ( char *  newh,
kXR_int32  port 
) [inline]
void XrdClientConn::SetSID ( kXR_char sid  ) 
void XrdClientConn::SetStreamID ( kXR_unt16  sid  )  [inline, protected]

References fPrimaryStreamid.

void XrdClientConn::SetUrl ( XrdClientUrlInfo  thisUrl  )  [inline]

References fUrl.

bool XrdClientConn::SubmitDataToCache ( XrdClientMessage xmsg,
long long  begin_offs,
long long  end_offs 
)
void XrdClientConn::SubmitPlaceholderToCache ( long long  begin_offs,
long long  end_offs 
) [inline]
bool XrdClientConn::SubmitRawDataToCache ( const void *  buffer,
long long  begin_offs,
long long  end_offs 
)
void XrdClientConn::UnPinCacheBlk (  ) 
void XrdClientConn::UnPinCacheBlk ( long long  begin_offs,
long long  end_offs 
) [inline]
bool XrdClientConn::WaitResp ( int  secsmax  )  [private]
XReqErrorType XrdClientConn::WriteToServer ( ClientRequest req,
const void *  reqMoreData,
short  LogConnID,
int  substreamid = 0 
) [private]
XReqErrorType XrdClientConn::WriteToServer_Async ( ClientRequest req,
const void *  reqMoreData,
int  substreamid = 0 
)

Member Data Documentation

bool XrdClientConn::fConnected [private]

Referenced by IsConnected(), and SetConnected().

Referenced by GetConnectionMgr().

short XrdClientConn::fGlobalRedirCnt [protected]

Referenced by GetRedirCnt().

bool XrdClientConn::fLBSIsMeta [private]

Referenced by GetLBSUrl().

Referenced by GetLogConnID(), and SetLogConnID().

Referenced by GetMaxRedirCnt(), and SetMaxRedirCnt().

Referenced by GetMetaUrl().

Referenced by GetOpenError(), and SetOpenError().

Referenced by GetOpenSockFD().

time_t XrdClientConn::fOpTimeLimit [private]

Referenced by GetStreamID(), and SetStreamID().

Referenced by SetRedirHandler().

Referenced by SetREQPauseState().

Referenced by SetREQPauseState().

Referenced by GetServerProtocol().

Referenced by GetServerType().

Referenced by DelSessionIDRepo().

Referenced by DelSessionIDRepo().

Referenced by UnPinCacheBlk().

Referenced by ClearLastServerError().

Referenced by GetSessionID().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 22 Feb 2019 for xrootd by  doxygen 1.6.1