We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bc382e2 + d88f641 commit 2aabc1cCopy full SHA for 2aabc1c
util/src/main/java/io/kubernetes/client/util/Watch.java
@@ -31,7 +31,8 @@
31
* set watch to True and watch the changes to namespaces.
32
*/
33
public class Watch<T> implements Iterable<Watch.Response<T>>,
34
- Iterator<Watch.Response<T>> {
+ Iterator<Watch.Response<T>>,
35
+ java.io.Closeable {
36
37
/**
38
* Response class holds a watch response that has a `type` that can be
@@ -120,4 +121,8 @@ public Iterator<Response<T>> iterator() {
120
121
public void remove() {
122
throw new UnsupportedOperationException("remove");
123
}
124
+
125
+ public void close() throws IOException {
126
+ this.response.close();
127
+ }
128
0 commit comments