Exemple #1
0
        internal ExclusivePublication AddExclusivePublication(string channel, int streamId)
        {
            VerifyActive();

            long registrationId = _driverProxy.AddExclusivePublication(channel, streamId);

            AwaitResponse(registrationId, channel);

            return(_activeExclusivePublications[registrationId]);
        }
Exemple #2
0
        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]);
        }
Exemple #3
0
        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();
            }
        }