|
STXXL
1.4.0
|
Request which serves an I/O by calling the synchronous routine of the file.
Definition at line 26 of file serving_request.h.
Inheritance diagram for stxxl::serving_request:
Collaboration diagram for stxxl::serving_request:Public Member Functions | |
| serving_request (const completion_handler &on_cmpl, file *f, void *buf, offset_type off, size_type b, request_type t) | |
| const char * | io_type () const |
| Identifies the type of I/O implementation. More... | |
Public Member Functions inherited from stxxl::request_with_state | |
| virtual | ~request_with_state () |
| bool | cancel () |
| Cancel a request. More... | |
| bool | poll () |
| Polls the status of the request. More... | |
| void | wait (bool measure_time=true) |
| Suspends calling thread until completion of the request. More... | |
Public Member Functions inherited from stxxl::request | |
| request (const completion_handler &on_compl, file *file__, void *buffer_, offset_type offset_, size_type bytes_, request_type type_) | |
| virtual | ~request () |
| void | check_alignment () const |
| void | check_errors () throw (stxxl::io_error) |
| Rises an exception if there were error with the I/O. More... | |
| void | error_occured (const char *msg) |
| Inform the request object that an error occurred during the I/O execution. More... | |
| void | error_occured (const std::string &msg) |
| Inform the request object that an error occurred during the I/O execution. More... | |
| void * | get_buffer () const |
| file * | get_file () const |
| offset_type | get_offset () const |
| size_type | get_size () const |
| request_type | get_type () const |
| std::ostream & | print (std::ostream &out) const |
| Dumps properties of a request. More... | |
Public Member Functions inherited from stxxl::request_interface | |
| virtual | ~request_interface () |
Public Member Functions inherited from stxxl::atomic_counted_object | |
| atomic_counted_object () | |
| new objects have zero reference count More... | |
| atomic_counted_object (const atomic_counted_object &) | |
| coping still creates a new object with zero reference count More... | |
| ~atomic_counted_object () | |
| bool | dec_reference () const |
| Call whenever resetting (i.e. overwriting) a pointer to the object. IMPORTANT: In case of self-assignment, call AFTER inc_reference(). More... | |
| unsigned_type | get_reference_count () const |
| Return the number of references to this object (for debugging) More... | |
| void | inc_reference () const |
| Call whenever setting a pointer to the object. More... | |
| atomic_counted_object & | operator= (const atomic_counted_object &) |
| assignment operator, leaves pointers unchanged More... | |
| bool | unique () const |
| Test if the counted_object is referenced by only one counting_ptr. More... | |
Protected Member Functions | |
| void | completed () |
| void | serve () |
Protected Member Functions inherited from stxxl::request_with_state | |
| request_with_state (const completion_handler &on_cmpl, file *f, void *buf, offset_type off, size_type b, request_type t) | |
Protected Member Functions inherited from stxxl::request | |
| void | check_nref (bool after=false) |
Protected Member Functions inherited from stxxl::request_with_waiters | |
| bool | add_waiter (onoff_switch *sw) |
| void | delete_waiter (onoff_switch *sw) |
| void | notify_waiters () |
Additional Inherited Members | |
Public Types inherited from stxxl::request_interface | |
| typedef stxxl::external_size_type | offset_type |
| enum | request_type { READ, WRITE } |
| typedef stxxl::internal_size_type | size_type |
Protected Types inherited from stxxl::request_with_state | |
| enum | request_state { OP = 0, DONE = 1, READY2DIE = 2 } |
| states of request OP - operating, DONE - request served, READY2DIE - can be destroyed More... | |
Protected Attributes inherited from stxxl::request_with_state | |
| state< request_state > | _state |
Protected Attributes inherited from stxxl::request | |
| void * | buffer |
| size_type | bytes |
| compat_unique_ptr < stxxl::io_error >::result | error |
| file * | file_ |
| offset_type | offset |
| completion_handler | on_complete |
| request_type | type |
| stxxl::serving_request::serving_request | ( | const completion_handler & | on_cmpl, |
| file * | f, | ||
| void * | buf, | ||
| offset_type | off, | ||
| size_type | b, | ||
| request_type | t | ||
| ) |
Definition at line 28 of file serving_request.cpp.
References stxxl::request::check_alignment().
|
protectedvirtual |
Reimplemented from stxxl::request.
Definition at line 70 of file serving_request.cpp.
References stxxl::request_with_state::_state, stxxl::request::completed(), stxxl::request_with_state::DONE, stxxl::request_with_state::READY2DIE, stxxl::state< ValueType >::set_to(), and STXXL_VERBOSE2.
Referenced by serve().
|
virtual |
Identifies the type of I/O implementation.
Implements stxxl::request_interface.
Definition at line 78 of file serving_request.cpp.
References stxxl::request::file_, and stxxl::file::io_type().
|
protectedvirtual |
Implements stxxl::request_interface.
Definition at line 45 of file serving_request.cpp.
References stxxl::request::buffer, stxxl::request::bytes, stxxl::request::check_nref(), completed(), stxxl::request::error_occured(), stxxl::request::file_, stxxl::file::get_allocator_id(), stxxl::request::offset, stxxl::request_interface::READ, stxxl::file::serve(), STXXL_VERBOSE2, and stxxl::request::type.