-
1. Re: does infinispan cache allow to put a value of any kind of object instead of String
nadirx Mar 5, 2013 7:41 AM (in response to digant)Yes, an Infinispan cache implements the Map API, so you can put whatever you want in there. Read https://docs.jboss.org/author/display/ISPN/Marshalling for more information.
-
2. Re: does infinispan cache allow to put a value of any kind of object instead of String
digant Mar 5, 2013 8:22 AM (in response to nadirx)Hi
I tried the following getting the compiling error on the last row (the put method accept only a Map of Strings not KpiRecord). I tried also putAll etc... with the same problem.
Map<String, kpiRecord> rand = new HashMap<String, kpiRecord>();
kpiRecord kpiRecord = new kpiRecord();
kpiRecord.kpi1 = 1;
kpiRecord.kpi2 = 2;
rand.put("key", kpiRecord);
cache.put(rand); <-- COMPILING ERROR
br,
Antonio
-
3. Re: does infinispan cache allow to put a value of any kind of object instead of String
mircea.markus Mar 8, 2013 11:14 AM (in response to digant)cache.put(rand); <-- COMPILING ERROR
Cache.put requires two arguments, a key and a value. Cache.putAll should work though..