Closing the connection when using the native client

43 views
Skip to first unread message

Torbjørn Vatn

unread,
Dec 5, 2014, 10:56:23 AM12/5/14
to clojure-el...@googlegroups.com
Hi,

I'm testing out Elastisch and was wondering how one can close the connection gacefully when using the native client?

The reference mentions calling the client.close() method on shutdown, but I couldn't see any corresponding call in the Eleastisch client

Thanks 
Torbjørn

Michael Klishin

unread,
Dec 7, 2014, 8:45:03 AM12/7/14
to Torbjørn Vatn, clojure-el...@googlegroups.com
 On 5 December 2014 at 18:56:24, Torbjørn Vatn (torb...@vatn.org) wrote:
> I'm testing out Elastisch and was wondering how one can close
> the connection gacefully when using the native client?
>
> The reference(http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/client.html#transport-client)
> mentions calling the client.close() method on shutdown, but
> I couldn't see any corresponding call in the Eleastisch client

org.elasticsearch.client.FilterClient provides #close, unfortunately,
org.elasticsearch.client.Client (the main interface) does not
include it.
--
@michaelklishin, github.com/michaelklishin

Shay Banon

unread,
Dec 7, 2014, 9:05:24 AM12/7/14
to clojure-el...@googlegroups.com, Torbjørn Vatn
The main Client interface does have #close, it extends Releasable (AutoCloseable).
> --
> Documentation guides: http://clojureelasticsearch.info
> Repository: https://github.com/clojurewerkz/elastisch
> Change log: https://github.com/clojurewerkz/elastisch/blob/master/ChangeLog.md
> Issues: https://github.com/clojurewerkz/elastisch/issues
> ---
> Has recibido este mensaje porque estás suscrito al grupo "clojure-elasticsearch" de Grupos de Google.
> Para anular la suscripción a este grupo y dejar de recibir sus mensajes, envía un correo electrónico a clojure-elastics...@googlegroups.com.
> Para obtener más opciones, visita https://groups.google.com/d/optout.

Michael Klishin

unread,
Dec 7, 2014, 9:10:55 AM12/7/14
to Shay Banon, clojure-el...@googlegroups.com, Torbjørn Vatn
On 7 December 2014 at 17:05:24, Shay Banon (kim...@gmail.com) wrote:
> The main Client interface does have #close, it extends Releasable
> (AutoCloseable).

I stand corrected :)

Thank you, Shay!
--
@michaelklishin, github.com/michaelklishin

Shay Banon

unread,
Dec 7, 2014, 9:11:55 AM12/7/14
to Michael Klishin, clojure-el...@googlegroups.com, Torbjørn Vatn
Whatever I can to help this wonderful lib :)
Reply all
Reply to author
Forward
0 new messages