Stxxl  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
stxxl::disk_queued_file Class Reference

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

#include <disk_queued_file.h>

Inheritance diagram for stxxl::disk_queued_file:
Inheritance graph
[legend]
Collaboration diagram for stxxl::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.

Private Attributes

int queue_id
int allocator_id

Detailed Description

Implementation of some file methods based on serving_request.

Definition at line 26 of file disk_queued_file.h.


Constructor & Destructor Documentation

stxxl::disk_queued_file::disk_queued_file ( int  queue_id,
int  allocator_id 
) [inline]

Definition at line 31 of file disk_queued_file.h.


Member Function Documentation

request_ptr stxxl::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:
bufferpointer to memory buffer to read into
posfile position to start read from
bytesnumber of bytes to transfer
on_cmplI/O completion handler
Returns:
request_ptr request object, which can be used to track the status of the operation

Implements stxxl::file.

Definition at line 21 of file disk_queued_file.cpp.

Referenced by main().

request_ptr stxxl::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:
bufferpointer to memory buffer to write from
posstarting file position to write
bytesnumber of bytes to transfer
on_cmplI/O completion handler
Returns:
request_ptr request object, which can be used to track the status of the operation

Implements stxxl::file.

Definition at line 35 of file disk_queued_file.cpp.

Referenced by main().

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

Returns the file's allocator.

Returns:
allocator number

Implements stxxl::file.

Definition at line 49 of file disk_queued_file.h.

virtual int stxxl::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 stxxl::file.

Definition at line 44 of file disk_queued_file.h.


Member Data Documentation

Definition at line 28 of file disk_queued_file.h.

Definition at line 28 of file disk_queued_file.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines