#include <TwoQVictimPolicy.h>
Inheritance diagram for TwoQDirtyPage:
Public Types | |
enum | DirtyPageState { PAGE_CLEAN, PAGE_DIRTY_POPULAR_UNPINNED, PAGE_DIRTY_FRESHMAN, PAGE_DIRTY_POPULAR_PINNED } |
Enumeration indicating whether a page is dirty and if so, which queue the dirty page is in. More... | |
Public Member Functions | |
void | setParentPage (CachePage &parentPageInit) |
Sets the parent page corresponding to the dirty object. | |
CachePage & | getParentPage () |
| |
DirtyPageState | getDirtyState () |
| |
void | setDirtyState (DirtyPageState newState) |
Sets a page's dirty state. | |
IntrusiveDListNode * | getNext () const |
IntrusiveDListNode * | getPrev () const |
void | detach () |
void | insertBefore (IntrusiveDListNode &newNext) |
void | insertAfter (IntrusiveDListNode &newPrev) |
Private Attributes | |
CachePage * | pParentPage |
Pointer to the parent page corresponding to this dirty object. | |
DirtyPageState | dirtyState |
The state of the dirty page. |
Objects representing dirty pages are linked together in doubly-linked lists with back pointers to the dirty parent pages. The lists are subsets of the full 2Q page queues, as they consist of only the dirty pages.
Definition at line 203 of file TwoQVictimPolicy.h.
Enumeration indicating whether a page is dirty and if so, which queue the dirty page is in.
Definition at line 211 of file TwoQVictimPolicy.h.
00211 { 00215 PAGE_CLEAN, 00216 00220 PAGE_DIRTY_POPULAR_UNPINNED, 00221 00225 PAGE_DIRTY_FRESHMAN, 00226 00230 PAGE_DIRTY_POPULAR_PINNED 00231 };
void TwoQDirtyPage::setParentPage | ( | CachePage & | parentPageInit | ) | [inline] |
Sets the parent page corresponding to the dirty object.
parentPageInit | the parent page |
Definition at line 250 of file TwoQVictimPolicy.h.
00251 { 00252 pParentPage = &parentPageInit; 00253 }
CachePage& TwoQDirtyPage::getParentPage | ( | ) | [inline] |
Definition at line 258 of file TwoQVictimPolicy.h.
Referenced by TwoQDirtyPageListIter< PageT >::getReturnElement().
00259 { 00260 return *pParentPage; 00261 }
DirtyPageState TwoQDirtyPage::getDirtyState | ( | ) | [inline] |
Definition at line 266 of file TwoQVictimPolicy.h.
Referenced by TwoQVictimPolicy< PageT >::notifyPageClean(), TwoQVictimPolicy< PageT >::notifyPageDirty(), TwoQVictimPolicy< PageT >::notifyPageNice(), TwoQVictimPolicy< PageT >::notifyPageUnmap(), TwoQVictimPolicy< PageT >::notifyPageUnpin(), and TwoQVictimPolicy< PageT >::notifyPopularPageAccess().
00267 { 00268 return dirtyState; 00269 }
void TwoQDirtyPage::setDirtyState | ( | DirtyPageState | newState | ) | [inline] |
Sets a page's dirty state.
newState | the new dirty state value for a page |
Definition at line 276 of file TwoQVictimPolicy.h.
Referenced by TwoQVictimPolicy< PageT >::notifyPageClean(), TwoQVictimPolicy< PageT >::notifyPageDirty(), TwoQVictimPolicy< PageT >::notifyPageUnmap(), TwoQVictimPolicy< PageT >::notifyPageUnpin(), and TwoQVictimPolicy< PageT >::notifyPopularPageAccess().
00277 { 00278 dirtyState = newState; 00279 }
IntrusiveDListNode* IntrusiveDListNode::getNext | ( | ) | const [inline, inherited] |
Definition at line 45 of file IntrusiveDList.h.
Referenced by TwoQPageQueue::moveToTail(), TwoQPageQueue::remove(), and TwoQPageQueue::validateQueue().
00046 { 00047 return pNext; 00048 }
IntrusiveDListNode* IntrusiveDListNode::getPrev | ( | ) | const [inline, inherited] |
Definition at line 50 of file IntrusiveDList.h.
Referenced by TwoQPageQueue::moveToHead(), TwoQPageQueue::remove(), and TwoQPageQueue::validateQueue().
00051 { 00052 return pPrev; 00053 }
void IntrusiveDListNode::detach | ( | ) | [inline, inherited] |
Definition at line 55 of file IntrusiveDList.h.
Referenced by TwoQPageQueue::moveToHead(), TwoQPageQueue::moveToTail(), and TwoQPageQueue::remove().
00056 { 00057 if (pNext) { 00058 pNext->pPrev = pPrev; 00059 } 00060 if (pPrev) { 00061 pPrev->pNext = pNext; 00062 } 00063 pPrev = pNext = NULL; 00064 }
void IntrusiveDListNode::insertBefore | ( | IntrusiveDListNode & | newNext | ) | [inline, inherited] |
Definition at line 66 of file IntrusiveDList.h.
References IntrusiveDListNode::pNext, and IntrusiveDListNode::pPrev.
Referenced by TwoQPageQueue::insertAtHead(), and TwoQPageQueue::moveToHead().
00067 { 00068 pNext = &newNext; 00069 pPrev = pNext->pPrev; 00070 pNext->pPrev = this; 00071 if (pPrev) { 00072 pPrev->pNext = this; 00073 } 00074 }
void IntrusiveDListNode::insertAfter | ( | IntrusiveDListNode & | newPrev | ) | [inline, inherited] |
Definition at line 76 of file IntrusiveDList.h.
References IntrusiveDListNode::pNext, and IntrusiveDListNode::pPrev.
Referenced by TwoQPageQueue::insertAtTail(), and TwoQPageQueue::moveToTail().
00077 { 00078 pPrev = &newPrev; 00079 pNext = pPrev->pNext; 00080 pPrev->pNext = this; 00081 if (pNext) { 00082 pNext->pPrev = this; 00083 } 00084 }
CachePage* TwoQDirtyPage::pParentPage [private] |
Pointer to the parent page corresponding to this dirty object.
Definition at line 237 of file TwoQVictimPolicy.h.
DirtyPageState TwoQDirtyPage::dirtyState [private] |