Hello Scott,

ClientCache.getName() is a local operation, it simply returns a cached
string.

IgniteClient.cluster().state() is a good way to check the connectivity -
it sends a lightweight request to the server.

As I understood, you are asking for something like IgniteClient.ping(),
right?

Thanks,
Pavel

On Sat, Sep 12, 2020 at 2:25 AM Scott Prater <[email protected]> wrote:

> Hello,
>
> I'm a new Ignite user, and with just a little bit of exposure, I'm quite
> impressed with it -- it did not take me long to get a single standalone
> remote node up and running and start using it as a durable memory key-value
> store.
>
> I created a connection pool for ClientCache in Java, using Apache Commons
> Pool 2.  So far it's working well, but I had to fudge overriding the
> commons-pool2 "validateObject()" method, which is a method to test that
> your pooled object is still alive and well:  I used
> clientCache.getName().equals("MY_CACHE") as a test, but I have no idea if
> this indicates whether the connection to my remote cache is active or not.
>
> In some future release, could you add a "isConnected()" method or similar
> to ClientCache or IgniteClient (if it makes more sense there), for ease of
> testing connections and determining when to discard bad client objects?
>
> thanks,
>
> -- Scott
>

Reply via email to