getPeerSubScope method
Implementation
ResourceScopeImpl getPeerSubScope(PeerId peerId, Limiter limiter, ResourceScopeImpl systemScope) {
return _peerSubScopes.putIfAbsent(peerId, () {
final peerServiceLimit = limiter.getServicePeerLimits(this.name, peerId);
final scopeName = 'service:${this.name}-peer:${peerId.toString()}';
final newPeerSubScope = ResourceScopeImpl(
peerServiceLimit,
scopeName,
edges: [this, systemScope], // Parent is this service scope and system scope
);
newPeerSubScope.incRef(); // This sub-scope is now in use
return newPeerSubScope;
});
}