CatapultServer  v0.5.0.1 (Elephant)
NodeSelector.h File Reference
Include dependency graph for NodeSelector.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  catapult::extensions::ImportanceDescriptor
 Describes an importance value. More...
 
struct  catapult::extensions::WeightedCandidate
 A weighted candidate. More...
 
struct  catapult::extensions::NodeSelectionResult
 Result of a node selection. More...
 
struct  catapult::extensions::NodeAgingConfiguration
 Node aging configuration. More...
 
struct  catapult::extensions::NodeSelectionConfiguration
 Node selection configuration. More...
 
class  catapult::extensions::WeightPolicyGenerator
 Weight policy generator. More...
 

Namespaces

 catapult
 
 catapult::ionet
 
 catapult::extensions
 

Typedefs

using catapult::extensions::ImportanceRetriever = std::function< ImportanceDescriptor(const Key &)>
 Retrieves an importance descriptor given a specified public key. More...
 
using catapult::extensions::WeightedCandidates = std::vector< WeightedCandidate >
 

Enumerations

enum  catapult::extensions::WeightPolicy { catapult::extensions::WeightPolicy::Interactions, catapult::extensions::WeightPolicy::Importance }
 Weight calculation policies. More...
 

Functions

uint32_t catapult::extensions::CalculateWeight (const ionet::NodeInteractions &interactions, WeightPolicy weightPolicy, const supplier< ImportanceDescriptor > &importanceSupplier)
 Calculates the weight from interactions or importanceSupplier depending on weightPolicy. More...
 
ionet::NodeSet catapult::extensions::SelectCandidatesBasedOnWeight (const WeightedCandidates &candidates, uint64_t totalCandidateWeight, size_t maxCandidates)
 
NodeSelectionResult catapult::extensions::SelectNodes (const ionet::NodeContainer &nodes, const NodeSelectionConfiguration &config, const ImportanceRetriever &importanceRetriever)
 
utils::KeySet catapult::extensions::SelectNodesForRemoval (const ionet::NodeContainer &nodes, const NodeAgingConfiguration &config, const ImportanceRetriever &importanceRetriever)