11 #ifndef WRENCH_BLOCK_H
12 #define WRENCH_BLOCK_H
15 #include "wrench/services/storage/storage_helpers/FileLocation.h"
29 Block(std::string fid, std::shared_ptr<FileLocation> location,
double sz,
30 double last_access,
bool is_dirty,
double dirty_time);
58 const std::shared_ptr<FileLocation> &
getLocation()
const;
65 std::shared_ptr<FileLocation> location;
78 #endif //WRENCH_BLOCK_H
std::string getFileId()
Get the file id.
Definition: Block.cpp:47
void setDirty(bool is_dirty)
Set the block's dirty status.
Definition: Block.cpp:111
const std::shared_ptr< FileLocation > & getLocation() const
Get the block's location.
Definition: Block.cpp:151
void setLastAccess(double last_access)
Set the block's last access time.
Definition: Block.cpp:95
Block * split(double remaining)
Split a block.
Definition: Block.cpp:136
bool isDirty() const
Get the block's dirty status.
Definition: Block.cpp:103
Definition: Action.cpp:28
double getSize() const
Get the block's size.
Definition: Block.cpp:71
void setSize(double size)
Set the block's size.
Definition: Block.cpp:79
double getDirtyTime() const
Get the block's dirty time.
Definition: Block.cpp:119
void setFileId(std::string &fid)
Set the block's file id.
Definition: Block.cpp:55
A class that implements a "block" abstraction for memory management.
Definition: Block.h:26
double getLastAccess() const
Get the block's last access time.
Definition: Block.cpp:87
Block(std::string fid, std::shared_ptr< FileLocation > location, double sz, double last_access, bool is_dirty, double dirty_time)
Constructor.
Definition: Block.cpp:24
void setDirtyTime(double dirty_time)
Set the block's dirty time.
Definition: Block.cpp:127