public void ThreadSendsRemoveChannelMessage() { conductor.RemovePublication(CORRELATION_ID); AssertReadsOneMessage((msgTypeId, buffer, index, length) => { RemoveMessageFlyweight message = new RemoveMessageFlyweight(); message.Wrap(buffer, index); Assert.That(msgTypeId, Is.EqualTo(ControlProtocolEvents.REMOVE_PUBLICATION)); Assert.That(message.RegistrationId(), Is.EqualTo(CORRELATION_ID)); }); }
public void ThreadSendsRemoveSubscriberMessage() { conductor.RemoveSubscription(CORRELATION_ID); AssertReadsOneMessage((msgTypeId, buffer, index, length) => { RemoveMessageFlyweight removeMessage = new RemoveMessageFlyweight(); removeMessage.Wrap(buffer, index); Assert.That(msgTypeId, Is.EqualTo(ControlProtocolEvents.REMOVE_SUBSCRIPTION)); Assert.That(removeMessage.RegistrationId(), Is.EqualTo(CORRELATION_ID)); }); }
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); }
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); }
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); }
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); }