|
CatapultServer
v0.5.0.1 (Elephant)
|
A read only view on top of node container. More...


Public Member Functions | |
| NodeContainerView (const NodeContainerData &nodeContainerData, utils::SpinReaderWriterLock::ReaderLockGuard &&readLock) | |
| Creates a view around nodeContainerData with lock context readLock. More... | |
| size_t | size () const |
| Returns the number of nodes. More... | |
| Timestamp | time () const |
| Gets current container time. More... | |
| bool | contains (const Key &identityKey) const |
Returns true if the node with identityKey is in the container, false otherwise. More... | |
| const NodeInfo & | getNodeInfo (const Key &identityKey) const |
| Gets node info for the node with identityKey. More... | |
| void | forEach (const consumer< const Node &, const NodeInfo & > &consumer) const |
| Iterates over all nodes and passes them to consumer. More... | |
Private Attributes | |
| const NodeContainerData & | m_nodeContainerData |
| utils::SpinReaderWriterLock::ReaderLockGuard | m_readLock |
Additional Inherited Members | |
Private Member Functions inherited from catapult::utils::MoveOnly | |
| constexpr | MoveOnly ()=default |
| Default constructor. More... | |
| ~MoveOnly ()=default | |
| Default destructor. More... | |
| MoveOnly (const NonCopyable &)=delete | |
| Disabled copy constructor. More... | |
| MoveOnly (MoveOnly &&)=default | |
| Default move constructor. More... | |
| MoveOnly & | operator= (const MoveOnly &)=delete |
| Disabled assignment operator. More... | |
| MoveOnly & | operator= (MoveOnly &&)=default |
| Default move assignment operator. More... | |
A read only view on top of node container.
| catapult::ionet::NodeContainerView::NodeContainerView | ( | const NodeContainerData & | nodeContainerData, |
| utils::SpinReaderWriterLock::ReaderLockGuard && | readLock | ||
| ) |
Creates a view around nodeContainerData with lock context readLock.
| bool catapult::ionet::NodeContainerView::contains | ( | const Key & | identityKey | ) | const |
Returns true if the node with identityKey is in the container, false otherwise.

| void catapult::ionet::NodeContainerView::forEach | ( | const consumer< const Node &, const NodeInfo & > & | consumer | ) | const |
Iterates over all nodes and passes them to consumer.

Gets node info for the node with identityKey.
| size_t catapult::ionet::NodeContainerView::size | ( | ) | const |
Returns the number of nodes.
| Timestamp catapult::ionet::NodeContainerView::time | ( | ) | const |
Gets current container time.
|
private |
|
private |