Skip to content

Commit afe6703

Browse files
authored
deprecate .withStreamId(...) methods for source/sink builders (#87)
- fixes #47
1 parent 9ba7bd6 commit afe6703

16 files changed

+40
-48
lines changed

sdk/flink-1.16/src/main/java/co/decodable/sdk/pipeline/DecodableStreamSinkBuilder.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@
1414
@Incubating
1515
public interface DecodableStreamSinkBuilder<T> {
1616

17-
/**
18-
* Specifies the name of the stream to write to. Either this or {@link #withStreamId(String)} may
19-
* be used, but not both.
20-
*/
17+
/** Specifies the name of the stream to write to. */
2118
DecodableStreamSinkBuilder<T> withStreamName(String streamName);
2219

2320
/**
24-
* Specifies the id of the stream to write to. Either this or {@link #withStreamName(String)} may
25-
* be used, but not both.
21+
* @deprecated Specifies the id of the stream to write to. Use {@link #withStreamName(String)}
22+
* instead.
2623
*/
24+
@Deprecated
2725
DecodableStreamSinkBuilder<T> withStreamId(String streamId);
2826

2927
/** Specifies the serialization schema to be used. */

sdk/flink-1.16/src/main/java/co/decodable/sdk/pipeline/DecodableStreamSourceBuilder.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@
1414
@Incubating
1515
public interface DecodableStreamSourceBuilder<T> {
1616

17-
/**
18-
* Specifies the name of the stream to read from. Either this or {@link #withStreamId(String)} may
19-
* be used, but not both.
20-
*/
17+
/** Specifies the name of the stream to read from. */
2118
DecodableStreamSourceBuilder<T> withStreamName(String streamName);
2219

2320
/**
24-
* Specifies the id of the stream to read from. Either this or {@link #withStreamName(String)} may
25-
* be used, but not both.
21+
* @deprecated Specifies the id of the stream to read from. Use {@link #withStreamName(String)}
22+
* instead.
2623
*/
24+
@Deprecated
2725
DecodableStreamSourceBuilder<T> withStreamId(String streamId);
2826

2927
/** Specifies the start-up mode to use when reading from the stream. */

sdk/flink-1.16/src/main/java/co/decodable/sdk/pipeline/internal/DecodableStreamSinkBuilderImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public DecodableStreamSinkBuilder<T> withStreamName(String streamName) {
3333
}
3434

3535
@Override
36+
@Deprecated
3637
public DecodableStreamSinkBuilder<T> withStreamId(String streamId) {
3738
this.streamId = streamId;
3839
return this;

sdk/flink-1.16/src/main/java/co/decodable/sdk/pipeline/internal/DecodableStreamSourceBuilderImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public DecodableStreamSourceBuilder<T> withStreamName(String streamName) {
3535
}
3636

3737
@Override
38+
@Deprecated
3839
public DecodableStreamSourceBuilder<T> withStreamId(String streamId) {
3940
this.streamId = streamId;
4041
return this;

sdk/flink-1.18/src/main/java/co/decodable/sdk/pipeline/DecodableStreamSinkBuilder.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@
1414
@Incubating
1515
public interface DecodableStreamSinkBuilder<T> {
1616

17-
/**
18-
* Specifies the name of the stream to write to. Either this or {@link #withStreamId(String)} may
19-
* be used, but not both.
20-
*/
17+
/** Specifies the name of the stream to write to. */
2118
DecodableStreamSinkBuilder<T> withStreamName(String streamName);
2219

2320
/**
24-
* Specifies the id of the stream to write to. Either this or {@link #withStreamName(String)} may
25-
* be used, but not both.
21+
* @deprecated Specifies the id of the stream to write to. Use {@link #withStreamName(String)}
22+
* instead.
2623
*/
24+
@Deprecated
2725
DecodableStreamSinkBuilder<T> withStreamId(String streamId);
2826

2927
/** Specifies the serialization schema to be used. */

sdk/flink-1.18/src/main/java/co/decodable/sdk/pipeline/DecodableStreamSourceBuilder.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@
1414
@Incubating
1515
public interface DecodableStreamSourceBuilder<T> {
1616

17-
/**
18-
* Specifies the name of the stream to read from. Either this or {@link #withStreamId(String)} may
19-
* be used, but not both.
20-
*/
17+
/** Specifies the name of the stream to read from. */
2118
DecodableStreamSourceBuilder<T> withStreamName(String streamName);
2219

2320
/**
24-
* Specifies the id of the stream to read from. Either this or {@link #withStreamName(String)} may
25-
* be used, but not both.
21+
* @deprecated Specifies the id of the stream to read from. Use {@link #withStreamName(String)}
22+
* instead.
2623
*/
24+
@Deprecated
2725
DecodableStreamSourceBuilder<T> withStreamId(String streamId);
2826

2927
/** Specifies the start-up mode to use when reading from the stream. */

sdk/flink-1.18/src/main/java/co/decodable/sdk/pipeline/internal/DecodableStreamSinkBuilderImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public DecodableStreamSinkBuilder<T> withStreamName(String streamName) {
3333
}
3434

3535
@Override
36+
@Deprecated
3637
public DecodableStreamSinkBuilder<T> withStreamId(String streamId) {
3738
this.streamId = streamId;
3839
return this;

sdk/flink-1.18/src/main/java/co/decodable/sdk/pipeline/internal/DecodableStreamSourceBuilderImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public DecodableStreamSourceBuilder<T> withStreamName(String streamName) {
3535
}
3636

3737
@Override
38+
@Deprecated
3839
public DecodableStreamSourceBuilder<T> withStreamId(String streamId) {
3940
this.streamId = streamId;
4041
return this;

sdk/flink-1.19/src/main/java/co/decodable/sdk/pipeline/DecodableStreamSinkBuilder.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@
1414
@Incubating
1515
public interface DecodableStreamSinkBuilder<T> {
1616

17-
/**
18-
* Specifies the name of the stream to write to. Either this or {@link #withStreamId(String)} may
19-
* be used, but not both.
20-
*/
17+
/** Specifies the name of the stream to write to. */
2118
DecodableStreamSinkBuilder<T> withStreamName(String streamName);
2219

2320
/**
24-
* Specifies the id of the stream to write to. Either this or {@link #withStreamName(String)} may
25-
* be used, but not both.
21+
* @deprecated Specifies the id of the stream to write to. Use {@link #withStreamName(String)}
22+
* instead.
2623
*/
24+
@Deprecated
2725
DecodableStreamSinkBuilder<T> withStreamId(String streamId);
2826

2927
/** Specifies the serialization schema to be used. */

sdk/flink-1.19/src/main/java/co/decodable/sdk/pipeline/DecodableStreamSourceBuilder.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@
1414
@Incubating
1515
public interface DecodableStreamSourceBuilder<T> {
1616

17-
/**
18-
* Specifies the name of the stream to read from. Either this or {@link #withStreamId(String)} may
19-
* be used, but not both.
20-
*/
17+
/** Specifies the name of the stream to read from. */
2118
DecodableStreamSourceBuilder<T> withStreamName(String streamName);
2219

2320
/**
24-
* Specifies the id of the stream to read from. Either this or {@link #withStreamName(String)} may
25-
* be used, but not both.
21+
* @deprecated Specifies the id of the stream to read from. Use {@link #withStreamName(String)}
22+
* instead.
2623
*/
24+
@Deprecated
2725
DecodableStreamSourceBuilder<T> withStreamId(String streamId);
2826

2927
/** Specifies the start-up mode to use when reading from the stream. */

0 commit comments

Comments
 (0)