SOLA
Loading...
Searching...
No Matches
Public Member Functions | List of all members
minhton::MinhtonJoinAlgorithm Class Reference
Inheritance diagram for minhton::MinhtonJoinAlgorithm:
minhton::JoinAlgorithmGeneral minhton::JoinAlgorithmInterface minhton::AlgorithmInterface MinhtonJoinAlgorithmForTest

Public Member Functions

 MinhtonJoinAlgorithm (std::shared_ptr< AccessContainer > access)
 
void processJoin (const MessageJoin &msg) override
 
uint32_t performSendUpdateNeighborMessagesAboutEnteringNode (minhton::NodeInfo entering_node) override
 
- Public Member Functions inherited from minhton::JoinAlgorithmGeneral
 JoinAlgorithmGeneral (std::shared_ptr< AccessContainer > access)
 
void process (const MessageVariant &msg) override
 
void initiateJoin (NodeInfo &node_info) override
 
void initiateJoin (const PhysicalNodeInfo &p_node_info) override
 
- Public Member Functions inherited from minhton::JoinAlgorithmInterface
 JoinAlgorithmInterface (std::shared_ptr< AccessContainer > access)
 
- Public Member Functions inherited from minhton::AlgorithmInterface
 AlgorithmInterface (std::shared_ptr< AccessContainer > access)
 

Additional Inherited Members

- Static Public Member Functions inherited from minhton::JoinAlgorithmInterface
static std::vector< MessageTypegetSupportedMessageTypes ()
 
- Protected Member Functions inherited from minhton::JoinAlgorithmGeneral
void processJoinAccept (const MessageJoinAccept &msg)
 
void processJoinAcceptAck (const MessageJoinAcceptAck &msg)
 
void performAcceptChild (minhton::NodeInfo entering_node, bool use_complete_balancing=false)
 
void continueAcceptChildProcedure (const minhton::MessageInformAboutNeighbors &message) noexcept(false) override
 
void performSendJoinAccept (const minhton::NodeInfo &entering_node, const minhton::NodeInfo &entering_node_adj_left, const minhton::NodeInfo &entering_node_adj_right)
 
std::vector< minhton::NodeInfogetRoutingTableNeighborsForNewChild (const minhton::NodeInfo &new_child) const
 
minhton::NodeInfo calcNewChildPosition (bool use_complete_balancing=false) const
 
minhton::NodeInfo calcAdjacentLeftOfNewChild (const minhton::NodeInfo &entering_node) const
 
minhton::NodeInfo calcAdjacentRightOfNewChild (const minhton::NodeInfo &entering_node) const
 
minhton::NodeInfo calcOurNewAdjacentLeft (const minhton::NodeInfo &entering_node, const minhton::NodeInfo &entering_node_adj_right) const
 
minhton::NodeInfo calcOurNewAdjacentRight (const minhton::NodeInfo &entering_node, const minhton::NodeInfo &entering_node_adj_left) const
 
bool mustSendUpdateLeft (const minhton::NodeInfo &entering_node_adj_right) const
 
bool mustSendUpdateRight (const minhton::NodeInfo &entering_node_adj_left) const
 
minhton::NodeInfo getCloserAdjacent (const minhton::NodeInfo &entering_node, const minhton::NodeInfo &alleged_adjacent) const
 
void allUpdatesAcknowledged ()
 
- Protected Member Functions inherited from minhton::AlgorithmInterface
void send (const MessageVariant &msg)
 
std::shared_ptr< RoutingInformationgetRoutingInfo () const
 
NodeInfo getSelfNodeInfo () const
 
- Protected Attributes inherited from minhton::JoinAlgorithmGeneral
PhysicalNodeInfo last_join_info_
 
- Protected Attributes inherited from minhton::AlgorithmInterface
std::shared_ptr< AccessContaineraccess_
 

Member Function Documentation

◆ performSendUpdateNeighborMessagesAboutEnteringNode()

uint32_t minhton::MinhtonJoinAlgorithm::performSendUpdateNeighborMessagesAboutEnteringNode ( minhton::NodeInfo  entering_node)
overridevirtual

Helper method for the perform accept child procedure.

Sending UPDATE_ROUTING_TABLE_NEIGHBOR_CHILD messages with the entering_node as the node to inform to each of our routing table neighbors, because those nodes have the entering_node as a routing table neighbor child.

Typical Usage:

uint32_t performSendUpdateNeighborMessagesAboutEnteringNode(minhton::NodeInfo entering_node) override
Definition minhton_join_algorithm.cpp:74
Parameters
entering_nodethe node who wants to enter the network

Implements minhton::JoinAlgorithmGeneral.

Reimplemented in MinhtonJoinAlgorithmForTest.

◆ processJoin()

void minhton::MinhtonJoinAlgorithm::processJoin ( const MessageJoin msg)
overridevirtual

This method will be called when we receive a JOIN message.

Forwarding JOIN Messages according to the fill join algorithm.

When this node is a fitting position to accept the entering node, it will call initialize the JoinAccept procedure. Otherwise it will further forward the message to the next node.

Typical Usage:

this->processJoin(incoming_message);
void processJoin(const MessageJoin &msg) override
Definition minhton_join_algorithm.cpp:14
Parameters
msgthe message we received and want to process
Exceptions
AlgorithmException if join case couldn't be handled

Implements minhton::JoinAlgorithmGeneral.


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