xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdFileCache
XrdFileCacheIOFileBlock.hh
Go to the documentation of this file.
1
#ifndef __XRDFILECACHE_IO_FILE_BLOCK_HH__
2
#define __XRDFILECACHE_IO_FILE_BLOCK_HH__
3
//----------------------------------------------------------------------------------
4
// Copyright (c) 2014 by Board of Trustees of the Leland Stanford, Jr., University
5
// Author: Alja Mrak-Tadel, Matevz Tadel, Brian Bockelman
6
//----------------------------------------------------------------------------------
7
// XRootD is free software: you can redistribute it and/or modify
8
// it under the terms of the GNU Lesser General Public License as published by
9
// the Free Software Foundation, either version 3 of the License, or
10
// (at your option) any later version.
11
//
12
// XRootD is distributed in the hope that it will be useful,
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
// GNU General Public License for more details.
16
//
17
// You should have received a copy of the GNU Lesser General Public License
18
// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
19
//----------------------------------------------------------------------------------
20
#include <map>
21
#include <string>
22
23
#include "
XrdOuc/XrdOucCache.hh
"
24
#include "
XrdSys/XrdSysPthread.hh
"
25
26
#include "
XrdFileCache.hh
"
27
#include "
XrdFileCachePrefetch.hh
"
28
29
class
XrdSysError
;
30
class
XrdOssDF
;
31
32
namespace
XrdFileCache
33
{
34
//----------------------------------------------------------------------------
38
//----------------------------------------------------------------------------
39
class
IOFileBlock
:
public
IO
40
{
41
public
:
42
//------------------------------------------------------------------------
44
//------------------------------------------------------------------------
45
IOFileBlock
(
XrdOucCacheIO
&io,
XrdOucCacheStats
&stats,
Cache
&cache);
46
47
//------------------------------------------------------------------------
49
//------------------------------------------------------------------------
50
~IOFileBlock
() {}
51
52
//---------------------------------------------------------------------
56
//---------------------------------------------------------------------
57
virtual
XrdOucCacheIO
*
Detach
();
58
59
//---------------------------------------------------------------------
61
//---------------------------------------------------------------------
62
virtual
int
Read
(
char
*Buffer,
long
long
Offset,
int
Length);
63
66
virtual
bool
ioActive
();
67
68
private
:
69
long
long
m_fileFragmentSize
;
70
std::map<int, Prefetch*>
m_blocks
;
71
XrdSysMutex
m_mutex
;
72
73
Prefetch
*
newBlockPrefetcher
(
long
long
off,
int
blocksize,
XrdOucCacheIO
* io);
74
};
75
}
76
77
#endif
Generated by
1.8.3.1