A class that implements a "block" abstraction for memory management.
More...
#include <Block.h>
A class that implements a "block" abstraction for memory management.
◆ Block() [1/2]
wrench::Block::Block |
( |
std::string |
fid, |
|
|
std::shared_ptr< FileLocation > |
location, |
|
|
double |
sz, |
|
|
double |
last_access, |
|
|
bool |
is_dirty, |
|
|
double |
dirty_time |
|
) |
| |
Constructor.
- Parameters
-
fid | file id |
location | file location |
sz | file size in bytes |
last_access | time of last access |
is_dirty | dirty status |
dirty_time | dirty time |
◆ Block() [2/2]
wrench::Block::Block |
( |
Block * |
blk | ) |
|
Constructor (that does a copy)
- Parameters
-
◆ getDirtyTime()
double wrench::Block::getDirtyTime |
( |
| ) |
const |
Get the block's dirty time.
- Returns
- a date
◆ getFileId()
std::string wrench::Block::getFileId |
( |
| ) |
|
Get the file id.
- Returns
- the file id
◆ getLastAccess()
double wrench::Block::getLastAccess |
( |
| ) |
const |
Get the block's last access time.
- Returns
- a date
◆ getLocation()
const std::shared_ptr< FileLocation > & wrench::Block::getLocation |
( |
| ) |
const |
Get the block's location.
- Returns
- the block's location
◆ getSize()
double wrench::Block::getSize |
( |
| ) |
const |
Get the block's size.
- Returns
- a size in bytes
◆ isDirty()
bool wrench::Block::isDirty |
( |
| ) |
const |
Get the block's dirty status.
- Returns
- true or false
◆ setDirty()
void wrench::Block::setDirty |
( |
bool |
is_dirty | ) |
|
Set the block's dirty status.
- Parameters
-
◆ setDirtyTime()
void wrench::Block::setDirtyTime |
( |
double |
dirty_time | ) |
|
Set the block's dirty time.
- Parameters
-
◆ setFileId()
void wrench::Block::setFileId |
( |
std::string & |
fid | ) |
|
Set the block's file id.
- Parameters
-
◆ setLastAccess()
void wrench::Block::setLastAccess |
( |
double |
last_access | ) |
|
Set the block's last access time.
- Parameters
-
◆ setSize()
void wrench::Block::setSize |
( |
double |
size | ) |
|
Set the block's size.
- Parameters
-
◆ split()
Block * wrench::Block::split |
( |
double |
remaining | ) |
|
Split a block.
- Parameters
-
remaining | a number of bytes |
- Returns
- : a pointer to a new block
The documentation for this class was generated from the following files: