using user defined object as key in ignite c++ client

classic Classic list List threaded Threaded
3 messages Options
kotamrajuyashasvi kotamrajuyashasvi
Reply | Threaded
Open this post in threaded view
|

using user defined object as key in ignite c++ client

Hi.. I was able to run a sample c++ client program , loading/retrieving cache from a table in  persistent store. The table has just one int field as primary key and for cache I configured this primary key int as the cache key. But now I want to use cache for table in persistent store which have combination of different fields as primary key. What should I use as a cache key in this situation? Just like I used POJO to map cache values, should I use another POJO for cache keys?If so how should I map cache key POJO to c++?
Igor Sapego Igor Sapego
Reply | Threaded
Open this post in threaded view
|

Re: using user defined object as key in ignite c++ client

Hi,

You need to declare matching class in C++ and specialize
BinaryType template for it as described at [1].

You can find which type in C++ matches which type from
Java at [2].


Best Regards,
Igor

On Thu, Jul 27, 2017 at 2:53 PM, kotamrajuyashasvi <[hidden email]> wrote:
Hi.. I was able to run a sample c++ client program , loading/retrieving cache
from a table in  persistent store. The table has just one int field as
primary key and for cache I configured this primary key int as the cache
key. But now I want to use cache for table in persistent store which have
combination of different fields as primary key. What should I use as a cache
key in this situation? Just like I used POJO to map cache values, should I
use another POJO for cache keys?If so how should I map cache key POJO to
c++?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/using-user-defined-object-as-key-in-ignite-c-client-tp15727.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

kotamrajuyashasvi kotamrajuyashasvi
Reply | Threaded
Open this post in threaded view
|

Re: using user defined object as key in ignite c++ client

Thanks for the response. I am able to use object as key now