I'm running simple java class with this code in main:
Map<Integer, String> customers = hazelcastInstance.getMap( "customers" );
customers.put( 1, "test" );
If I run hazelcast mancenter, I will be able to get entries list in console:
> ns cusomters
customers> m.entries
1: test
But if I try to get some value by id, I always get null:
customers> m.get 1
null
And if I put some entries in console, I will be able to get them:
customers> m.put 5 test2
null
customers> m.get 5
5 : test2
What am I doing wrong? Please help.
I would not use the mancenter for this. Just rely on regular java to access the IMap.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.