user3516155 wrote:Why don't you just use memcached?
I need to build one Java standalone application which will act as a server for c++. I mean C++ will make a JNI call to make a use of JAVA methods. Here C++ application is continuous running which will make a JNI call on need basis.
on the JAVA side there is static hashmap with addKey() method. so from C++ we need to call addKey() method using JNI, which will add keys in the existing HashMap. C++ application might call addKey() method continuously or say after 6hrs. So how to make sure that same HashMap will be use and all stored values will be remain in the HashMap which I have added?? How to make sure that it will not be garbage collected? OR any other solution for the same? here we don't want to use file system to store the values.