RandomAccessRequestBinding Class Reference

RandomAccessRequestBinding binds a RandomAccessRequest to a particular memory location being read from or written to. More...

#include <RandomAccessRequest.h>

Inheritance diagram for RandomAccessRequestBinding:

BackupRestorePage CachePage RandomAccessFileDeviceTest::Binding LRUPage TwoQPage List of all members.

Public Member Functions

 RandomAccessRequestBinding ()
virtual ~RandomAccessRequestBinding ()
virtual PBuffer getBuffer () const=0
 
Returns:
memory address where transfer should start.

virtual uint getBufferSize () const=0
 
Returns:
number of contiguous bytes from getBuffer() to be used for transfer.

virtual void notifyTransferCompletion (bool bSuccess)=0
 Receives notification when a transfer completes.

Detailed Description

RandomAccessRequestBinding binds a RandomAccessRequest to a particular memory location being read from or written to.

Definition at line 51 of file RandomAccessRequest.h.


Constructor & Destructor Documentation

RandomAccessRequestBinding::RandomAccessRequestBinding (  )  [explicit]

Definition at line 119 of file DeviceAccessScheduler.cpp.

00120 {
00121 #ifdef __MSVC__
00122     // TODO:  only create this when ThreadPoolScheduler is being used?
00123     hEvent = CreateEvent(NULL,1,0,NULL);
00124     if (!hEvent) {
00125         throw new SysCallExcn("CreateEvent failed");
00126     }
00127 #endif
00128 }

RandomAccessRequestBinding::~RandomAccessRequestBinding (  )  [virtual]

Definition at line 130 of file DeviceAccessScheduler.cpp.

00131 {
00132 #ifdef __MSVC__
00133     CloseHandle(hEvent);
00134 #endif
00135 }


Member Function Documentation

virtual PBuffer RandomAccessRequestBinding::getBuffer (  )  const [pure virtual]

Returns:
memory address where transfer should start.

Implemented in CachePage, BackupRestorePage, and RandomAccessFileDeviceTest::Binding.

Referenced by RandomAccessFileDevice::prepareTransfer(), and IoCompletionPortScheduler::schedule().

virtual uint RandomAccessRequestBinding::getBufferSize (  )  const [pure virtual]

Returns:
number of contiguous bytes from getBuffer() to be used for transfer.

Implemented in CachePage, BackupRestorePage, and RandomAccessFileDeviceTest::Binding.

Referenced by RandomAccessFileDevice::prepareTransfer(), IoCompletionPortThread::run(), AioLinuxScheduler::run(), ThreadPoolScheduler::schedule(), and IoCompletionPortScheduler::schedule().

virtual void RandomAccessRequestBinding::notifyTransferCompletion ( bool  bSuccess  )  [pure virtual]

Receives notification when a transfer completes.

Parameters:
bSuccess true if the full buffer size was successfully transferred for this binding

Implemented in CachePage, BackupRestorePage, and RandomAccessFileDeviceTest::Binding.

Referenced by aio_handler(), IoCompletionPortThread::run(), AioPollingScheduler::run(), AioLinuxScheduler::run(), and IoCompletionPortScheduler::schedule().


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