Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-9663: Doc some null returns in KafkaStreams #8228

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,8 @@ public Collection<StreamsMetadata> allMetadataForStore(final String storeName) {
* @param keySerializer serializer for the key
* @param <K> key type
* @return {@link StreamsMetadata} for the {@code KafkaStreams} instance with the provided {@code storeName} and
* {@code key} of this application or {@link StreamsMetadata#NOT_AVAILABLE} if Kafka Streams is (re-)initializing
* {@code key} of this application or {@link StreamsMetadata#NOT_AVAILABLE} if Kafka Streams is (re-)initializing,
* or {@code null} if no matching metadata could be found.
* @deprecated Since 2.5. Use {@link #queryMetadataForKey(String, Object, Serializer)} instead.
*/
@Deprecated
Expand Down Expand Up @@ -1116,7 +1117,8 @@ public <K> StreamsMetadata metadataForKey(final String storeName,
* @param partitioner the partitioner to be use to locate the host for the key
* @param <K> key type
* @return {@link StreamsMetadata} for the {@code KafkaStreams} instance with the provided {@code storeName} and
* {@code key} of this application or {@link StreamsMetadata#NOT_AVAILABLE} if Kafka Streams is (re-)initializing
* {@code key} of this application or {@link StreamsMetadata#NOT_AVAILABLE} if Kafka Streams is (re-)initializing,
* or {@code null} if no matching metadata could be found.
* @deprecated Since 2.5. Use {@link #queryMetadataForKey(String, Object, StreamPartitioner)} instead.
*/
@Deprecated
Expand All @@ -1134,7 +1136,8 @@ public <K> StreamsMetadata metadataForKey(final String storeName,
* @param key the key to find metadata for
* @param keySerializer serializer for the key
* @param <K> key type
* Returns {@link KeyQueryMetadata} containing all metadata about hosting the given key for the given store.
* Returns {@link KeyQueryMetadata} containing all metadata about hosting the given key for the given store,
* or {@code null} if no matching metadata could be found.
*/
public <K> KeyQueryMetadata queryMetadataForKey(final String storeName,
final K key,
Expand All @@ -1151,7 +1154,7 @@ public <K> KeyQueryMetadata queryMetadataForKey(final String storeName,
* @param partitioner the partitioner to be use to locate the host for the key
* @param <K> key type
* Returns {@link KeyQueryMetadata} containing all metadata about hosting the given key for the given store, using the
* the supplied partitioner
* the supplied partitioner, or {@code null} if no matching metadata could be found.
*/
public <K> KeyQueryMetadata queryMetadataForKey(final String storeName,
final K key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public synchronized Collection<StreamsMetadata> getAllMetadataForStore(final Str
* @param keySerializer Serializer for the key
* @param <K> key type
* @return The {@link StreamsMetadata} for the storeName and key or {@link StreamsMetadata#NOT_AVAILABLE}
* if streams is (re-)initializing
* if streams is (re-)initializing, or {@code null} if no matching metadata could be found.
* @deprecated Use {@link #getKeyQueryMetadataForKey(String, Object, Serializer)} instead.
*/
@Deprecated
Expand Down Expand Up @@ -185,7 +185,8 @@ public synchronized <K> StreamsMetadata getMetadataWithKey(final String storeNam
* @param keySerializer Serializer for the key
* @param <K> key type
* @return The {@link KeyQueryMetadata} for the storeName and key or {@link KeyQueryMetadata#NOT_AVAILABLE}
* if streams is (re-)initializing or null if the corresponding topic cannot be found
* if streams is (re-)initializing or {@code null} if the corresponding topic cannot be found,
* or null if no matching metadata could be found.
*/
public synchronized <K> KeyQueryMetadata getKeyQueryMetadataForKey(final String storeName,
final K key,
Expand All @@ -207,7 +208,7 @@ public synchronized <K> KeyQueryMetadata getKeyQueryMetadataForKey(final String
* @param partitioner partitioner to use to find correct partition for key
* @param <K> key type
* @return The {@link KeyQueryMetadata} for the storeName and key or {@link KeyQueryMetadata#NOT_AVAILABLE}
* if streams is (re-)initializing
* if streams is (re-)initializing, or {@code null} if no matching metadata could be found.
*/
public synchronized <K> KeyQueryMetadata getKeyQueryMetadataForKey(final String storeName,
final K key,
Expand Down Expand Up @@ -247,7 +248,7 @@ public synchronized <K> KeyQueryMetadata getKeyQueryMetadataForKey(final String
* @param partitioner partitioner to use to find correct partition for key
* @param <K> key type
* @return The {@link StreamsMetadata} for the storeName and key or {@link StreamsMetadata#NOT_AVAILABLE}
* if streams is (re-)initializing
* if streams is (re-)initializing, or {@code null} if no matching metadata could be found.
* @deprecated Use {@link #getKeyQueryMetadataForKey(String, Object, StreamPartitioner)} instead.
*/
@Deprecated
Expand Down