#include <file_pool.hpp>
Public Member Functions | |
| file_pool (int size=40) | |
| boost::shared_ptr< file > | open_file (void *st, fs::path const &p, file::open_mode m) |
| void | release (void *st) |
| void | resize (int size) |
Private Types | |
| typedef multi_index_container < lru_file_entry, indexed_by < ordered_unique< member < lru_file_entry, fs::path,&lru_file_entry::file_path > >, ordered_non_unique< member < lru_file_entry, pt::ptime,&lru_file_entry::last_use > >, ordered_non_unique< member < lru_file_entry, void *,&lru_file_entry::key > > > > | file_set |
Private Attributes | |
| int | m_size |
| file_set | m_files |
| boost::mutex | m_mutex |
Classes | |
| struct | lru_file_entry |
Definition at line 65 of file file_pool.hpp.
typedef multi_index_container< lru_file_entry, indexed_by< ordered_unique<member<lru_file_entry, fs::path , &lru_file_entry::file_path> > , ordered_non_unique<member<lru_file_entry, pt::ptime , &lru_file_entry::last_use> > , ordered_non_unique<member<lru_file_entry, void* , &lru_file_entry::key> > > > libtorrent::file_pool::file_set [private] |
Definition at line 97 of file file_pool.hpp.
| libtorrent::file_pool::file_pool | ( | int | size = 40 |
) | [inline] |
Definition at line 67 of file file_pool.hpp.
| boost::shared_ptr< file > libtorrent::file_pool::open_file | ( | void * | st, | |
| fs::path const & | p, | |||
| file::open_mode | m | |||
| ) |
Definition at line 17 of file file_pool.cpp.
References simple_client::e, libtorrent::file_pool::lru_file_entry::file_path, libtorrent::file_pool::lru_file_entry::file_ptr, asio::placeholders::iterator, libtorrent::file_pool::lru_file_entry::key, l, libtorrent::file_pool::lru_file_entry::last_use, m_files, m_mutex, m_size, and libtorrent::file_pool::lru_file_entry::mode.
| void libtorrent::file_pool::release | ( | void * | st | ) |
Definition at line 68 of file file_pool.cpp.
References asio::placeholders::iterator, l, m_files, and m_mutex.
Referenced by libtorrent::storage::impl::~impl().
| void libtorrent::file_pool::resize | ( | int | size | ) |
Definition at line 82 of file file_pool.cpp.
References asio::placeholders::iterator, l, m_files, m_mutex, and m_size.
Referenced by libtorrent::aux::session_impl::set_settings().
int libtorrent::file_pool::m_size [private] |
file_set libtorrent::file_pool::m_files [private] |
boost::mutex libtorrent::file_pool::m_mutex [private] |
1.5.6