XRootD
Loading...
Searching...
No Matches
XrdClFileTimer.cc
Go to the documentation of this file.
1
//------------------------------------------------------------------------------
2
// Copyright (c) 2013 by European Organization for Nuclear Research (CERN)
3
// Author: Lukasz Janyst <ljanyst@cern.ch>
4
//------------------------------------------------------------------------------
5
// XRootD is free software: you can redistribute it and/or modify
6
// it under the terms of the GNU Lesser General Public License as published by
7
// the Free Software Foundation, either version 3 of the License, or
8
// (at your option) any later version.
9
//
10
// XRootD is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU Lesser General Public License
16
// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
17
//------------------------------------------------------------------------------
18
19
#include "
XrdCl/XrdClFileTimer.hh
"
20
#include "
XrdCl/XrdClDefaultEnv.hh
"
21
#include "
XrdCl/XrdClConstants.hh
"
22
#include "
XrdCl/XrdClFileStateHandler.hh
"
23
24
namespace
XrdCl
25
{
26
//----------------------------------------------------------------------------
27
// Perform the task's action
28
//----------------------------------------------------------------------------
29
time_t
FileTimer::Run
( time_t now )
30
{
31
pMutex.Lock();
32
std::set<FileStateHandler*>::iterator it;
33
for
( it = pFileObjects.begin(); it != pFileObjects.end(); ++it )
34
(*it)->Tick(now);
35
pMutex.UnLock();
36
Env
*env =
DefaultEnv::GetEnv
();
37
int
timeoutResolution =
DefaultTimeoutResolution
;
38
env->
GetInt
(
"TimeoutResolution"
, timeoutResolution );
39
return
now+timeoutResolution;
40
}
41
}
XrdClConstants.hh
XrdClDefaultEnv.hh
XrdClFileStateHandler.hh
XrdClFileTimer.hh
XrdCl::DefaultEnv::GetEnv
static Env * GetEnv()
Get default client environment.
Definition
XrdClDefaultEnv.cc:445
XrdCl::Env
Definition
XrdClEnv.hh:38
XrdCl::Env::GetInt
bool GetInt(const std::string &key, int &value)
Definition
XrdClEnv.cc:89
XrdCl::FileTimer::Run
virtual time_t Run(time_t now)
Perform the task's action.
Definition
XrdClFileTimer.cc:29
XrdCl
Definition
XrdClAction.hh:34
XrdCl::DefaultTimeoutResolution
const int DefaultTimeoutResolution
Definition
XrdClConstants.hh:56
XrdCl
XrdClFileTimer.cc
Generated by
1.13.1