FlashGraph-ng
A new frontier in large-scale graph analysis and data mining
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
safs::direct_comp_io Class Reference

#include <direct_comp_access.h>

Inheritance diagram for safs::direct_comp_io:
safs::io_interface

Public Member Functions

virtual int get_file_id () const
 
virtual void cleanup ()
 
virtual bool support_aio ()
 
virtual void access (io_request *requests, int num, io_status *status=NULL)
 
virtual void flush_requests ()
 
virtual int wait4complete (int num)
 
virtual int num_pending_ios () const
 
- Public Member Functions inherited from safs::io_interface
thread * get_thread () const
 
int get_node_id () const
 
int get_io_id () const
 
int get_remaining_io_slots () const
 
virtual int get_max_num_pending_ios () const
 
virtual void set_max_num_pending_ios (int max)
 
virtual bool set_callback (callback::ptr cb)
 
virtual callbackget_callback ()
 
virtual io_status access (char *buf, off_t off, ssize_t size, int access_method)
 

Detailed Description

This class supports asynchronous user-task I/O requests. Unlike global_cached_io, it doesn't support page cache.

Member Function Documentation

virtual void safs::direct_comp_io::access ( io_request requests,
int  num,
io_status status = NULL 
)
virtual

The asynchronous IO should implement some of the following methods. The main interface of sending asynchronous I/O requests.

Parameters
requestsan array of I/O requests to be issued.
numthe number of I/O requests to be issued.
statusan array of I/O status, one for each I/O request.

Reimplemented from safs::io_interface.

virtual void safs::direct_comp_io::cleanup ( )
virtual

This method is called when the I/O instance is destroyed.

Reimplemented from safs::io_interface.

virtual void safs::direct_comp_io::flush_requests ( )
virtual

This method flushes I/O requests. When requests are passed to the access method, an IO layer may buffer the requests. This method guarantees that all requests are flushed to the underlying devices.

Reimplemented from safs::io_interface.

virtual int safs::direct_comp_io::get_file_id ( ) const
virtual

This method returns the ID of the file being accessed by the IO instance.

Returns
the file ID.

Implements safs::io_interface.

virtual int safs::direct_comp_io::num_pending_ios ( ) const
virtual

This method gets the number of I/O requests pending in the I/O instance.

Returns
the number of pending I/O requests.

Reimplemented from safs::io_interface.

virtual bool safs::direct_comp_io::support_aio ( )
inlinevirtual

This method indicates whether it supports asynchronous IO interface.

Returns
boolean.

Reimplemented from safs::io_interface.

virtual int safs::direct_comp_io::wait4complete ( int  num)
virtual

This method waits for at least the specified number of requests issued by the access method to complete.

Parameters
thenumber of requests that need to be completed.

Reimplemented from safs::io_interface.


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