XRootD
Loading...
Searching...
No Matches
XrdPfc::DataFsPurgeshot Struct Reference

#include <XrdPfcDirStatePurgeshot.hh>

+ Inheritance diagram for XrdPfc::DataFsPurgeshot:
+ Collaboration diagram for XrdPfc::DataFsPurgeshot:

Public Member Functions

 DataFsPurgeshot ()
 
 DataFsPurgeshot (const DataFsStateBase &b)
 
int find_dir_entry_for_dir_path (const std::string &dir_path) const
 
int find_dir_entry_from_tok (int entry, PathTokenizer &pt, int pos, int *last_existing_entry) const
 
const DirUsagefind_dir_usage_for_dir_path (const std::string &dir_path) const
 

Public Attributes

bool m_age_based_purge = false
 
long long m_bytes_to_remove = 0
 
std::vector< DirPurgeElementm_dir_vec
 
long long m_estimated_writes_from_writeq = 0
 
bool m_space_based_purge = false
 
- Public Attributes inherited from XrdPfc::DataFsStateBase
long long m_disk_total = 0
 
long long m_disk_used = 0
 
long long m_file_usage = 0
 
long long m_meta_total = 0
 
long long m_meta_used = 0
 
time_t m_usage_update_time = 0
 

Detailed Description

Definition at line 24 of file XrdPfcDirStatePurgeshot.hh.

Constructor & Destructor Documentation

◆ DataFsPurgeshot() [1/2]

XrdPfc::DataFsPurgeshot::DataFsPurgeshot ( )
inline

Definition at line 37 of file XrdPfcDirStatePurgeshot.hh.

37{}

◆ DataFsPurgeshot() [2/2]

XrdPfc::DataFsPurgeshot::DataFsPurgeshot ( const DataFsStateBase & b)
inline

Definition at line 38 of file XrdPfcDirStatePurgeshot.hh.

38 :
39 DataFsStateBase(b)
40 {}

Member Function Documentation

◆ find_dir_entry_for_dir_path()

int XrdPfc::DataFsPurgeshot::find_dir_entry_for_dir_path ( const std::string & dir_path) const
inline

Definition at line 67 of file XrdPfcDirStatePurgeshot.hh.

68{
69 PathTokenizer pt(dir_path, -1, false);
70 return find_dir_entry_from_tok(0, pt, 0, nullptr);
71}
int find_dir_entry_from_tok(int entry, PathTokenizer &pt, int pos, int *last_existing_entry) const

References find_dir_entry_from_tok().

Referenced by find_dir_usage_for_dir_path().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ find_dir_entry_from_tok()

int XrdPfc::DataFsPurgeshot::find_dir_entry_from_tok ( int entry,
PathTokenizer & pt,
int pos,
int * last_existing_entry ) const
inline

Definition at line 50 of file XrdPfcDirStatePurgeshot.hh.

51{
52 if (pos == pt.get_n_dirs())
53 return entry;
54
55 const DirPurgeElement &dpe = m_dir_vec[entry];
56 for (int i = dpe.m_daughters_begin; i != dpe.m_daughters_end; ++i)
57 {
58 if (m_dir_vec[i].m_dir_name == pt.get_dir(pos)) {
59 return find_dir_entry_from_tok(i, pt, pos + 1, last_existing_entry);
60 }
61 }
62 if (last_existing_entry)
63 *last_existing_entry = entry;
64 return -1;
65}
std::vector< DirPurgeElement > m_dir_vec

References find_dir_entry_from_tok(), XrdPfc::PathTokenizer::get_dir(), XrdPfc::PathTokenizer::get_n_dirs(), XrdPfc::DirPurgeElement::m_daughters_begin, XrdPfc::DirPurgeElement::m_daughters_end, and m_dir_vec.

Referenced by find_dir_entry_for_dir_path(), and find_dir_entry_from_tok().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ find_dir_usage_for_dir_path()

const DirUsage * XrdPfc::DataFsPurgeshot::find_dir_usage_for_dir_path ( const std::string & dir_path) const
inline

Definition at line 73 of file XrdPfcDirStatePurgeshot.hh.

74{
75 int entry = find_dir_entry_for_dir_path(dir_path);
76 return entry >= 0 ? &m_dir_vec[entry].m_usage : nullptr;
77}
int find_dir_entry_for_dir_path(const std::string &dir_path) const

References find_dir_entry_for_dir_path(), and m_dir_vec.

Referenced by XrdPfcPurgeQuota::InitDirStatesForLocalPaths().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_age_based_purge

bool XrdPfc::DataFsPurgeshot::m_age_based_purge = false

◆ m_bytes_to_remove

long long XrdPfc::DataFsPurgeshot::m_bytes_to_remove = 0

◆ m_dir_vec

std::vector<DirPurgeElement> XrdPfc::DataFsPurgeshot::m_dir_vec

◆ m_estimated_writes_from_writeq

long long XrdPfc::DataFsPurgeshot::m_estimated_writes_from_writeq = 0

◆ m_space_based_purge

bool XrdPfc::DataFsPurgeshot::m_space_based_purge = false

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