Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::Internal::RPagePool Class Reference

A thread-safe cache of pages loaded from the page source.

The page pool is used as a cache for pages loaded from a page source. In this way, identical page needed at the same time, only need to be loaded once. Page sources also use the page pool to stage (preload) pages unsealed by IMT tasks.

Definition at line 43 of file RPagePool.hxx.

Public Member Functions

 RPagePool ()=default
 
 RPagePool (const RPagePool &)=delete
 
 ~RPagePool ()=default
 
RPageRef GetPage (ColumnId_t columnId, NTupleSize_t globalIndex)
 Tries to find the page corresponding to column and index in the cache.
 
RPageRef GetPage (ColumnId_t columnId, RClusterIndex clusterIndex)
 
RPagePooloperator= (const RPagePool &)=delete
 
void PreloadPage (RPage page)
 Like RegisterPage() but the reference counter is initialized to 0.
 
RPageRef RegisterPage (RPage page)
 Adds a new page to the pool.
 

Private Member Functions

void ReleasePage (const RPage &page)
 Give back a page to the pool and decrease the reference counter.
 

Private Attributes

std::mutex fLock
 
std::vector< RPagefPages
 TODO(jblomer): should be an efficient index structure that allows.
 
std::vector< std::int32_t > fReferences
 

Friends

class RPageRef
 

#include <ROOT/RPagePool.hxx>

Constructor & Destructor Documentation

◆ RPagePool() [1/2]

ROOT::Experimental::Internal::RPagePool::RPagePool ( )
default

◆ RPagePool() [2/2]

ROOT::Experimental::Internal::RPagePool::RPagePool ( const RPagePool )
delete

◆ ~RPagePool()

ROOT::Experimental::Internal::RPagePool::~RPagePool ( )
default

Member Function Documentation

◆ GetPage() [1/2]

ROOT::Experimental::Internal::RPageRef ROOT::Experimental::Internal::RPagePool::GetPage ( ColumnId_t  columnId,
NTupleSize_t  globalIndex 
)

Tries to find the page corresponding to column and index in the cache.

If the page is found, its reference counter is increased

Definition at line 60 of file RPagePool.cxx.

◆ GetPage() [2/2]

ROOT::Experimental::Internal::RPageRef ROOT::Experimental::Internal::RPagePool::GetPage ( ColumnId_t  columnId,
RClusterIndex  clusterIndex 
)

Definition at line 75 of file RPagePool.cxx.

◆ operator=()

RPagePool & ROOT::Experimental::Internal::RPagePool::operator= ( const RPagePool )
delete

◆ PreloadPage()

void ROOT::Experimental::Internal::RPagePool::PreloadPage ( RPage  page)

Like RegisterPage() but the reference counter is initialized to 0.

Definition at line 32 of file RPagePool.cxx.

◆ RegisterPage()

ROOT::Experimental::Internal::RPageRef ROOT::Experimental::Internal::RPagePool::RegisterPage ( RPage  page)

Adds a new page to the pool.

Upon registration, the page pool takes ownership of the page's memory. The new page has its reference counter set to 1.

Definition at line 24 of file RPagePool.cxx.

◆ ReleasePage()

void ROOT::Experimental::Internal::RPagePool::ReleasePage ( const RPage page)
private

Give back a page to the pool and decrease the reference counter.

There must not be any pointers anymore into this page. If the reference counter drops to zero, the page pool might decide to call the deleter given in during registration. Called by the RPageRef destructor.

Definition at line 39 of file RPagePool.cxx.

Friends And Related Symbol Documentation

◆ RPageRef

friend class RPageRef
friend

Definition at line 44 of file RPagePool.hxx.

Member Data Documentation

◆ fLock

std::mutex ROOT::Experimental::Internal::RPagePool::fLock
private

Definition at line 52 of file RPagePool.hxx.

◆ fPages

std::vector<RPage> ROOT::Experimental::Internal::RPagePool::fPages
private

TODO(jblomer): should be an efficient index structure that allows.

  • random insert
  • random delete
  • searching by page

Definition at line 50 of file RPagePool.hxx.

◆ fReferences

std::vector<std::int32_t> ROOT::Experimental::Internal::RPagePool::fReferences
private

Definition at line 51 of file RPagePool.hxx.

Libraries for ROOT::Experimental::Internal::RPagePool:

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