-
1. Re: AtomicHashMap & Filesystem based cache stores.
wdfink Oct 24, 2014 7:36 AM (in response to ges)I don't understand your example could you show the code how you put/get the values?
-
2. Re: AtomicHashMap & Filesystem based cache stores.
ges Oct 24, 2014 8:20 AM (in response to wdfink)javascript:;final FineGrainedAtomicMap<K, V> am = AtomicMapLookup.getFineGrainedAtomicMap(cache, key);
am.put(amKey, amValue);
I've tried the above and also the code below.
final TransactionManager tm = cache.getAdvancedCache().getTransactionManager();
try {
tm.begin();
final FineGrainedAtomicMap<K, V> am = AtomicMapLookup.getFineGrainedAtomicMap(cache, key);
am.put(amKey, amValue);
tm.commit();
} catch (NotSupportedException | SystemException | RollbackException | HeuristicRollbackException| HeuristicMixedException e) {
e.printStackTrace();
}
This the my configuration for the cache:
final ConfigurationBuilder configurationBuilder = new ConfigurationBuilder();
configurationBuilder.transaction().transactionManagerLookup(new JBossStandaloneJTAManagerLookup()).persistence()..addSingleFileStore().ignoreModifications(false).async().enable().threadPoolSize(30).modificationQueueSize(1000000).preload(false);
The data is available in the cache and can be queried but it does not get persisted into the store.