@Test public void testMetadata() { JoinGroupRequestData.JoinGroupRequestProtocolCollection serialized = coordinator.metadata(); assertEquals(1, serialized.size()); JoinGroupRequestData.JoinGroupRequestProtocol defaultMetadata = serialized.iterator().next(); assertEquals(SchemaRegistryCoordinator.SR_SUBPROTOCOL_V0, defaultMetadata.name()); SchemaRegistryIdentity state = SchemaRegistryProtocol.deserializeMetadata(ByteBuffer.wrap(defaultMetadata.metadata())); assertEquals(LEADER_INFO, state); }
@Override public JoinGroupRequestData.JoinGroupRequestProtocolCollection metadata() { ByteBuffer metadata = SchemaRegistryProtocol.serializeMetadata(identity); return new JoinGroupRequestData.JoinGroupRequestProtocolCollection( Collections.singletonList(new JoinGroupRequestData.JoinGroupRequestProtocol() .setName(SR_SUBPROTOCOL_V0) .setMetadata(metadata.array())).iterator()); }
SchemaRegistryCoordinator extends AbstractCoordinator implements Closeable { @Override public JoinGroupRequestData.JoinGroupRequestProtocolCollection metadata() { ByteBuffer metadata = SchemaRegistryProtocol.serializeMetadata(identity); return new JoinGroupRequestData.JoinGroupRequestProtocolCollection( Collections.singletonList(new JoinGroupRequestData.JoinGroupRequestProtocol() .setName(SR_SUBPROTOCOL_V0) .setMetadata(metadata.array())).iterator()); } }
SchemaRegistryCoordinator extends AbstractCoordinator implements Closeable { @Override public JoinGroupRequestData.JoinGroupRequestProtocolCollection metadata() { ByteBuffer metadata = SchemaRegistryProtocol.serializeMetadata(identity); return new JoinGroupRequestData.JoinGroupRequestProtocolCollection( Collections.singletonList(new JoinGroupRequestData.JoinGroupRequestProtocol() .setName(SR_SUBPROTOCOL_V0) .setMetadata(metadata.array())).iterator()); } SchemaRegistryCoordinator(
          LogContext logContext,
          ConsumerNetworkClient client,
          String groupId,
          int rebalanceTimeoutMs,
          int sessionTimeoutMs,
          int heartbeatIntervalMs,
          Metrics metrics,
          String metricGrpPrefix,
          Time time,
          long retryBackoffMs,
          SchemaRegistryIdentity identity,
          SchemaRegistryRebalanceListener listener,
          SchemaRegistryMetric nodeCountMetric); }
SchemaRegistryCoordinator extends AbstractCoordinator implements Closeable { @Override public JoinGroupRequestData.JoinGroupRequestProtocolCollection metadata() { ByteBuffer metadata = SchemaRegistryProtocol.serializeMetadata(identity); return new JoinGroupRequestData.JoinGroupRequestProtocolCollection( Collections.singletonList(new JoinGroupRequestData.JoinGroupRequestProtocol() .setName(SR_SUBPROTOCOL_V0) .setMetadata(metadata.array())).iterator()); } SchemaRegistryCoordinator(
          LogContext logContext,
          ConsumerNetworkClient client,
          String groupId,
          int rebalanceTimeoutMs,
          int sessionTimeoutMs,
          int heartbeatIntervalMs,
          Metrics metrics,
          String metricGrpPrefix,
          Time time,
          long retryBackoffMs,
          SchemaRegistryIdentity identity,
          SchemaRegistryRebalanceListener listener,
          SchemaRegistryMetric nodeCountMetric); @Override String protocolType(); void poll(long timeout); @Override JoinGroupRequestData.JoinGroupRequestProtocolCollection metadata(); }
SchemaRegistryCoordinator extends AbstractCoordinator implements Closeable { @Override public JoinGroupRequestData.JoinGroupRequestProtocolCollection metadata() { ByteBuffer metadata = SchemaRegistryProtocol.serializeMetadata(identity); return new JoinGroupRequestData.JoinGroupRequestProtocolCollection( Collections.singletonList(new JoinGroupRequestData.JoinGroupRequestProtocol() .setName(SR_SUBPROTOCOL_V0) .setMetadata(metadata.array())).iterator()); } SchemaRegistryCoordinator(
          LogContext logContext,
          ConsumerNetworkClient client,
          String groupId,
          int rebalanceTimeoutMs,
          int sessionTimeoutMs,
          int heartbeatIntervalMs,
          Metrics metrics,
          String metricGrpPrefix,
          Time time,
          long retryBackoffMs,
          SchemaRegistryIdentity identity,
          SchemaRegistryRebalanceListener listener,
          SchemaRegistryMetric nodeCountMetric); @Override String protocolType(); void poll(long timeout); @Override JoinGroupRequestData.JoinGroupRequestProtocolCollection metadata(); static final String SR_SUBPROTOCOL_V0; }