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

#include <comp_io_scheduler.h>

Inherited by safs::default_comp_io_scheduler.

Classes

class  compute_iterator
 

Public Member Functions

compute_iterator get_begin () const
 
compute_iterator get_end () const
 
 comp_io_scheduler (int node_id)
 
virtual size_t get_requests (fifo_queue< io_request > &reqs, size_t max)=0
 
void set_io (io_interface *io)
 
io_interfaceget_io () const
 
void post_comp_process (user_compute *compute)
 
size_t get_num_incomplete_computes ()
 
bool is_empty ()
 
virtual void gc_computes ()
 

Static Public Member Functions

static void delete_compute (user_compute *compute)
 

Detailed Description

This class defines an interface of a I/O scheduler for requests generated by user tasks. It is only used in the page cache. Right now, an I/O scheduler is associated with an I/O instance and can only schedule I/O requests issued by the I/O instance.

Constructor & Destructor Documentation

safs::comp_io_scheduler::comp_io_scheduler ( int  node_id)

The constructor of an I/O scheduler.

Parameters
node_idthe NUMA node where the I/O scheduler runs.

Member Function Documentation

static void safs::comp_io_scheduler::delete_compute ( user_compute compute)
inlinestatic

This method is a static method. It destroys a user task.

Parameters
computethe user task.
virtual void safs::comp_io_scheduler::gc_computes ( )
virtual

This method garbage collect user compute tasks that have been completed.

compute_iterator safs::comp_io_scheduler::get_begin ( ) const
inline

TODO The iterator should only iterate on the user tasks with requests. This method gets the iterator pointing to the first user task managed by the I/O scheduler.

Returns
the iterator to the beginning.
compute_iterator safs::comp_io_scheduler::get_end ( ) const
inline

This method gets the iterator pointing to the last user task managed by the I/O scheduler.

Returns
the iterator to the end.
io_interface* safs::comp_io_scheduler::get_io ( ) const
inline

This method gets the I/O instance that the I/O scheduler is associated with.

Returns
the I/O instance.
size_t safs::comp_io_scheduler::get_num_incomplete_computes ( )
inline

This method gets the number of user tasks that haven't been completed.

Returns
the number of user tasks that haven't been completed.
virtual size_t safs::comp_io_scheduler::get_requests ( fifo_queue< io_request > &  reqs,
size_t  max 
)
pure virtual

This method gets multiple I/O requests.

Parameters
reqsthe buffer where the fetched requests are stored.
maxthe maximal number of requests fetched from the scheduler.
Returns
the number of fetched requests.
bool safs::comp_io_scheduler::is_empty ( )
inline

This method tests whether there are user tasks that still haven't been completed.

Returns
indicates whether there are user tasks that still haven't been completed.
void safs::comp_io_scheduler::post_comp_process ( user_compute compute)

This method performs post-computation steps, after we perform the user computation.

void safs::comp_io_scheduler::set_io ( io_interface io)
inline

This method sets the I/O instance that the I/O scheduler is associated with.

Parameters
iothe I/O instance.

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