BackoffConnector constructor
BackoffConnector(
- Host host,
- int cacheSize,
- Duration connectionTryDuration,
- BackoffFactory backoff,
Creates a utility to connect to peers, but only if we have not recently tried connecting to them already cacheSize is the size of the LRU cache connectionTryDuration is how long we attempt to connect to a peer before giving up backoff describes the strategy used to decide how long to backoff after previously attempting to connect to a peer
Implementation
BackoffConnector(
Host host,
int cacheSize,
Duration connectionTryDuration,
BackoffFactory backoff,
) : _host = host,
_cache = LRUCache<PeerId, ConnCacheData>(cacheSize),
_connTryDur = connectionTryDuration,
_backoff = backoff;