STXXL
1.4.1
|
Functional interface of a request.
Since all library I/O operations are asynchronous, one needs to keep track of their status: e.g. whether an I/O operation completed or not.
Definition at line 36 of file request_interface.h.
Public Types | |
typedef stxxl::external_size_type | offset_type |
enum | request_type { READ, WRITE } |
typedef stxxl::internal_size_type | size_type |
Public Member Functions | |
virtual | ~request_interface () |
virtual bool | add_waiter (onoff_switch *sw)=0 |
virtual bool | cancel ()=0 |
Cancel a request. More... | |
virtual void | delete_waiter (onoff_switch *sw)=0 |
virtual const char * | io_type () const =0 |
Identifies the type of I/O implementation. More... | |
virtual bool | poll ()=0 |
Polls the status of the request. More... | |
virtual std::ostream & | print (std::ostream &out) const =0 |
Dumps properties of a request. More... | |
virtual void | wait (bool measure_time=true)=0 |
Suspends calling thread until completion of the request. More... | |
Protected Member Functions | |
virtual void | completed (bool canceled)=0 |
virtual void | notify_waiters ()=0 |
Additional Inherited Members | |
Private Member Functions inherited from stxxl::noncopyable | |
noncopyable () | |
Definition at line 39 of file request_interface.h.
Definition at line 40 of file request_interface.h.
Enumerator | |
---|---|
READ | |
WRITE |
Definition at line 41 of file request_interface.h.
|
inlinevirtual |
Definition at line 77 of file request_interface.h.
|
pure virtual |
Implemented in stxxl::request_with_waiters.
|
pure virtual |
Cancel a request.
The request is canceled unless already being processed. However, cancelation cannot be guaranteed. Canceled requests must still be waited for in order to ensure correct operation. If the request was canceled successfully, the completion handler will not be called.
true
iff the request was canceled successfully Implemented in stxxl::linuxaio_request, and stxxl::request_with_state.
|
protectedpure virtual |
Implemented in stxxl::linuxaio_request, and stxxl::request_with_state.
Referenced by stxxl::linuxaio_queue::handle_events().
|
pure virtual |
Implemented in stxxl::request_with_waiters.
|
pure virtual |
Identifies the type of I/O implementation.
Implemented in stxxl::request, and stxxl::serving_request.
|
protectedpure virtual |
Implemented in stxxl::request_with_waiters.
|
pure virtual |
Polls the status of the request.
true
if request is completed, otherwise false
Implemented in stxxl::request_with_state.
|
pure virtual |
Dumps properties of a request.
Implemented in stxxl::request.
|
pure virtual |
Suspends calling thread until completion of the request.
Implemented in stxxl::request_with_state.
Referenced by stxxl::swappable_block< ValueType, BlockSideLength *BlockSideLength >::clean_sync(), stxxl::stream::basic_runs_creator< Input, CompareType, BlockSize, AllocStr >::compute_result(), stxxl::ksort_local::create_runs(), stxxl::hash_map::block_cache< block_type >::get_subblock(), stxxl::btree::normal_leaf< KeyType, DataType, KeyCmp, LogNElem, BTreeType >::load(), stxxl::btree::normal_node< KeyType, KeyCmp, RawSize, BTreeType >::load(), stxxl::fileperblock_file< base_file_type >::lock(), stxxl::priority_queue_local::ext_merger< BlockType, Cmp, Arity, AllocStr >::multi_merge(), stxxl::btree::normal_leaf< KeyType, DataType, KeyCmp, LogNElem, BTreeType >::save(), stxxl::btree::normal_node< KeyType, KeyCmp, RawSize, BTreeType >::save(), and stxxl::linuxaio_file::serve().