cache_peer configuration storage More...
#include <CachePeers.h>
Public Types | |
using | Storage = std::vector< std::unique_ptr< CachePeer >, PoolingAllocator< std::unique_ptr< CachePeer > > > |
owns stored CachePeer objects More... | |
using | const_iterator = Storage::const_iterator |
Public Member Functions | |
void | add (CachePeer *p) |
stores a being-configured cache_peer More... | |
void | remove (CachePeer *) |
deletes a previously add()ed CachePeer object More... | |
auto | size () const |
the number of currently stored (i.e. added and not removed) cache_peers More... | |
auto | begin () const |
auto | end () const |
CachePeer & | nextPeerToPing (size_t iteration) |
Private Attributes | |
Storage | storage |
cache_peers in configuration/parsing order More... | |
uint64_t | peerPolls_ = 0 |
total number of completed peer scans by nextPeerToPing()-calling code More... | |
Detailed Description
Definition at line 20 of file CachePeers.h.
Member Typedef Documentation
◆ const_iterator
using CachePeers::const_iterator = Storage::const_iterator |
Definition at line 36 of file CachePeers.h.
◆ Storage
using CachePeers::Storage = std::vector< std::unique_ptr<CachePeer>, PoolingAllocator< std::unique_ptr<CachePeer> > > |
Definition at line 24 of file CachePeers.h.
Member Function Documentation
◆ add()
|
inline |
◆ begin()
|
inline |
Definition at line 37 of file CachePeers.h.
References storage.
◆ end()
|
inline |
Definition at line 38 of file CachePeers.h.
References storage.
◆ nextPeerToPing()
A CachePeer to query next when scanning all peer caches in hope to fetch a remote cache hit.
- See also
- neighborsUdpPing()
- Parameters
-
iteration a 0-based index of a loop scanning all peers
Definition at line 14 of file CachePeers.cc.
References Assure, peerPolls_, size(), and storage.
Referenced by neighborsDigestSelect(), and neighborsUdpPing().
◆ remove()
void CachePeers::remove | ( | CachePeer * | peer | ) |
Definition at line 31 of file CachePeers.cc.
References Assure, and storage.
Referenced by DeleteConfigured().
◆ size()
|
inline |
Definition at line 33 of file CachePeers.h.
References storage.
Referenced by neighborsDigestSelect(), neighborsUdpPing(), nextPeerToPing(), and peer_Inst().
Member Data Documentation
◆ peerPolls_
|
private |
Definition at line 50 of file CachePeers.h.
Referenced by nextPeerToPing().
◆ storage
|
private |
Definition at line 47 of file CachePeers.h.
Referenced by add(), begin(), end(), nextPeerToPing(), remove(), and size().
The documentation for this class was generated from the following files:
- src/CachePeers.h
- src/CachePeers.cc