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

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -