SimpleLruPage
from panda3d.core import SimpleLruPage
- class SimpleLruPage
Bases:
DTOOL_SUPER_BASE
One atomic piece that may be managed by a SimpleLru chain. To use this class, inherit from it and override evict_lru().
Inheritance diagram
- __init__(*args, **kwargs)
- assign()
C++ Interface: assign(const SimpleLruPage self, const SimpleLruPage copy)
- dequeueLru()
C++ Interface: dequeue_lru(const SimpleLruPage self)
- /**
Removes the page from its SimpleLru.
*/
- dequeue_lru()
C++ Interface: dequeue_lru(const SimpleLruPage self)
- /**
Removes the page from its SimpleLru.
*/
- enqueueLru()
C++ Interface: enqueue_lru(const SimpleLruPage self, SimpleLru lru)
- /**
Adds the page to the LRU for the first time, or marks it recently-accessed
if it has already been added.
If lru is NULL, it means to remove this page from its LRU.
*/
- enqueue_lru()
C++ Interface: enqueue_lru(const SimpleLruPage self, SimpleLru lru)
- /**
Adds the page to the LRU for the first time, or marks it recently-accessed
if it has already been added.
If lru is NULL, it means to remove this page from its LRU.
*/
- evictLru()
C++ Interface: evict_lru(const SimpleLruPage self)
- /**
Evicts the page from the LRU. Called internally when the LRU determines
that it is full. May also be called externally when necessary to
explicitly evict the page.
It is legal for this method to either evict the page as requested, do
nothing (in which case the eviction will be requested again at the next
epoch), or requeue itself on the tail of the queue (in which case the
eviction will be requested again much later).
*/
- evict_lru()
C++ Interface: evict_lru(const SimpleLruPage self)
- /**
Evicts the page from the LRU. Called internally when the LRU determines
that it is full. May also be called externally when necessary to
explicitly evict the page.
It is legal for this method to either evict the page as requested, do
nothing (in which case the eviction will be requested again at the next
epoch), or requeue itself on the tail of the queue (in which case the
eviction will be requested again much later).
*/
- getLru()
C++ Interface: get_lru(SimpleLruPage self)
- /**
Returns the LRU that manages this page, or NULL if it is not currently
managed by any LRU.
*/
- getLruSize()
C++ Interface: get_lru_size(SimpleLruPage self)
- /**
Returns the size of this page as reported to the LRU, presumably in bytes.
*/
- get_lru()
C++ Interface: get_lru(SimpleLruPage self)
- /**
Returns the LRU that manages this page, or NULL if it is not currently
managed by any LRU.
*/
- get_lru_size()
C++ Interface: get_lru_size(SimpleLruPage self)
- /**
Returns the size of this page as reported to the LRU, presumably in bytes.
*/
- markUsedLru()
C++ Interface: mark_used_lru(SimpleLruPage self) mark_used_lru(const SimpleLruPage self, SimpleLru lru)
- /**
To be called when the page is used; this will move it to the tail of the
SimpleLru queue it is already on.
This method is const because it’s not technically modifying the contents of
the page itself.
*/
- /**
To be called when the page is used; this will move it to the tail of the
specified SimpleLru queue.
*/
- mark_used_lru()
C++ Interface: mark_used_lru(SimpleLruPage self) mark_used_lru(const SimpleLruPage self, SimpleLru lru)
- /**
To be called when the page is used; this will move it to the tail of the
SimpleLru queue it is already on.
This method is const because it’s not technically modifying the contents of
the page itself.
*/
- /**
To be called when the page is used; this will move it to the tail of the
specified SimpleLru queue.
*/
- setLruSize()
C++ Interface: set_lru_size(const SimpleLruPage self, int lru_size)
- /**
Specifies the size of this page, presumably in bytes, although any unit is
possible.
*/