Downloads data into a file on local disk and handles IO read requests.
More...
#include <XrdFileCachePrefetch.hh>
|
struct | RAM |
|
struct | RAMBlock |
|
struct | Task |
| A prefetching task – a file region that requires preferential treatment. More...
|
|
Downloads data into a file on local disk and handles IO read requests.
Enumerator |
---|
kReadWait |
|
kReadSuccess |
|
kReadFailed |
|
XrdFileCache::Prefetch::Prefetch |
( |
XrdOucCacheIO & |
inputFile, |
|
|
std::string & |
path, |
|
|
long long |
offset, |
|
|
long long |
fileSize |
|
) |
| |
XrdFileCache::Prefetch::~Prefetch |
( |
| ) |
|
void XrdFileCache::Prefetch::AppendIOStatToFileInfo |
( |
| ) |
|
|
protected |
Write cache statistics in *cinfo file.
XrdCl::Log* XrdFileCache::Prefetch::clLog |
( |
| ) |
const |
|
inlineprivate |
void XrdFileCache::Prefetch::CloseCleanly |
( |
| ) |
|
|
private |
Task* XrdFileCache::Prefetch::CreateTaskForFirstUndownloadedBlock |
( |
| ) |
|
|
private |
void XrdFileCache::Prefetch::DecRamBlockRefCount |
( |
int |
ramIdx | ) |
|
Decrease block reference count.
void XrdFileCache::Prefetch::DoTask |
( |
Task * |
task | ) |
|
|
private |
Read from client into in memory cache, queue ram buffer for disk write.
Task* XrdFileCache::Prefetch::GetNextTask |
( |
| ) |
|
|
private |
Stats& XrdFileCache::Prefetch::GetStats |
( |
| ) |
|
|
inline |
Reference to prefetch statistics.
References m_stats.
bool XrdFileCache::Prefetch::InitiateClose |
( |
| ) |
|
const char* XrdFileCache::Prefetch::lPath |
( |
| ) |
const |
|
private |
bool XrdFileCache::Prefetch::Open |
( |
| ) |
|
|
private |
Open file handle for data file and info file on local disk.
ssize_t XrdFileCache::Prefetch::Read |
( |
char * |
buff, |
|
|
off_t |
offset, |
|
|
size_t |
size |
|
) |
| |
|
protected |
Read from disk, RAM, task, or client.
bool XrdFileCache::Prefetch::ReadFromTask |
( |
int |
bIdx, |
|
|
char * |
buff, |
|
|
long long |
off, |
|
|
size_t |
size |
|
) |
| |
|
private |
Create task from read request and wait its completed.
ssize_t XrdFileCache::Prefetch::ReadInBlocks |
( |
char * |
buff, |
|
|
off_t |
offset, |
|
|
size_t |
size |
|
) |
| |
|
private |
int XrdFileCache::Prefetch::ReadV |
( |
const XrdOucIOVec * |
readV, |
|
|
int |
n |
|
) |
| |
|
protected |
Vector read from disk if block is already downloaded, else ReadV from client.
void XrdFileCache::Prefetch::Run |
( |
| ) |
|
Thread function for file prefetching.
void XrdFileCache::Prefetch::Sync |
( |
| ) |
|
Sync file cache inf o and output data with disk.
void XrdFileCache::Prefetch::WriteBlockToDisk |
( |
int |
ramIdx, |
|
|
size_t |
size |
|
) |
| |
Write block to file on disk. Called from Cache.
Info XrdFileCache::Prefetch::m_cfi |
|
private |
download status of file blocks and access statistics
XrdSysMutex XrdFileCache::Prefetch::m_downloadStatusMutex |
|
private |
mutex locking access to m_cfi object
bool XrdFileCache::Prefetch::m_failed |
|
private |
reading from original source or writing to disk has failed
long long XrdFileCache::Prefetch::m_fileSize |
|
private |
size of disk file for block-based operation
bool XrdFileCache::Prefetch::m_in_sync |
|
private |
XrdOssDF* XrdFileCache::Prefetch::m_infoFile |
|
private |
file handle for data-info file on disk
int XrdFileCache::Prefetch::m_non_flushed_cnt |
|
private |
long long XrdFileCache::Prefetch::m_offset |
|
private |
offset of disk file for block-based operation
XrdOssDF* XrdFileCache::Prefetch::m_output |
|
private |
file handle for data file on disk
m_tasks_queue condition variable
RAM XrdFileCache::Prefetch::m_ram |
|
private |
bool XrdFileCache::Prefetch::m_started |
|
private |
Stats XrdFileCache::Prefetch::m_stats |
|
private |
cache statistics, used in IO detach
Referenced by GetStats().
bool XrdFileCache::Prefetch::m_stopped |
|
private |
bool XrdFileCache::Prefetch::m_stopping |
|
private |
run thread should be stopped
XrdJob* XrdFileCache::Prefetch::m_syncer |
|
private |
mutex locking fsync status
std::deque<Task*> XrdFileCache::Prefetch::m_tasks_queue |
|
private |
std::string XrdFileCache::Prefetch::m_temp_filename |
|
private |
filename of data file on disk
std::vector<int> XrdFileCache::Prefetch::m_writes_during_sync |
|
private |
The documentation for this class was generated from the following file: