Skip to content

Commit 2ee8b6b

Browse files
Improve Javadoc for Coder class and clarify Context usage (#38235)
* improved Coder documentation
1 parent 79fb360 commit 2ee8b6b

File tree

1 file changed

+5
-0
lines changed
  • sdks/java/core/src/main/java/org/apache/beam/sdk/coders

1 file changed

+5
-0
lines changed

sdks/java/core/src/main/java/org/apache/beam/sdk/coders/Coder.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@
5252
* <p>All methods of a {@link Coder} are required to be thread safe.
5353
*
5454
* @param <T> the type of values being encoded and decoded
55+
* <p>The behavior of encoding and decoding depends on the {@link Context}.
56+
* <p>In {@link Context#OUTER}, the value consumes the remainder of the stream.
57+
* <p>In {@link Context#NESTED}, the value is part of a larger structure and must be
58+
* self-delimiting so that subsequent values can be correctly decoded.
59+
* <p>See {@link CoderProperties} for utilities to test coder correctness and consistency.
5560
*/
5661
public abstract class Coder<T> implements Serializable {
5762
/**

0 commit comments

Comments
 (0)