ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilya Kasnacheev <ilya.kasnach...@gmail.com>
Subject Re: ***UNCHECKED*** new CacheConfiguration always returns same instance
Date Thu, 20 Sep 2018 09:57:40 GMT
Hello!

hashCode is implemented by MutableConfiguration (from JCache) which only
takes a subset of fields into account.

Why is this a problem for you?

Regards,
-- 
Ilya Kasnacheev


ср, 19 сент. 2018 г. в 10:21, kcheng.mvp <kcheng.mvp@gmail.com>:

> here is a simple test code
>
> CacheConfiguration cacheCfg = new CacheConfiguration<>(IG_P);
>         cacheCfg.setBackups(1);
>
>
> cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.PRIMARY_SYNC);
>         logger.info("instance {}", cacheCfg.hashCode());
>
>         cacheCfg = new CacheConfiguration<>(IG_T);
>         cacheCfg.setBackups(1);
>
>
> cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.PRIMARY_SYNC);
>         logger.info("instance {}", cacheCfg.hashCode());
>
>
> the log shows even I create CacheConfiguration two times, but they have the
> same hashcode. is this correct?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Mime
View raw message