LibreOffice Module store (master) 1
|
#include <storcach.hxx>
Public Member Functions | |
PageCache (sal_uInt16 nPageSize) | |
PageCache (const PageCache &)=delete | |
PageCache & | operator= (const PageCache &)=delete |
storeError | lookupPageAt (std::shared_ptr< PageData > &rxPage, sal_uInt32 nOffset) |
storeError | insertPageAt (std::shared_ptr< PageData > const &rxPage, sal_uInt32 nOffset) |
storeError | updatePageAt (std::shared_ptr< PageData > const &rxPage, sal_uInt32 nOffset) |
storeError | removePageAt (sal_uInt32 nOffset) |
Public Member Functions inherited from store::OStoreObject | |
OStoreObject () | |
virtual bool | isKindOf (sal_uInt32 nTypeId) |
Replaces dynamic_cast type checking. More... | |
Public Member Functions inherited from salhelper::SimpleReferenceObject | |
SimpleReferenceObject () | |
void | acquire () |
void | release () |
Protected Member Functions | |
virtual | ~PageCache () override |
Protected Member Functions inherited from store::OStoreObject | |
virtual | ~OStoreObject () override |
Protected Member Functions inherited from salhelper::SimpleReferenceObject | |
virtual | ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE |
Private Member Functions | |
int | hash_index_Impl (sal_uInt32 nOffset) |
Entry * | lookup_Impl (Entry *entry, sal_uInt32 nOffset) |
void | rescale_Impl (std::size_t new_size) |
Static Private Member Functions | |
static int | hash_Impl (sal_uInt32 a, size_t s, size_t q, size_t m) |
Private Attributes | |
Entry ** | m_hash_table |
Entry * | m_hash_table_0 [theTableSize] = {} |
size_t | m_hash_size |
size_t | m_hash_shift |
size_t const | m_page_shift |
size_t | m_hash_entries |
size_t | m_nHit |
size_t | m_nMissed |
Static Private Attributes | |
static size_t const | theTableSize = 32 |
Additional Inherited Members | |
Static Public Member Functions inherited from salhelper::SimpleReferenceObject | |
static void * | operator new (std::size_t nSize) |
static void * | operator new (std::size_t nSize, std::nothrow_t const &rNothrow) |
static void | operator delete (void *pPtr) |
static void | operator delete (void *pPtr, std::nothrow_t const &rNothrow) |
Protected Attributes inherited from salhelper::SimpleReferenceObject | |
oslInterlockedCount | m_nCount |
Definition at line 39 of file storcach.hxx.
|
explicit |
Definition at line 167 of file storcach.cxx.
References m_hash_table_0, SAL_N_ELEMENTS, and theTableSize.
|
delete |
|
overrideprotectedvirtual |
Definition at line 180 of file storcach.cxx.
References highbit(), i, m_hash_shift, m_hash_size, m_hash_table, m_hash_table_0, m_nHit, m_nMissed, store::Entry::m_pNext, n, SAL_INFO, theTableSize, and x.
|
inlinestaticprivate |
|
inlineprivate |
Definition at line 59 of file storcach.hxx.
References hash_Impl(), m_hash_shift, m_hash_size, and m_page_shift.
Referenced by insertPageAt(), lookupPageAt(), removePageAt(), rescale_Impl(), and updatePageAt().
storeError PageCache::insertPageAt | ( | std::shared_ptr< PageData > const & | rxPage, |
sal_uInt32 | nOffset | ||
) |
Definition at line 300 of file storcach.cxx.
References hash_index_Impl(), index, store::PageData::location(), m_hash_entries, m_hash_table, store::Entry::m_pNext, store_E_CantSeek, store_E_InvalidParameter, store_E_None, store_E_OutOfMemory, and STORE_PAGE_NULL.
Referenced by updatePageAt().
Definition at line 255 of file storcach.cxx.
References m_hash_entries, m_hash_shift, m_hash_size, store::Entry::m_nOffset, store::Entry::m_pNext, and rescale_Impl().
Referenced by lookupPageAt(), and updatePageAt().
storeError PageCache::lookupPageAt | ( | std::shared_ptr< PageData > & | rxPage, |
sal_uInt32 | nOffset | ||
) |
Definition at line 277 of file storcach.cxx.
References hash_index_Impl(), index, lookup_Impl(), m_hash_table, m_nHit, m_nMissed, store::Entry::m_xPage, store_E_CantSeek, store_E_None, store_E_NotExists, and STORE_PAGE_NULL.
storeError PageCache::removePageAt | ( | sal_uInt32 | nOffset | ) |
Definition at line 362 of file storcach.cxx.
References hash_index_Impl(), m_hash_entries, m_hash_table, store::Entry::m_pNext, store_E_CantSeek, store_E_None, store_E_NotExists, and STORE_PAGE_NULL.
|
private |
Definition at line 211 of file storcach.cxx.
References hash_index_Impl(), highbit(), i, index, m_hash_entries, m_hash_shift, m_hash_size, m_hash_table, m_hash_table_0, store::Entry::m_nOffset, store::Entry::m_pNext, and SAL_INFO.
Referenced by lookup_Impl().
storeError PageCache::updatePageAt | ( | std::shared_ptr< PageData > const & | rxPage, |
sal_uInt32 | nOffset | ||
) |
Definition at line 332 of file storcach.cxx.
References hash_index_Impl(), index, insertPageAt(), store::PageData::location(), lookup_Impl(), m_hash_table, store::Entry::m_xPage, store_E_CantSeek, store_E_InvalidParameter, store_E_None, and STORE_PAGE_NULL.
|
private |
Definition at line 51 of file storcach.hxx.
Referenced by insertPageAt(), lookup_Impl(), removePageAt(), and rescale_Impl().
|
private |
Definition at line 48 of file storcach.hxx.
Referenced by hash_index_Impl(), lookup_Impl(), rescale_Impl(), and ~PageCache().
|
private |
Definition at line 47 of file storcach.hxx.
Referenced by hash_index_Impl(), lookup_Impl(), rescale_Impl(), and ~PageCache().
|
private |
Definition at line 45 of file storcach.hxx.
Referenced by insertPageAt(), lookupPageAt(), removePageAt(), rescale_Impl(), updatePageAt(), and ~PageCache().
|
private |
Definition at line 46 of file storcach.hxx.
Referenced by PageCache(), rescale_Impl(), and ~PageCache().
|
private |
Definition at line 52 of file storcach.hxx.
Referenced by lookupPageAt(), and ~PageCache().
|
private |
Definition at line 53 of file storcach.hxx.
Referenced by lookupPageAt(), and ~PageCache().
|
private |
Definition at line 49 of file storcach.hxx.
Referenced by hash_index_Impl().
|
staticprivate |
Definition at line 42 of file storcach.hxx.
Referenced by PageCache(), and ~PageCache().