WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
Public Member Functions | List of all members
wrench::Block Class Reference

A class that implements a "block" abstraction for memory management. More...

#include <Block.h>

Public Member Functions

 Block (Block *blk)
 Constructor (that does a copy) More...
 Block (std::string fid, std::shared_ptr< FileLocation > location, double sz, double last_access, bool is_dirty, double dirty_time)
 Constructor. More...
double getDirtyTime () const
 Get the block's dirty time. More...
std::string getFileId ()
 Get the file id. More...
double getLastAccess () const
 Get the block's last access time. More...
const std::shared_ptr< FileLocation > & getLocation () const
 Get the block's location. More...
double getSize () const
 Get the block's size. More...
bool isDirty () const
 Get the block's dirty status. More...
void setDirty (bool is_dirty)
 Set the block's dirty status. More...
void setDirtyTime (double dirty_time)
 Set the block's dirty time. More...
void setFileId (std::string &fid)
 Set the block's file id. More...
void setLastAccess (double last_access)
 Set the block's last access time. More...
void setSize (double size)
 Set the block's size. More...
Blocksplit (double remaining)
 Split a block. More...

Detailed Description

A class that implements a "block" abstraction for memory management.

Constructor & Destructor Documentation

◆ 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 


fidfile id
locationfile location
szfile size in bytes
last_accesstime of last access
is_dirtydirty status
dirty_timedirty time

◆ Block() [2/2]

wrench::Block::Block ( Block blk)

Constructor (that does a copy)

blka block

Member Function Documentation

◆ getDirtyTime()

double wrench::Block::getDirtyTime ( ) const

Get the block's dirty time.

a date

◆ getFileId()

std::string wrench::Block::getFileId ( )

Get the file id.

the file id

◆ getLastAccess()

double wrench::Block::getLastAccess ( ) const

Get the block's last access time.

a date

◆ getLocation()

const std::shared_ptr< FileLocation > & wrench::Block::getLocation ( ) const

Get the block's location.

the block's location

◆ getSize()

double wrench::Block::getSize ( ) const

Get the block's size.

a size in bytes

◆ isDirty()

bool wrench::Block::isDirty ( ) const

Get the block's dirty status.

true or false

◆ setDirty()

void wrench::Block::setDirty ( bool  is_dirty)

Set the block's dirty status.

is_dirtytrue or false

◆ setDirtyTime()

void wrench::Block::setDirtyTime ( double  dirty_time)

Set the block's dirty time.

dirty_timea date

◆ setFileId()

void wrench::Block::setFileId ( std::string &  fid)

Set the block's file id.

fida file id

◆ setLastAccess()

void wrench::Block::setLastAccess ( double  last_access)

Set the block's last access time.

last_accessa date

◆ setSize()

void wrench::Block::setSize ( double  size)

Set the block's size.

sizea size in bytes

◆ split()

Block * wrench::Block::split ( double  remaining)

Split a block.

remaininga number of bytes
: a pointer to a new block

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