Ejemplo n.º 1
0
        public long RemoveCounter(long registrationId)
        {
            long correlationId = _toDriverCommandBuffer.NextCorrelationId();

            _removeMessage.RegistrationId(registrationId).CorrelationId(correlationId);

            if (!_toDriverCommandBuffer.Write(ControlProtocolEvents.REMOVE_COUNTER, _buffer, 0,
                                              RemoveMessageFlyweight.Length()))
            {
                throw new AeronException("Could not write remove counter command");
            }

            return(correlationId);
        }
Ejemplo n.º 2
0
        public long RemoveSubscription(long registrationId)
        {
            long correlationId = _toDriverCommandBuffer.NextCorrelationId();

            _removeMessage.RegistrationId(registrationId).CorrelationId(correlationId);

            if (!_toDriverCommandBuffer.Write(ControlProtocolEvents.REMOVE_SUBSCRIPTION, _buffer, 0,
                                              RemoveMessageFlyweight.Length()))
            {
                throw new AeronException("Could not write remove subscription message");
            }

            return(correlationId);
        }
Ejemplo n.º 3
0
        public long RemovePublication(long registrationId)
#endif
        {
            long correlationId = _toDriverCommandBuffer.NextCorrelationId();

            _removeMessage.RegistrationId(registrationId).CorrelationId(correlationId);

            if (!_toDriverCommandBuffer.Write(ControlProtocolEvents.REMOVE_PUBLICATION, _buffer, 0, RemoveMessageFlyweight.Length()))
            {
                throw new AeronException("Could not write remove publication command");
            }

            return(correlationId);
        }
Ejemplo n.º 4
0
        public virtual long RemovePublication(long registrationId)
        {
            long correlationId = _toDriverCommandBuffer.NextCorrelationId();

            _removeMessage.CorrelationId(correlationId);
            _removeMessage.RegistrationId(registrationId);

            if (!_toDriverCommandBuffer.Write(ControlProtocolEvents.REMOVE_PUBLICATION, _buffer, 0, RemoveMessageFlyweight.Length()))
            {
                throw new InvalidOperationException("could not write publication remove message");
            }

            return(correlationId);
        }