Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes
PointPair Class Reference
Collaboration diagram for PointPair:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PointPair (const std::string &source_str, const std::string &destination_str, const Arc::UserConfig &usercfg)
 ~PointPair (void)
 PointPair (const std::string &source_str, const std::string &destination_str, const Arc::UserConfig &usercfg)
 ~PointPair (void)

Static Public Member Functions

static void callback (Arc::DataMover *, Arc::DataStatus res, void *arg)
static void callback (Arc::DataMover *, Arc::DataStatus res, void *arg)

Public Attributes

Arc::DataHandle source
Arc::DataHandle destination

Private Attributes

Arc::URL source_url
Arc::URL destination_url

Detailed Description

Definition at line 205 of file downloader.cpp.


Constructor & Destructor Documentation

PointPair::PointPair ( const std::string &  source_str,
const std::string &  destination_str,
const Arc::UserConfig usercfg 
) [inline]

Definition at line 212 of file downloader.cpp.

    : source_url(source_str),
      destination_url(destination_str),
      source(source_url, usercfg),
      destination(destination_url, usercfg) {};
PointPair::~PointPair ( void  ) [inline]

Definition at line 218 of file downloader.cpp.

{};
PointPair::PointPair ( const std::string &  source_str,
const std::string &  destination_str,
const Arc::UserConfig usercfg 
) [inline]

Definition at line 94 of file uploader.cpp.

    : source_url(source_str),
      destination_url(destination_str),
      source(source_url, usercfg),
      destination(destination_url, usercfg) {};
PointPair::~PointPair ( void  ) [inline]

Definition at line 100 of file uploader.cpp.

{};

Member Function Documentation

static void PointPair::callback ( Arc::DataMover ,
Arc::DataStatus  res,
void *  arg 
) [inline, static]

Definition at line 101 of file uploader.cpp.

                                                                  {
    FileDataEx::iterator &it = *((FileDataEx::iterator*)arg);
    pair_condition.lock();
    if(!res.Passed()) {
      it->res=res;
      logger.msg(Arc::ERROR, "Failed uploading file %s - %s", it->lfn, std::string(res));
      if((it->pair->source->GetTries() <= 0) || (it->pair->destination->GetTries() <= 0)) {
        delete it->pair; it->pair=NULL;
        failed_files.push_back(*it);
      } else {
        job_files.push_back(*it);
        logger.msg(Arc::ERROR, "Retrying");
      };
    } else {
      logger.msg(Arc::INFO, "Uploaded file %s", it->lfn);
      delete it->pair; it->pair=NULL;
      processed_files.push_back(*it);
    };
    job_files.erase(it);
    --pairs_initiated;
    pair_condition.signal_nonblock();
    pair_condition.unlock();
    delete &it;
  };

Here is the call graph for this function:

static void PointPair::callback ( Arc::DataMover ,
Arc::DataStatus  res,
void *  arg 
) [inline, static]

Definition at line 219 of file downloader.cpp.

                                                                  {
    FileDataEx::iterator &it = *((FileDataEx::iterator*)arg);
    pair_condition.lock();
    if(!res.Passed()) {
      it->res=res;
      logger.msg(Arc::ERROR, "Failed downloading file %s - %s", it->lfn, std::string(res));
      if((it->pair->source->GetTries() <= 0) || (it->pair->destination->GetTries() <= 0)) {
        delete it->pair; it->pair=NULL;
        failed_files.push_back(*it);
      } else {
        job_files.push_back(*it);
        logger.msg(Arc::ERROR, "Retrying");
      };
    } else {
      logger.msg(Arc::INFO, "Downloaded file %s", it->lfn);
      delete it->pair; it->pair=NULL;
      processed_files.push_back(*it);
    };
    job_files.erase(it);
    --pairs_initiated;
    pair_condition.signal_nonblock();
    pair_condition.unlock();
    delete &it;
  };

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 211 of file downloader.cpp.

Definition at line 208 of file downloader.cpp.

Definition at line 210 of file downloader.cpp.

Definition at line 207 of file downloader.cpp.


The documentation for this class was generated from the following files: