XRootD
XrdCl::Task Class Referenceabstract

Interface for a task to be run by the TaskManager. More...

#include <XrdClTaskManager.hh>

+ Inheritance diagram for XrdCl::Task:
+ Collaboration diagram for XrdCl::Task:

Public Member Functions

virtual ~Task ()
 
const std::string & GetName () const
 Name of the task. More...
 
virtual time_t Run (time_t now)=0
 
void SetName (const std::string &name)
 Set name of the task. More...
 

Detailed Description

Interface for a task to be run by the TaskManager.

Definition at line 35 of file XrdClTaskManager.hh.

Constructor & Destructor Documentation

◆ ~Task()

virtual XrdCl::Task::~Task ( )
inlinevirtual

Definition at line 38 of file XrdClTaskManager.hh.

38 {};

Member Function Documentation

◆ GetName()

const std::string& XrdCl::Task::GetName ( ) const
inline

Name of the task.

Definition at line 52 of file XrdClTaskManager.hh.

53  {
54  return pName;
55  }

Referenced by XrdCl::TaskManager::RegisterTask(), XrdCl::TaskManager::RunTasks(), and XrdCl::TaskManager::UnregisterTask().

+ Here is the caller graph for this function:

◆ Run()

virtual time_t XrdCl::Task::Run ( time_t  now)
pure virtual

Perform the task

Parameters
nowcurrent timestamp
Returns
0 if the task is completed and should no longer be run or the time at which it should be run again

Implemented in XrdCl::FileTimer, and XrdCl::TickGeneratorTask.

◆ SetName()

void XrdCl::Task::SetName ( const std::string &  name)
inline

Set name of the task.

Definition at line 60 of file XrdClTaskManager.hh.

61  {
62  pName = name;
63  }

Referenced by XrdCl::FileTimer::FileTimer(), and XrdCl::TickGeneratorTask::TickGeneratorTask().

+ Here is the caller graph for this function:

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