RandomAccessRequest Class Reference

RandomAccessRequest represents one logical unit of I/O against a RandomAccessDevice. More...

#include <RandomAccessRequest.h>

List of all members.

Public Types

enum  Type { READ, WRITE }
typedef IntrusiveList< RandomAccessRequestBinding > BindingList
typedef IntrusiveListIter<
RandomAccessRequestBinding > 
BindingListIter
typedef IntrusiveListMutator<
RandomAccessRequestBinding > 
BindingListMutator

Public Member Functions

void execute ()
 Executes this request.

Public Attributes

RandomAccessDevice * pDevice
 The device to be accessed.
FileSize cbOffset
 Byte offset within device at which access should start.
FileSize cbTransfer
 Number of bytes to be transferred.
Type type
 Access type: READ for transfer from device to memory; WRITE for transfer from memory to device.
BindingList bindingList
 Bindings for memory source or destination and notifications.


Detailed Description

RandomAccessRequest represents one logical unit of I/O against a RandomAccessDevice.

Currently supported operations are reads and writes spanning a contiguous range of byte offsets within the device. The RandomAccessRequestBinding memory locations need not be contiguous (scatter/gather).

Definition at line 94 of file RandomAccessRequest.h.


Member Typedef Documentation

typedef IntrusiveList<RandomAccessRequestBinding> RandomAccessRequest::BindingList

Definition at line 102 of file RandomAccessRequest.h.

typedef IntrusiveListIter<RandomAccessRequestBinding> RandomAccessRequest::BindingListIter

Definition at line 103 of file RandomAccessRequest.h.

typedef IntrusiveListMutator<RandomAccessRequestBinding> RandomAccessRequest::BindingListMutator

Definition at line 105 of file RandomAccessRequest.h.


Member Enumeration Documentation

enum RandomAccessRequest::Type

Enumerator:
READ 
WRITE 

Definition at line 97 of file RandomAccessRequest.h.

00097               {
00098         READ,
00099         WRITE
00100     };


Member Function Documentation

void RandomAccessRequest::execute (  ) 

Executes this request.

(Satisfies the ThreadPool Task signature, allowing instances of this class to be submitted directly as a Task by ThreadPoolScheduler).

Definition at line 137 of file DeviceAccessScheduler.cpp.

References pDevice, and RandomAccessDevice::transfer().

00138 {
00139     pDevice->transfer(*this);
00140 }


Member Data Documentation

RandomAccessDevice* RandomAccessRequest::pDevice

The device to be accessed.

It's a pointer rather than a reference so that RandomAccessRequest behaves as a concrete class.

Definition at line 111 of file RandomAccessRequest.h.

Referenced by SegPageBackupRestoreDevice::backupPage(), execute(), CacheImpl< PageT, VictimPolicyT >::prefetchBatch(), RandomAccessFileDevice::prepareTransfer(), SegPageBackupRestoreDevice::restorePage(), ThreadPoolScheduler::schedule(), IoCompletionPortScheduler::schedule(), AioSignalScheduler::schedule(), AioPollingScheduler::schedule(), AioLinuxScheduler::schedule(), RandomAccessFileDeviceTest::testAsyncIOImpl(), RandomAccessFileDevice::transfer(), and CacheImpl< PageT, VictimPolicyT >::transferPageAsync().

FileSize RandomAccessRequest::cbOffset

Byte offset within device at which access should start.

Definition at line 116 of file RandomAccessRequest.h.

Referenced by SegPageBackupRestoreDevice::backupPage(), CacheImpl< PageT, VictimPolicyT >::prefetchBatch(), RandomAccessFileDevice::prepareTransfer(), SegPageBackupRestoreDevice::restorePage(), ThreadPoolScheduler::schedule(), IoCompletionPortScheduler::schedule(), RandomAccessFileDeviceTest::testAsyncIOImpl(), FileDevice::transfer(), and CacheImpl< PageT, VictimPolicyT >::transferPageAsync().

FileSize RandomAccessRequest::cbTransfer

Number of bytes to be transferred.

Definition at line 121 of file RandomAccessRequest.h.

Referenced by SegPageBackupRestoreDevice::backupPage(), CacheImpl< PageT, VictimPolicyT >::prefetchBatch(), RandomAccessFileDevice::prepareTransfer(), SegPageBackupRestoreDevice::restorePage(), ThreadPoolScheduler::schedule(), IoCompletionPortScheduler::schedule(), RandomAccessFileDeviceTest::testAsyncIOImpl(), FileDevice::transfer(), and CacheImpl< PageT, VictimPolicyT >::transferPageAsync().

Type RandomAccessRequest::type

Access type: READ for transfer from device to memory; WRITE for transfer from memory to device.

Definition at line 127 of file RandomAccessRequest.h.

Referenced by SegPageBackupRestoreDevice::backupPage(), CacheImpl< PageT, VictimPolicyT >::prefetchBatch(), RandomAccessFileDevice::prepareTransfer(), SegPageBackupRestoreDevice::restorePage(), ThreadPoolScheduler::schedule(), IoCompletionPortScheduler::schedule(), AioSignalScheduler::schedule(), RandomAccessFileDeviceTest::testAsyncIOImpl(), FileDevice::transfer(), and CacheImpl< PageT, VictimPolicyT >::transferPageAsync().

BindingList RandomAccessRequest::bindingList

Bindings for memory source or destination and notifications.

Definition at line 132 of file RandomAccessRequest.h.

Referenced by SegPageBackupRestoreDevice::backupPage(), CacheImpl< PageT, VictimPolicyT >::prefetchBatch(), RandomAccessFileDevice::prepareTransfer(), SegPageBackupRestoreDevice::restorePage(), ThreadPoolScheduler::schedule(), IoCompletionPortScheduler::schedule(), AioSignalScheduler::schedule(), AioPollingScheduler::schedule(), AioLinuxScheduler::schedule(), RandomAccessFileDeviceTest::testAsyncIOImpl(), FileDevice::transfer(), and CacheImpl< PageT, VictimPolicyT >::transferPageAsync().


The documentation for this class was generated from the following files:
Generated on Mon Jun 22 04:00:44 2009 for Fennel by  doxygen 1.5.1