Loading...
Searching...
No Matches
XrdCl::TickGeneratorTask Class Reference
Inheritance diagram for XrdCl::TickGeneratorTask:
Collaboration diagram for XrdCl::TickGeneratorTask:

## Public Member Functions

| TickGeneratorTask (XrdCl::Channel *channel, const std::string &hostId)
void | Invalidate ()
time_t | Run (time_t now)
Public Member Functions inherited from XrdCl::Task
virtual | ~Task ()
const std::string & | GetName () const
| Name of the task.
void | SetName (const std::string &name)
| Set name of the task.

## Detailed Description

Definition at line 39 of file XrdClChannel.cc.

## Constructor & Destructor Documentation

## TickGeneratorTask()

XrdCl::TickGeneratorTask::TickGeneratorTask | ( | XrdCl::Channel * | channel,
|  | const std::string & | hostId )

inline

Definition at line 45 of file XrdClChannel.cc.

:
pChannel( channel )
{
std::string name = "TickGeneratorTask for: ";
name += hostId;
SetName( name );
}
XrdCl::Task::SetName
void SetName(const std::string &name)
Set name of the task.
Definition XrdClTaskManager.hh:60

References XrdCl::Task::SetName().

Here is the call graph for this function:

## Member Function Documentation

## Invalidate()

void XrdCl::TickGeneratorTask::Invalidate | ( |  | ) |

inline

Definition at line 70 of file XrdClChannel.cc.

{
XrdSysMutexHelper lck( pMtx );
pChannel = 0;
}

## Run()

time_t XrdCl::TickGeneratorTask::Run | ( | time_t | now | ) |

inline virtual

Perform the task

Parameters

  now | current timestamp

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

Implements XrdCl::Task.

Definition at line 56 of file XrdClChannel.cc.

{
XrdSysMutexHelper lck( pMtx );
if( !pChannel ) return 0;
using namespace XrdCl;
pChannel->Tick( now );
Env *env = DefaultEnv::GetEnv();
int timeoutResolution = DefaultTimeoutResolution;
env->GetInt( "TimeoutResolution", timeoutResolution );
return now+timeoutResolution;
}
XrdCl::DefaultEnv::GetEnv
static Env * GetEnv()
Get default client environment.
Definition XrdClDefaultEnv.cc:445
XrdCl::Env::GetInt
bool GetInt(const std::string &key, int &value)
Definition XrdClEnv.cc:89
XrdCl::DefaultTimeoutResolution
const int DefaultTimeoutResolution
Definition XrdClConstants.hh:56

References XrdCl::DefaultTimeoutResolution, XrdCl::DefaultEnv::GetEnv(), and XrdCl::Env::GetInt().

Here is the call graph for this function:

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

- XrdClChannel.cc