Skip to content

Commit b4caaae

Browse files
committed
fix #246 - add close() method to PojoPage
1 parent be5aa09 commit b4caaae

File tree

3 files changed

+173
-82
lines changed

3 files changed

+173
-82
lines changed

src/main/java/com/marklogic/client/impl/PojoPageImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ public T next() {
5858
return docPage.nextContent(handle).get();
5959
}
6060

61+
@Override
62+
public void close() {
63+
docPage.close();
64+
}
65+
6166
@Override
6267
public void remove() {
6368
throw new UnsupportedOperationException();

src/main/java/com/marklogic/client/pojo/PojoPage.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@
2020
/** Enables pagination over objects retrieved from the server and deserialized by
2121
* PojoRepository read and search methods.
2222
*/
23-
public interface PojoPage<T> extends Page<T> {}
23+
public interface PojoPage<T> extends Page<T> {
24+
/** Frees the underlying resources, including the http connection. */
25+
public void close();
26+
}

0 commit comments

Comments
 (0)