Java Node api: isStarted() isStopped() methods needed


(Doru Sular) #1

Hi guys,

I am using elasticsearch embedded in my webapplication. I really need the
methods "isStarted" and "isStopped" on Node api. Currently I wait in my
current thread for several seconds for starting/stopping, but I think that
it will bring more code clarity to have this methods in the java api.
Something like this:
/**

  • Returns true if the node is active and ready to be used, false otherwise.
    */
    public boolean isStarted();

/**

  • Returns true if the node managed to stop all threads started by it,
    false otherwise.
    */
    public boolean isStopped();

Can you help me in this issue?

Thank you very much,
Doru

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c9dc6a19-53a5-4b4d-a911-9408ae63af8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Alexander Reelsen) #2

Hey

maybe isClosed() can help you here?

--Alex

On Thu, Apr 10, 2014 at 5:40 PM, Doru Sular doru.sular@gmail.com wrote:

Hi guys,

I am using elasticsearch embedded in my webapplication. I really need the
methods "isStarted" and "isStopped" on Node api. Currently I wait in my
current thread for several seconds for starting/stopping, but I think that
it will bring more code clarity to have this methods in the java api.
Something like this:
/**

  • Returns true if the node is active and ready to be used, false
    otherwise.
    */
    public boolean isStarted();

/**

  • Returns true if the node managed to stop all threads started by it,
    false otherwise.
    */
    public boolean isStopped();

Can you help me in this issue?

Thank you very much,
Doru

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/c9dc6a19-53a5-4b4d-a911-9408ae63af8c%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/c9dc6a19-53a5-4b4d-a911-9408ae63af8c%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9v4NLxhbEm8NSzd13RdEXfEX_6SWRvjB%2BhEtFm-0hmQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(system) #3