internal ExclusivePublication AddExclusivePublication(string channel, int streamId) { VerifyActive(); long registrationId = _driverProxy.AddExclusivePublication(channel, streamId); AwaitResponse(registrationId, channel); return(_activeExclusivePublications[registrationId]); }
internal ExclusivePublication AddExclusivePublication(string channel, int streamId) { if (_isClosed) { throw new InvalidOperationException("Aeron client is closed"); } long registrationId = _driverProxy.AddExclusivePublication(channel, streamId); AwaitResponse(registrationId, channel); return(_activeExclusivePublications[registrationId]); }
internal virtual ExclusivePublication AddExclusivePublication(string channel, int streamId) { _clientLock.Lock(); try { EnsureOpen(); _stashedChannel = channel; long registrationId = _driverProxy.AddExclusivePublication(channel, streamId); AwaitResponse(registrationId); return((ExclusivePublication)_resourceByRegIdMap[registrationId]); } finally { _clientLock.Unlock(); } }