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_) |
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.
|
virtual bool | add_waiter (onoff_switch *sw)=0 |
virtual void | delete_waiter (onoff_switch *sw)=0 |
virtual void | serve ()=0 |
virtual void | wait (bool measure_time=true)=0 |
| Suspends calling thread until completion of the request.
|
virtual bool | cancel ()=0 |
| Cancel a request.
|
virtual bool | poll ()=0 |
| Polls the status of the request.
|
virtual const char * | io_type () const =0 |
| Identifies the type of I/O implementation.
|
Protected Member Functions |
void | completed () |
void | check_nref (bool after=false) |
virtual void | notify_waiters ()=0 |
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 |
Additional Inherited Members |
enum | request_type { READ,
WRITE
} |
typedef stxxl::external_size_type | offset_type |
typedef stxxl::internal_size_type | size_type |
Detailed Description
Request with basic properties like file and offset.
Member Function Documentation
void request::check_errors |
( |
| ) |
throw (stxxl::io_error) |
|
inline |
void request::error_occured |
( |
const char * |
msg | ) |
|
|
inline |
Inform the request object that an error occurred during the I/O execution.
void request::error_occured |
( |
const std::string & |
msg | ) |
|
|
inline |
Inform the request object that an error occurred during the I/O execution.
std::ostream & request::print |
( |
std::ostream & |
out | ) |
const |
|
virtual |
The documentation for this class was generated from the following files: