1. We have a separate logic for local cache for a specific scenario, How to
find cache mode for a given cache name? 

Does below code correct or there is alternate way -

    private boolean isLocalCache(String pObjectType) {
        CacheConfiguration[] cfg =
ignite.configuration().getCacheConfiguration();
        for (CacheConfiguration aCfg : cfg) {
            if(aCfg.getName().equalsIgnoreCase(pObjectType)) {
                return aCfg.getCacheMode().equals(CacheMode.LOCAL);
            }
        }
        return false;
    }

2. What happens when EntryProcessor executed on LOCAL cache? Below style
needed or not necessary, invoke will handle it?

if(isLocalCache()) {
...
lock.lock();
long count = cache.get(key);
count = count + 1;
cache.put(key, count);
lock.unlock();
...
} else {
cache.invoke(key, new EntryProcessor(......);
}  



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/LOCAL-cache-and-EntryProcessor-tp7419.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to