Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Time interface and Timer class in org.apache.kafka.common.utils are currently exposed through public APIs but not officially designated as public. Following KIP-1247 (Make Bytes public), these should be made officially public.

Code Block
languagejava
// multiple KafkaStreams constructors (test-only usage)
public KafkaStreams(Topology topology, Properties props, Time time)

// NetworkClientUtils methods
public static boolean awaitReady(KafkaClient client, Node node, Time time, long timeoutMs)
public static ClientResponse sendAndReceive(KafkaClient client, ClientRequest request, Time time) couple of examples from multiple "org/apache/kafka/common/metrics/Metrics.java" constructors
public Metrics(Time time) {}public Metrics(MetricConfig defaultConfig, Time time) {}// in package "org/apache/kafka/common/security/oauthbearer"public JwtBearerJwtRetriever(Time time) {}public ClientCredentialsJwtRetriever(Time time) {}


However, KafkaStreams exposes constructors accepting Time parameters that are only useful for testing, not production use. As noted in the KIP-1247 discussion, these test-only constructors should be deprecated before making Time the official public API.

...