Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal: Make Node and Client interfaces Closeable #4355

Closed
udat opened this issue Dec 5, 2013 · 0 comments · Fixed by #6517
Closed

Internal: Make Node and Client interfaces Closeable #4355

udat opened this issue Dec 5, 2013 · 0 comments · Fixed by #6517

Comments

@udat
Copy link

udat commented Dec 5, 2013

org.elasticsearch.node.Node and org.elasticsearch.client.Client interfaces should extend Closeable. Doing so will allow user to use Client and Node instances with try-with-resources, IOUtils.closeQuietly, Guava Closer and similar utilities.

This change is backward compatible and doesn't require any changes except adding "extends Closeable" in two places.

@ghost ghost assigned javanna Jan 18, 2014
@s1monw s1monw closed this as completed in adb5c19 Jun 17, 2014
s1monw added a commit that referenced this issue Jun 17, 2014
Client, ClusterAdminClient and IndicesAdminClient had corresponding
intermediate `internal` interfaces that are unnecessary and cause
a lot of casting. This commit removes the intermediate interfaces
and uses the super interfaces directly.

This commit also adds Releaseable to `Node` and `Client` in order to
be used with utilities like try / with.

Closes #4355
Closes #6517
@clintongormley clintongormley changed the title Make Node and Client interfaces Closeable Internal: Make Node and Client interfaces Closeable Jul 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants