STXXL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::disk_queues Class Reference

Detailed Description

Encapsulates disk queues.

Remarks
is a singleton

Definition at line 37 of file disk_queues.h.

+ Inheritance diagram for stxxl::disk_queues:
+ Collaboration diagram for stxxl::disk_queues:

Public Member Functions

 ~disk_queues ()
 
void add_request (request_ptr &req, DISKID disk)
 
bool cancel_request (request_ptr &req, DISKID disk)
 Cancel a request. The specified request is canceled unless already being processed. However, cancelation cannot be guaranteed. Cancelled requests must still be waited for in order to ensure correct operation. More...
 
request_queueget_queue (DISKID disk)
 
void set_priority_op (request_queue::priority_op op)
 Changes requests priorities. More...
 

Protected Member Functions

 disk_queues ()
 

Protected Attributes

request_queue_map queues
 

Private Types

typedef stxxl::int64 DISKID
 
typedef std::map< DISKID,
request_queue * > 
request_queue_map
 

Additional Inherited Members

- Static Public Member Functions inherited from stxxl::singleton< disk_queues >
static instance_pointer get_instance ()
 

Member Typedef Documentation

Definition at line 41 of file disk_queues.h.

Definition at line 42 of file disk_queues.h.

Constructor & Destructor Documentation

stxxl::disk_queues::disk_queues ( )
inlineprotected

Definition at line 46 of file disk_queues.h.

References stxxl::singleton< stats >::get_instance().

stxxl::disk_queues::~disk_queues ( )
inline

Definition at line 104 of file disk_queues.h.

Member Function Documentation

void stxxl::disk_queues::add_request ( request_ptr req,
DISKID  disk 
)
inline
bool stxxl::disk_queues::cancel_request ( request_ptr req,
DISKID  disk 
)
inline

Cancel a request. The specified request is canceled unless already being processed. However, cancelation cannot be guaranteed. Cancelled requests must still be waited for in order to ensure correct operation.

Parameters
reqrequest to cancel
diskdisk number for disk that req was scheduled on
Returns
true iff the request was canceled successfully

Definition at line 85 of file disk_queues.h.

request_queue* stxxl::disk_queues::get_queue ( DISKID  disk)
inline

Definition at line 96 of file disk_queues.h.

void stxxl::disk_queues::set_priority_op ( request_queue::priority_op  op)
inline

Changes requests priorities.

Parameters
opone of:
  • READ, read requests are served before write requests within a disk queue
  • WRITE, write requests are served before read requests within a disk queue
  • NONE, read and write requests are served by turns, alternately

Definition at line 116 of file disk_queues.h.

Member Data Documentation

request_queue_map stxxl::disk_queues::queues
protected

Definition at line 45 of file disk_queues.h.


The documentation for this class was generated from the following file: