ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From diopek <deha.pe...@gmail.com>
Subject Re: Cache startSize tunning
Date Fri, 13 Nov 2015 04:07:45 GMT
Below is one use case;
Step 1, I get a handle to cache already configured in one common cache
configuration xml file
Step 2, flush the cache in case it is full
Step 3, populate regular Java LinkedHashMap from one DB
Step 4, add that LinkedHashMap to Ignite cache.
Before Step 4 I want to set the Ignite Cache size same as LinkedHashMap
returned from DB.

[1] IgniteCache<Integer, ArrayList&lt;MyDTO>> cache = Ignition.ignite()			
[2]		cache.clear();
[3]		LinkedHashMap<Integer, ArrayList&lt;MyDTO>> res =
dstreamDAO.getExistingMap(asOfDate, scenarioId);
[4]		cache.putAll(res);

One other question, this above is one typical use case that I populate
Ignite Cache from existing APIs for regular Java Map, is there any
inefficiency on this method, should I populate Ignite cache with directly
rather than using putAll method passing LinkedHashMap. Thanks.

View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cache-startSize-tunning-tp1948p1955.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message