#include <block_node.hh>
Public Member Functions | |
BlockNode (network::ClientHandler *) | |
~BlockNode () | |
bool | block_insert_local (Block &, bool replicate=true) |
Save to disk a block and replicate. More... | |
bool | block_delete_local (Block &, bool replicate=true) |
Delete Local block. More... | |
bool | block_update_local (Block &block, uint32_t pos, uint32_t len, bool replicate=true) |
Update the content of the block. More... | |
bool | block_read_local (Block &block, uint64_t off=0, uint64_t len=0, bool ignore_params=true) |
Read block from the local node. More... | |
Public Member Functions inherited from eclipse::Node | |
Node () | |
~Node () | |
std::string | get_ip () const override |
Public Member Functions inherited from eclipse::Machine | |
Machine ()=default | |
Machine (int) | |
virtual | ~Machine () |
int | get_id () const |
Protected Member Functions | |
void | replicate_message (messages::IOoperation *) |
Compute the right and left node of the current node and send its replicas of the given block. More... | |
Protected Attributes | |
Local_io | local_io |
int | network_size |
Protected Attributes inherited from eclipse::Node | |
network::ClientHandler * | network |
Logger * | logger |
std::string | ip_of_this |
int | port |
Protected Attributes inherited from eclipse::Machine | |
int | id |
eclipse::BlockNode::BlockNode | ( | network::ClientHandler * | net | ) |
eclipse::BlockNode::~BlockNode | ( | ) |
bool eclipse::BlockNode::block_delete_local | ( | Block & | block, |
bool | replicate = true |
||
) |
Delete Local block.
This method read the block locally.
bool eclipse::BlockNode::block_insert_local | ( | Block & | block, |
bool | replicate = true |
||
) |
Save to disk a block and replicate.
This method insert the block locally and replicated it.
bool eclipse::BlockNode::block_read_local | ( | Block & | block, |
uint64_t | off = 0 , |
||
uint64_t | len = 0 , |
||
bool | ignore_params = true |
||
) |
Read block from the local node.
This method read the block locally.
bool eclipse::BlockNode::block_update_local | ( | Block & | block, |
uint32_t | pos, | ||
uint32_t | len, | ||
bool | replicate = true |
||
) |
Update the content of the block.
|
protected |
Compute the right and left node of the current node and send its replicas of the given block.
|
protected |
|
protected |