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::io_request Class Reference

#include <io_request.h>

Public Member Functions

 io_request (char *buf, const data_loc_t &loc, ssize_t size, int access_method, io_interface *io=NULL, int node_id=MAX_NODE_ID, bool sync=false)
 
 io_request (user_compute *compute, const data_loc_t &loc, ssize_t size, int access_method, io_interface *io=NULL, int node_id=MAX_NODE_ID)
 

Detailed Description

This class defines an I/O request from users. There are three forms of I/O reuqests: simple form, user-task form, extended form.

In the simple form, an I/O request contains a single data buffer where data read from the disk needs to be stored or data needs to be written to the disk.

In the user-task form, an I/O request does not contains a data buffer. Instead, it contains a user task to be executed on the data covered by the I/O request. This form is currently only used for read requests. The user task is executed once the completion of the I/O request.

In the extended form, an I/O request can contain multiple data buffers to contain data. This form is currently only used internally and is not allowed to be used by users.

Constructor & Destructor Documentation

safs::io_request::io_request ( char *  buf,
const data_loc_t loc,
ssize_t  size,
int  access_method,
io_interface io = NULL,
int  node_id = MAX_NODE_ID,
bool  sync = false 
)
inline

The constructor of an I/O request in the simple form.

Parameters
bufthe data buffer.
locthe location in SAFS.
sizethe request size.
access_methodindicates whether to read or write.
iothe I/O instance associated with the I/O request.
node_idthe NUMA node where the I/O request is issued.
sync
safs::io_request::io_request ( user_compute compute,
const data_loc_t loc,
ssize_t  size,
int  access_method,
io_interface io = NULL,
int  node_id = MAX_NODE_ID 
)
inline

The constructor of an I/O request in the user-task form.

Parameters
computethe user task.
locthe location in SAFS.
sizethe request size.
access_methodindicates whether to read or write.
iothe I/O instance associated with the I/O request.
node_idthe NUMA node where the I/O request is issued.

Member Data Documentation

char safs::io_request::buf[0]

This field is used to help address the memory following the request. It is used when a user wants to embed user data in the request.

void* safs::io_request::buf_addr

These two can be used by users.

io_req_extension* safs::io_request::ext

This field should only be used by the library itself.


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