Public Member Functions

disk_queued_file Class Reference
[File implementations]

Implementation of some file methods based on serving_request. More...

#include <disk_queued_file.h>

Inheritance diagram for disk_queued_file:
Inheritance graph
[legend]
Collaboration diagram for disk_queued_file:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 disk_queued_file (int queue_id, int allocator_id)
request_ptr aread (void *buffer, offset_type pos, size_type bytes, const completion_handler &on_cmpl)
 Schedules an asynchronous read request to the file.
request_ptr awrite (void *buffer, offset_type pos, size_type bytes, const completion_handler &on_cmpl)
 Schedules an asynchronous write request to the file.
virtual int get_queue_id () const
 Returns the identifier of the file's queue.
virtual int get_allocator_id () const
 Returns the file's allocator.

Detailed Description

Implementation of some file methods based on serving_request.


Member Function Documentation

__STXXL_BEGIN_NAMESPACE request_ptr disk_queued_file::aread ( void *  buffer,
offset_type  pos,
size_type  bytes,
const completion_handler on_cmpl 
) [virtual]

Schedules an asynchronous read request to the file.

Parameters:
buffer pointer to memory buffer to read into
pos file position to start read from
bytes number of bytes to transfer
on_cmpl I/O completion handler
Returns:
request_ptr request object, which can be used to track the status of the operation

Implements file.

References get_queue_id().

request_ptr disk_queued_file::awrite ( void *  buffer,
offset_type  pos,
size_type  bytes,
const completion_handler on_cmpl 
) [virtual]

Schedules an asynchronous write request to the file.

Parameters:
buffer pointer to memory buffer to write from
pos starting file position to write
bytes number of bytes to transfer
on_cmpl I/O completion handler
Returns:
request_ptr request object, which can be used to track the status of the operation

Implements file.

References get_queue_id().

virtual int disk_queued_file::get_allocator_id (  )  const [inline, virtual]

Returns the file's allocator.

Returns:
allocator number

Implements file.

virtual int disk_queued_file::get_queue_id (  )  const [inline, virtual]

Returns the identifier of the file's queue.

Remarks:
Files allocated on the same physical device usually share the same queue
Returns:
queue number

Implements file.

Referenced by aread(), and awrite().


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