コード例 #1
0
ファイル: ClientConductor.cs プロジェクト: bpb1/Aeron.NET
        internal ExclusivePublication AddExclusivePublication(string channel, int streamId)
        {
            VerifyActive();

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

            AwaitResponse(registrationId, channel);

            return(_activeExclusivePublications[registrationId]);
        }
コード例 #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]);
        }
コード例 #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();
            }
        }