Reuse NodeClient inside prepareRequest plugin method

(Vitlalii Glazkov) #1


Is it possible to reuse NodeClient inside prepareRequest plugin method? I want to pin it inside my native code. Will it be safe to use it across multiple threads inside jni or I should every time use new provided client?

(Zachary Tong) #2

Yep, the NodeClient (and TransportClient) is thread safe, so you can share it between multiple threads. That's the preferred way, to reduce overhead and chattiness with the cluster.

(Vitlalii Glazkov) #3


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.