CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DelayedClose Class Reference
Inheritance diagram for DelayedClose:

Public Member Functions

 DelayedClose (std::shared_ptr< XrdCl::File > fh, const std::string &id, const std::string &site)
 
void HandleResponseWithHosts (XrdCl::XRootDStatus *status, XrdCl::AnyObject *response, XrdCl::HostList *hostList) override
 
 ~DelayedClose () override=default
 

Private Attributes

edm::propagate_const< std::shared_ptr< XrdCl::File > > m_fh
 
std::string m_id
 
std::string m_site
 

Detailed Description

Definition at line 39 of file XrdSource.cc.

Constructor & Destructor Documentation

◆ DelayedClose()

DelayedClose::DelayedClose ( std::shared_ptr< XrdCl::File >  fh,
const std::string &  id,
const std::string &  site 
)
inline

Definition at line 41 of file XrdSource.cc.

42  : m_fh(std::move(fh)), m_id(id), m_site(site) {
43  if (m_fh && m_fh->IsOpen()) {
44  if (!m_fh->Close(this).IsOK()) {
45  delete this;
46  }
47  }
48  }

◆ ~DelayedClose()

DelayedClose::~DelayedClose ( )
overridedefault

Member Function Documentation

◆ HandleResponseWithHosts()

void DelayedClose::HandleResponseWithHosts ( XrdCl::XRootDStatus *  status,
XrdCl::AnyObject *  response,
XrdCl::HostList *  hostList 
)
inlineoverride

Definition at line 52 of file XrdSource.cc.

54  {
55  if (status && !status->IsOK()) {
56  edm::LogWarning("XrdFileWarning") << "Source delayed close failed with error '" << status->ToStr()
57  << "' (errno=" << status->errNo << ", code=" << status->code
58  << ", server=" << m_id << ", site=" << m_site << ")";
59  }
60  delete status;
61  delete hostList;
62  // NOTE: we do not delete response (copying behavior from XrdCl).
63  delete this;
64  }

References mps_update::status.

Member Data Documentation

◆ m_fh

edm::propagate_const<std::shared_ptr<XrdCl::File> > DelayedClose::m_fh
private

Definition at line 67 of file XrdSource.cc.

◆ m_id

std::string DelayedClose::m_id
private

Definition at line 68 of file XrdSource.cc.

◆ m_site

std::string DelayedClose::m_site
private

Definition at line 69 of file XrdSource.cc.

mps_update.status
status
Definition: mps_update.py:69
edm::LogWarning
Definition: MessageLogger.h:141
DelayedClose::m_fh
edm::propagate_const< std::shared_ptr< XrdCl::File > > m_fh
Definition: XrdSource.cc:67
DelayedClose::m_id
std::string m_id
Definition: XrdSource.cc:68
DelayedClose::m_site
std::string m_site
Definition: XrdSource.cc:69
eostools.move
def move(src, dest)
Definition: eostools.py:511