#include <cache.h>
Inherits List< CICacheItem >.

Public Member Functions | |
| CICache (Preferences *preferences, ArrayList< PluginServer * > *plugindb) | |
| ~CICache () | |
| File * | check_out (Asset *asset, EDL *edl, int block=1) |
| int | check_in (Asset *asset) |
| int | delete_entry (Asset *asset) |
| int | delete_entry (char *path) |
| void | remove_all () |
| int | get_oldest () |
| int64_t | get_memory_usage (int use_lock) |
| int | delete_oldest () |
| int | age () |
| int | dump () |
Data Fields | |
| ArrayList< PluginServer * > * | plugindb |
Private Member Functions | |
| int | lock_all () |
| int | unlock_all () |
Private Attributes | |
| Mutex * | total_lock |
| Condition * | check_out_lock |
| EDL * | edl |
| Preferences * | preferences |
Friends | |
| class | CICacheItem |
Definition at line 45 of file cache.h.
| CICache::CICache | ( | Preferences * | preferences, | |
| ArrayList< PluginServer * > * | plugindb | |||
| ) |
| CICache::~CICache | ( | ) |
Definition at line 27 of file cache.C.
References check_out_lock, Garbage::delete_object(), List< CICacheItem >::last, List< CICacheItem >::remove_pointer(), and total_lock.

Definition at line 45 of file cache.C.
References CICacheItem::age, List< CICacheItem >::append(), CICacheItem::asset, check_out_lock, CICacheItem::checked_out, CICacheItem, Garbage::delete_object(), CICacheItem::file, List< CICacheItem >::first, Condition::lock(), Mutex::lock(), NEXT, EDL::next_id(), Asset::path, List< CICacheItem >::remove_pointer(), total_lock, and Mutex::unlock().
Referenced by AssetPicon::create_objects(), ResourceThread::do_audio(), ResourceThread::do_video(), ResourcePixmap::draw_audio_source(), VRender::get_colormodel(), VModule::import_frame(), VRender::process_buffer(), and VEdit::read_frame().

| int CICache::check_in | ( | Asset * | asset | ) |
Definition at line 111 of file cache.C.
References age(), CICacheItem::asset, check_out_lock, CICacheItem::checked_out, List< CICacheItem >::first, Mutex::lock(), NEXT, Asset::path, total_lock, Condition::unlock(), and Mutex::unlock().
Referenced by AssetPicon::create_objects(), ResourceThread::do_audio(), ResourceThread::do_video(), ResourcePixmap::draw_audio_source(), VRender::get_colormodel(), VModule::import_frame(), VRender::process_buffer(), VEdit::read_frame(), and AModule::render().

| int CICache::delete_entry | ( | Asset * | asset | ) |
Definition at line 177 of file cache.C.
References CICacheItem::asset, CICacheItem::checked_out, Garbage::delete_object(), List< CICacheItem >::first, Mutex::lock(), NEXT, Asset::path, List< CICacheItem >::remove_pointer(), total_lock, and Mutex::unlock().
Referenced by MWindow::remove_asset_from_caches().

| int CICache::delete_entry | ( | char * | path | ) |
Definition at line 157 of file cache.C.
References Garbage::delete_object(), List< CICacheItem >::first, Mutex::lock(), NEXT, List< CICacheItem >::remove_pointer(), total_lock, and Mutex::unlock().

| void CICache::remove_all | ( | ) |
Definition at line 138 of file cache.C.
References CICacheItem::checked_out, Garbage::delete_object(), List< CICacheItem >::first, Mutex::lock(), ListItem< TYPE >::next, List< CICacheItem >::remove_pointer(), total_lock, and Mutex::unlock().
Referenced by MWindow::reset_caches().

| int CICache::get_oldest | ( | ) |
Definition at line 240 of file cache.C.
References CICacheItem::age, List< CICacheItem >::last, Mutex::lock(), oldest, PREVIOUS, total_lock, and Mutex::unlock().
Referenced by MWindow::age_caches().

| int64_t CICache::get_memory_usage | ( | int | use_lock | ) |
Definition at line 226 of file cache.C.
References CICacheItem::file, List< CICacheItem >::first, File::get_memory_usage(), Mutex::lock(), NEXT, total_lock, and Mutex::unlock().
Referenced by age(), MWindow::age_caches(), and dump().

| int CICache::delete_oldest | ( | ) |
Definition at line 257 of file cache.C.
References CICacheItem::age, CICacheItem::checked_out, Garbage::delete_object(), CICacheItem::file, List< CICacheItem >::last, Mutex::lock(), oldest, PREVIOUS, File::purge_cache(), List< CICacheItem >::remove_pointer(), total_lock, and Mutex::unlock().
Referenced by age(), and MWindow::age_caches().

| int CICache::age | ( | ) |
Definition at line 201 of file cache.C.
References Preferences::cache_size, delete_oldest(), get_memory_usage(), and preferences.
Referenced by check_in(), VModule::import_frame(), and AModule::render().

| int CICache::dump | ( | ) |
Definition at line 306 of file cache.C.
References CICacheItem::age, CICacheItem::asset, List< CICacheItem >::first, get_memory_usage(), Mutex::lock(), NEXT, Asset::path, total_lock, and Mutex::unlock().

| int CICache::lock_all | ( | ) | [private] |
| int CICache::unlock_all | ( | ) | [private] |
friend class CICacheItem [friend] |
Mutex* CICache::total_lock [private] |
Definition at line 103 of file cache.h.
Referenced by check_in(), check_out(), CICache(), delete_entry(), delete_oldest(), dump(), get_memory_usage(), get_oldest(), remove_all(), and ~CICache().
Condition* CICache::check_out_lock [private] |
Definition at line 104 of file cache.h.
Referenced by check_in(), check_out(), CICache(), and ~CICache().
EDL* CICache::edl [private] |
Preferences* CICache::preferences [private] |
1.5.5