|
Stxxl
1.4.0
|
Request with basic properties like file and offset. More...
#include <request.h>


Public Member Functions | |
| int | nref () |
| request (const completion_handler &on_compl, file *file__, void *buffer_, offset_type offset_, size_type bytes_, request_type type_) | |
| virtual | ~request () |
| file * | get_file () const |
| void * | get_buffer () const |
| offset_type | get_offset () const |
| size_type | get_size () const |
| request_type | get_type () const |
| void | check_alignment () const |
| std::ostream & | print (std::ostream &out) const |
| Dumps properties of a request. | |
| void | error_occured (const char *msg) |
| Inform the request object that an error occurred during the I/O execution. | |
| void | error_occured (const std::string &msg) |
| Inform the request object that an error occurred during the I/O execution. | |
| void | check_errors () throw (stxxl::io_error) |
| Rises an exception if there were error with the I/O. | |
Protected Member Functions | |
| void | completed () |
| void | check_nref (bool after=false) |
Protected Attributes | |
| completion_handler | on_complete |
| int | ref_cnt |
| compat_unique_ptr < stxxl::io_error >::result | error |
| mutex | ref_cnt_mutex |
| file * | file_ |
| void * | buffer |
| offset_type | offset |
| size_type | bytes |
| request_type | type |
Private Member Functions | |
| void | add_ref () |
| bool | sub_ref () |
| void | check_nref_failed (bool after) |
Request with basic properties like file and offset.
| stxxl::request::request | ( | const completion_handler & | on_compl, |
| file * | file__, | ||
| void * | buffer_, | ||
| offset_type | offset_, | ||
| size_type | bytes_, | ||
| request_type | type_ | ||
| ) |
Definition at line 22 of file request.cpp.
References stxxl::file::add_request_ref(), file_, and ref_cnt.
| stxxl::request::~request | ( | ) | [virtual] |
Definition at line 39 of file request.cpp.
References ref_cnt.
| void stxxl::request::add_ref | ( | ) | [inline, private] |
Definition at line 108 of file request.h.
Referenced by stxxl::request_ptr::add_ref().
| void stxxl::request::check_alignment | ( | ) | const |
Definition at line 52 of file request.cpp.
References BLOCK_ALIGN, buffer, bytes, and offset.
Referenced by stxxl::serving_request::serving_request().
| void stxxl::request::check_errors | ( | ) | throw (stxxl::io_error) [inline] |
| void stxxl::request::check_nref | ( | bool | after = false | ) | [inline, protected] |
Definition at line 128 of file request.h.
Referenced by stxxl::serving_request::serve().
| void stxxl::request::check_nref_failed | ( | bool | after | ) | [private] |
Definition at line 68 of file request.cpp.
References buffer, bytes, get_file(), stxxl::request_interface::io_type(), nref(), offset, stxxl::request_interface::READ, and type.
| void stxxl::request::completed | ( | ) | [protected, virtual] |
Implements stxxl::request_interface.
Reimplemented in stxxl::serving_request.
Definition at line 44 of file request.cpp.
References stxxl::file::delete_request_ref(), file_, stxxl::request_interface::notify_waiters(), and on_complete.
| void stxxl::request::error_occured | ( | const char * | msg | ) | [inline] |
Inform the request object that an error occurred during the I/O execution.
Definition at line 88 of file request.h.
Referenced by stxxl::serving_request::serve().
| void stxxl::request::error_occured | ( | const std::string & | msg | ) | [inline] |
| void* stxxl::request::get_buffer | ( | ) | const [inline] |
| file* stxxl::request::get_file | ( | ) | const [inline] |
Definition at line 76 of file request.h.
Referenced by check_nref_failed(), and print().
| offset_type stxxl::request::get_offset | ( | ) | const [inline] |
| size_type stxxl::request::get_size | ( | ) | const [inline] |
| request_type stxxl::request::get_type | ( | ) | const [inline] |
Definition at line 80 of file request.h.
Referenced by stxxl::request_queue_impl_qwqr::add_request(), stxxl::request_queue_impl_qwqr::cancel_request(), and print().
| int stxxl::request::nref | ( | ) | [inline] |
Definition at line 61 of file request.h.
Referenced by check_nref_failed(), and stxxl::request_queue_impl_qwqr::worker().
| std::ostream & stxxl::request::print | ( | std::ostream & | out | ) | const [virtual] |
Dumps properties of a request.
Implements stxxl::request_interface.
Definition at line 83 of file request.cpp.
References get_buffer(), get_file(), get_offset(), get_size(), get_type(), and stxxl::request_interface::READ.
Referenced by stxxl::operator<<().
| bool stxxl::request::sub_ref | ( | ) | [inline, private] |
void* stxxl::request::buffer [protected] |
Definition at line 52 of file request.h.
Referenced by check_alignment(), check_nref_failed(), and stxxl::serving_request::serve().
size_type stxxl::request::bytes [protected] |
Definition at line 54 of file request.h.
Referenced by check_alignment(), check_nref_failed(), and stxxl::serving_request::serve().
compat_unique_ptr<stxxl::io_error>::result stxxl::request::error [protected] |
file* stxxl::request::file_ [protected] |
Definition at line 51 of file request.h.
Referenced by completed(), stxxl::serving_request::io_type(), request(), and stxxl::serving_request::serve().
offset_type stxxl::request::offset [protected] |
Definition at line 53 of file request.h.
Referenced by check_alignment(), check_nref_failed(), and stxxl::serving_request::serve().
completion_handler stxxl::request::on_complete [protected] |
Definition at line 44 of file request.h.
Referenced by completed().
int stxxl::request::ref_cnt [protected] |
Definition at line 45 of file request.h.
Referenced by request(), and ~request().
mutex stxxl::request::ref_cnt_mutex [protected] |
request_type stxxl::request::type [protected] |
Definition at line 55 of file request.h.
Referenced by check_nref_failed(), and stxxl::serving_request::serve().
1.7.6.1