private static void dissect(final RemoveMessageFlyweight msg, final StringBuilder builder) { builder .append(msg.registrationId()) .append(" [") .append(msg.clientId()) .append(':') .append(msg.correlationId()) .append(']'); }
public long removeSubscription(final long registrationId) { final long correlationId = toDriverCommandBuffer.nextCorrelationId(); removeMessage .registrationId(registrationId) .correlationId(correlationId); if (!toDriverCommandBuffer.write(REMOVE_SUBSCRIPTION, buffer, 0, RemoveMessageFlyweight.length())) { throw new AeronException("could not write remove subscription message"); } return correlationId; }
public long removeCounter(final long registrationId) { final long correlationId = toDriverCommandBuffer.nextCorrelationId(); removeMessage .registrationId(registrationId) .correlationId(correlationId); if (!toDriverCommandBuffer.write(REMOVE_COUNTER, buffer, 0, RemoveMessageFlyweight.length())) { throw new AeronException("could not write remove counter command"); } return correlationId; }
public long removePublication(final long registrationId) { final long correlationId = toDriverCommandBuffer.nextCorrelationId(); removeMessage .registrationId(registrationId) .correlationId(correlationId); if (!toDriverCommandBuffer.write(REMOVE_PUBLICATION, buffer, 0, RemoveMessageFlyweight.length())) { throw new AeronException("could not write remove publication command"); } return correlationId; }
@Test public void threadSendsRemoveChannelMessage() { conductor.removePublication(CORRELATION_ID); assertReadsOneMessage( (msgTypeId, buffer, index, length) -> { final RemoveMessageFlyweight message = new RemoveMessageFlyweight(); message.wrap(buffer, index); assertThat(msgTypeId, is(REMOVE_PUBLICATION)); assertThat(message.registrationId(), is(CORRELATION_ID)); } ); }
@Test public void threadSendsRemoveSubscriberMessage() { conductor.removeSubscription(CORRELATION_ID); assertReadsOneMessage( (msgTypeId, buffer, index, length) -> { final RemoveMessageFlyweight removeMessage = new RemoveMessageFlyweight(); removeMessage.wrap(buffer, index); assertThat(msgTypeId, is(REMOVE_SUBSCRIPTION)); assertThat(removeMessage.registrationId(), is(CORRELATION_ID)); } ); }
conductor.onRemovePublication(removeMsgFlyweight.registrationId(), correlationId); break; conductor.onRemoveSubscription(removeMsgFlyweight.registrationId(), correlationId); break; conductor.onRemoveCounter(removeMsgFlyweight.registrationId(), correlationId); break;
private static void dissect(final RemoveMessageFlyweight msg, final StringBuilder builder) { builder .append(msg.registrationId()) .append(" [") .append(msg.clientId()) .append(':') .append(msg.correlationId()) .append(']'); }
public long removeCounter(final long registrationId) { final long correlationId = toDriverCommandBuffer.nextCorrelationId(); removeMessage .registrationId(registrationId) .correlationId(correlationId); if (!toDriverCommandBuffer.write(REMOVE_COUNTER, buffer, 0, RemoveMessageFlyweight.length())) { throw new AeronException("could not write remove counter command"); } return correlationId; }
public long removeSubscription(final long registrationId) { final long correlationId = toDriverCommandBuffer.nextCorrelationId(); removeMessage .registrationId(registrationId) .correlationId(correlationId); if (!toDriverCommandBuffer.write(REMOVE_SUBSCRIPTION, buffer, 0, RemoveMessageFlyweight.length())) { throw new AeronException("could not write remove subscription message"); } return correlationId; }
public long removePublication(final long registrationId) { final long correlationId = toDriverCommandBuffer.nextCorrelationId(); removeMessage .registrationId(registrationId) .correlationId(correlationId); if (!toDriverCommandBuffer.write(REMOVE_PUBLICATION, buffer, 0, RemoveMessageFlyweight.length())) { throw new AeronException("could not write remove publication command"); } return correlationId; }
public long removePublication(final long registrationId) { final long correlationId = toDriverCommandBuffer.nextCorrelationId(); removeMessage .registrationId(registrationId) .correlationId(correlationId); if (!toDriverCommandBuffer.write(REMOVE_PUBLICATION, buffer, 0, RemoveMessageFlyweight.length())) { throw new AeronException("could not write remove publication command"); } return correlationId; }
public long removeSubscription(final long registrationId) { final long correlationId = toDriverCommandBuffer.nextCorrelationId(); removeMessage .registrationId(registrationId) .correlationId(correlationId); if (!toDriverCommandBuffer.write(REMOVE_SUBSCRIPTION, buffer, 0, RemoveMessageFlyweight.length())) { throw new AeronException("could not write remove subscription message"); } return correlationId; }
public long removeCounter(final long registrationId) { final long correlationId = toDriverCommandBuffer.nextCorrelationId(); removeMessage .registrationId(registrationId) .correlationId(correlationId); if (!toDriverCommandBuffer.write(REMOVE_COUNTER, buffer, 0, RemoveMessageFlyweight.length())) { throw new AeronException("could not write remove counter command"); } return correlationId; }
conductor.onRemovePublication(removeMsgFlyweight.registrationId(), correlationId); break; conductor.onRemoveSubscription(removeMsgFlyweight.registrationId(), correlationId); break; conductor.onRemoveCounter(removeMsgFlyweight.registrationId(), correlationId); break;
conductor.onRemovePublication(removeMsgFlyweight.registrationId(), correlationId); break; conductor.onRemoveSubscription(removeMsgFlyweight.registrationId(), correlationId); break; conductor.onRemoveCounter(removeMsgFlyweight.registrationId(), correlationId); break;