java - Hazelcast not able to read data into my own class object using IMap.get, where data inserted using Memcached text protocol -
i inserting record hazelcast c application using memcached client library api's, record follows:
typedef struct _activeclient { char id[25]; int ip; char amethod[16]; }activeclient;
now trying reading same record using hazelcast java native api's. here java program.
imap < string, memcacheentry > mapinst = client.getmap("hz_memcache_abc_map"); system.out.println("map size:" + mapinst.size()); string key = new string("70826892122991"); memcacheentry tmpvalrec = pvrmapist.get(key); system.out.println("key:" + key + "id:" + tmpvalrec.getvalue());
here tmpvalrec.getvalue()
printing record content in single string format. but, want retrive each member value tmpvalrec
own java class object. here class
class activeclients { string ueid; int ip; string amethod; activeclients() { ueid = ""; ip = 0; amethod = ""; } }
pointing me example great help.
i guess option parse string deserialize object. know pain, don't see better alternative. unless of course store blob value in memcached blob serialized content of class.
Comments
Post a Comment