#include <TwoQVictimPolicy.h>
Inheritance diagram for TwoQVictim:

Public Types | |
| enum | PageState { PAGE_STATE_POPULAR_PINNED, PAGE_STATE_POPULAR_UNPINNED, PAGE_STATE_FRESHMAN, PAGE_STATE_FREE } |
| Enumeration of possible state values for a page when used with TwoQVictimPolicy. More... | |
Public Member Functions | |
| TwoQVictim () | |
| PageState | getState () |
| |
| void | setState (PageState newState) |
| Sets a page's state. | |
| TwoQDirtyPage & | getDirtyPageNode () |
| |
| IntrusiveDListNode * | getNext () const |
| IntrusiveDListNode * | getPrev () const |
| void | detach () |
| void | insertBefore (IntrusiveDListNode &newNext) |
| void | insertAfter (IntrusiveDListNode &newPrev) |
Private Attributes | |
| PageState | state |
| State of the page. | |
| TwoQDirtyPage | dirtyPageNode |
| Contains information about dirty pages. | |
Definition at line 286 of file TwoQVictimPolicy.h.
Enumeration of possible state values for a page when used with TwoQVictimPolicy.
Definition at line 294 of file TwoQVictimPolicy.h.
00294 { 00298 PAGE_STATE_POPULAR_PINNED, 00302 PAGE_STATE_POPULAR_UNPINNED, 00306 PAGE_STATE_FRESHMAN, 00310 PAGE_STATE_FREE 00311 };
| TwoQVictim::TwoQVictim | ( | ) | [inline] |
Definition at line 326 of file TwoQVictimPolicy.h.
References TwoQDirtyPage::PAGE_CLEAN.
00327 { 00328 state = PAGE_STATE_FREE; 00329 dirtyPageNode.setDirtyState(TwoQDirtyPage::PAGE_CLEAN); 00330 }
| PageState TwoQVictim::getState | ( | ) | [inline] |
Definition at line 335 of file TwoQVictimPolicy.h.
00336 { 00337 return state; 00338 }
| void TwoQVictim::setState | ( | PageState | newState | ) | [inline] |
Sets a page's state.
| newState | the new state value for a page |
Definition at line 345 of file TwoQVictimPolicy.h.
00346 { 00347 state = newState; 00348 }
| TwoQDirtyPage& TwoQVictim::getDirtyPageNode | ( | ) | [inline] |
Definition at line 353 of file TwoQVictimPolicy.h.
00354 { 00355 return dirtyPageNode; 00356 }
| 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 }
PageState TwoQVictim::state [private] |
TwoQDirtyPage TwoQVictim::dirtyPageNode [private] |
1.5.1