ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::files::OwnerAndGroupResolver Class Reference

Description:

Helper-class to resolve owner and group ids to strings names. The class uses an instance of LRUCacheTable of size 10 for each value to increase the performance of the lookup. Because of this and the fact that the returned string value is located in an internal member buffer, multithreaded invocations of members GetOwnerName and GetGroupName have to be protected against racing conditions. This is up to the user of the type.

Definition at line 535 of file finfo.inl.

Public Method Index:

 OwnerAndGroupResolver (PoolAllocator &poolAllocator)
 
ALIB_DLL const NStringGetGroupName (const FInfo &fInfo)
 
ALIB_DLL const NStringGetOwnerName (const FInfo &fInfo)
 
void SetGroupCacheCapacity (integer numberOfLists, integer entriesPerList)
 
void SetOwnerCacheCapacity (integer numberOfLists, integer entriesPerList)
 

Constructor(s) / Destructor Details:

◆ OwnerAndGroupResolver()

alib::files::OwnerAndGroupResolver::OwnerAndGroupResolver ( PoolAllocator & poolAllocator)
inline

Constructor.

Parameters
poolAllocatorThe allocator passed to the internal instances of type LRUCacheTable.

Definition at line 552 of file finfo.inl.

Method Details:

◆ GetGroupName()

const NString & alib::files::OwnerAndGroupResolver::GetGroupName ( const FInfo & fInfo)

Retrieves the file's group name.

Parameters
fInfoThe file to examine.
Returns
The name of the group of the file.

Definition at line 87 of file finfo.cpp.

Here is the call graph for this function:

◆ GetOwnerName()

const NString & alib::files::OwnerAndGroupResolver::GetOwnerName ( const FInfo & fInfo)

Retrieves the file's owner's name.

Parameters
fInfoThe file to examine.
Returns
The name of the owner of the file.

Definition at line 70 of file finfo.cpp.

Here is the call graph for this function:

◆ SetGroupCacheCapacity()

void alib::files::OwnerAndGroupResolver::SetGroupCacheCapacity ( integer numberOfLists,
integer entriesPerList )

Changes the capacity of the LRUCacheTable for owner names, by calling LRUCacheTable::Reserve.
The default sizes with construction is 6 for both values.

Parameters
numberOfListsThe number of LRU-lists to use.
entriesPerListThe maximum length of each cache list.

◆ SetOwnerCacheCapacity()

void alib::files::OwnerAndGroupResolver::SetOwnerCacheCapacity ( integer numberOfLists,
integer entriesPerList )

Changes the capacity of the LRUCacheTable for owner names, by calling LRUCacheTable::Reserve.
The default sizes with construction is 6 for both values.

Parameters
numberOfListsThe number of LRU-lists to use.
entriesPerListThe maximum length of each cache list.

The documentation for this class was generated from the following files: