From e5c2d3320e9be0394eb4ed147939b2ae615caf61 Mon Sep 17 00:00:00 2001 From: "Matthias J. Sax" Date: Sat, 7 Jan 2017 10:40:47 -0800 Subject: [PATCH 1/2] MINOR: rework JavaDoc for windowing related public API --- .../kafka/streams/kstream/JoinWindows.java | 90 +++++++++++---- .../kafka/streams/kstream/SessionWindows.java | 60 ++++++---- .../kafka/streams/kstream/TimeWindows.java | 107 +++++++++++------- .../streams/kstream/UnlimitedWindows.java | 83 ++++++++++---- .../apache/kafka/streams/kstream/Window.java | 40 ++++--- .../kafka/streams/kstream/Windowed.java | 28 ++++- .../apache/kafka/streams/kstream/Windows.java | 61 ++++++---- .../kstream/internals/SessionWindow.java | 18 ++- .../streams/kstream/internals/TimeWindow.java | 37 +++++- .../kstream/internals/UnlimitedWindow.java | 34 +++++- 10 files changed, 403 insertions(+), 155 deletions(-) diff --git a/streams/src/main/java/org/apache/kafka/streams/kstream/JoinWindows.java b/streams/src/main/java/org/apache/kafka/streams/kstream/JoinWindows.java index 6dd1a85f5340a..88bf326c0d9ac 100644 --- a/streams/src/main/java/org/apache/kafka/streams/kstream/JoinWindows.java +++ b/streams/src/main/java/org/apache/kafka/streams/kstream/JoinWindows.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,20 +17,23 @@ package org.apache.kafka.streams.kstream; +import org.apache.kafka.common.annotation.InterfaceStability; + import java.util.Map; /** * The window specifications used for joins. *

- * A {@link JoinWindows} instance defines a join over two stream on the same key and a maximum time difference. + * A {@link JoinWindows} instance defines a maximum time difference for a {@link KStream#join(KStream, ValueJoiner, + * JoinWindows) join over two streams} on the same key. * In SQL-style you would express this join as - *

+ * 
{@code
  *     SELECT * FROM stream1, stream2
  *     WHERE
  *       stream1.key = stream2.key
  *       AND
  *       stream1.ts - before <= stream2.ts AND stream2.ts <= stream1.ts + after
- * 
+ * }
* There are three different window configuration supported: *