Stxxl
1.3.2
|
Functional interface of a request. More...
#include <request_interface.h>
Public Types | |
enum | request_type { READ, WRITE } |
typedef stxxl::external_size_type | offset_type |
typedef stxxl::internal_size_type | size_type |
Public Member Functions | |
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. More... | |
virtual bool | cancel ()=0 |
Cancel a request. More... | |
virtual bool | poll ()=0 |
Polls the status of the request. More... | |
virtual const char * | io_type () const =0 |
Identifies the type of I/O implementation. More... | |
virtual std::ostream & | print (std::ostream &out) const =0 |
Dumps properties of a request. More... | |
Protected Member Functions | |
virtual void | notify_waiters ()=0 |
virtual void | completed ()=0 |
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.
|
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 request_with_state.
|
pure virtual |
Identifies the type of I/O implementation.
Implemented in serving_request.
|
pure virtual |
Polls the status of the request.
true
if request is completed, otherwise false
Implemented in request_with_state.
Referenced by buffered_writer< typed_block >::get_free_block().
|
pure virtual |
Dumps properties of a request.
Implemented in request.
|
pure virtual |
Suspends calling thread until completion of the request.
Implemented in request_with_state.
Referenced by block_prefetcher< block_type, bid_iterator_type >::block_consumed(), buffered_writer< typed_block >::flush(), ksort(), fileperblock_file< base_file_type >::lock(), stream::runs_creator< use_push< ValueType_ >, Cmp_, BlockSize_, AllocStr_ >::push(), sort(), stable_ksort(), buffered_writer< typed_block >::write(), block_prefetcher< block_type, bid_iterator_type >::~block_prefetcher(), and buffered_writer< typed_block >::~buffered_writer().