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