Thrill  0.1

Detailed Description

Encapsulate the configuration of one "disk". The disk is actually a file I/O object which block_manager uses to read/write blocks.

Definition at line 36 of file config.hpp.

#include <config.hpp>

Public Member Functions

 disk_config ()
 default constructor More...
 
 disk_config (const std::string &path, external_size_type size, const std::string &fileio)
 initializing constructor, also parses fileio parameter More...
 
 disk_config (const std::string &line)
 initializing constructor, parse full line as in config files More...
 
std::string fileio_string () const
 return formatted fileio name and optional configuration parameters More...
 
void parse_fileio ()
 parse the "io_impl" parameter into the optional parameter fields. More...
 
void parse_line (const std::string &line)
 

Public Attributes

Basic Disk Configuration Parameters
std::string path
 the file path used by the io implementation More...
 
external_size_type size
 file size to initially allocate More...
 
std::string io_impl
 io implementation to access file More...
 

Optional Disk / File I/O Implementation Parameters

enum  direct_type { DIRECT_OFF = 0, DIRECT_TRY = 1, DIRECT_ON = 2 }
 
bool autogrow
 autogrow file if more disk space is needed, automatically set if size == 0. More...
 
bool delete_on_exit
 delete file on program exit (default for autoconfigurated files) More...
 
enum foxxll::disk_config::direct_type direct
 
bool flash
 marks flash drives (configuration entries with flash= instead of disk=) More...
 
int queue
 
unsigned int device_id
 
bool raw_device
 turned on by syscall fileio when the path points to a raw block device More...
 
bool unlink_on_open
 unlink file immediately after opening (available on most Unix) More...
 
int queue_length
 desired queue length for linuxaio_file and linuxaio_queue More...
 

Member Enumeration Documentation

◆ direct_type

tristate variable: direct=0 -> force direct OFF, direct=1 -> try direct ON, if fails print warning and open without direct, direct=2 -> force direct ON, fail if unavailable.

Enumerator
DIRECT_OFF 
DIRECT_TRY 
DIRECT_ON 

Definition at line 86 of file config.hpp.

Constructor & Destructor Documentation

◆ disk_config() [1/3]

default constructor

Definition at line 290 of file config.cpp.

◆ disk_config() [2/3]

disk_config ( const std::string &  path,
external_size_type  size,
const std::string &  fileio 
)

initializing constructor, also parses fileio parameter

Definition at line 303 of file config.cpp.

References disk_config::parse_fileio().

◆ disk_config() [3/3]

disk_config ( const std::string &  line)
explicit

initializing constructor, parse full line as in config files

Definition at line 321 of file config.cpp.

References disk_config::parse_line().

Member Function Documentation

◆ fileio_string()

◆ parse_fileio()

◆ parse_line()

Member Data Documentation

◆ autogrow

bool autogrow

autogrow file if more disk space is needed, automatically set if size == 0.

Definition at line 78 of file config.hpp.

Referenced by foxxll::create_file(), disk_config::fileio_string(), config::load_default_config(), disk_config::parse_fileio(), disk_config::parse_line(), and thrill::api::RunCheckUnlinkBinary().

◆ delete_on_exit

bool delete_on_exit

delete file on program exit (default for autoconfigurated files)

Definition at line 81 of file config.hpp.

Referenced by foxxll::create_file(), disk_config::fileio_string(), config::load_default_config(), disk_config::parse_fileio(), and disk_config::parse_line().

◆ device_id

unsigned int device_id

the selected physical device id (e.g. for calculating prefetching sequences). If -1 then the device id is chosen automatically.

Definition at line 97 of file config.hpp.

Referenced by foxxll::create_file(), disk_config::fileio_string(), disk_config::parse_fileio(), and disk_config::parse_line().

◆ direct

◆ flash

bool flash

marks flash drives (configuration entries with flash= instead of disk=)

Definition at line 89 of file config.hpp.

Referenced by disk_config::fileio_string(), config::load_config_file(), and disk_config::parse_line().

◆ io_impl

std::string io_impl

io implementation to access file

Definition at line 49 of file config.hpp.

Referenced by foxxll::create_file(), disk_config::fileio_string(), disk_config::parse_fileio(), and disk_config::parse_line().

◆ path

std::string path

the file path used by the io implementation

Definition at line 43 of file config.hpp.

Referenced by block_manager::block_manager(), foxxll::create_file(), and disk_config::parse_line().

◆ queue

int queue

select request queue for disk. Use different queues for files on different disks. queue=-1 -> default queue (one for each disk).

Definition at line 93 of file config.hpp.

Referenced by block_manager::block_manager(), foxxll::create_file(), disk_config::fileio_string(), disk_config::parse_fileio(), and disk_config::parse_line().

◆ queue_length

int queue_length

desired queue length for linuxaio_file and linuxaio_queue

Definition at line 106 of file config.hpp.

Referenced by foxxll::create_file(), disk_config::fileio_string(), and disk_config::parse_fileio().

◆ raw_device

bool raw_device

turned on by syscall fileio when the path points to a raw block device

Definition at line 100 of file config.hpp.

Referenced by foxxll::create_file(), disk_config::fileio_string(), and disk_config::parse_fileio().

◆ size

◆ unlink_on_open

bool unlink_on_open

unlink file immediately after opening (available on most Unix)

Definition at line 103 of file config.hpp.

Referenced by foxxll::create_file(), disk_config::fileio_string(), disk_config::parse_fileio(), disk_config::parse_line(), and thrill::api::RunCheckUnlinkBinary().


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