ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladislav Pyatkov <vpyat...@gridgain.com>
Subject Re: Ignite java and xml configuration
Date Fri, 27 Jan 2017 09:27:31 GMT
Hi Anil,

You can use configuration cache in xml with annotation query field.
But you if you are use @SqlQueryField, then you should use
CacheConfiguration#setIndexedTypes property instead of QueryEntity.

On Fri, Jan 27, 2017 at 12:06 PM, Anil <anilklce@gmail.com> wrote:

> Hi,
>
> we are using combination of java and xml configuration for ignite.
>
> for now, cache configuration uses java configuration and  swap, discovery
> uses xml configuration.
>
> Is there any way to move the cache configuration to xml which uses the
> java annotations ? thanks.
>
> Below is the current cache configuration.
>
> CacheConfiguration<AffinityKey<String>, Person> pConfig = new
> CacheConfiguration<AffinityKey<String>, Person>();
> pConfig.setName("PERSON_CACHE");
> pConfig.setBackups(1);
> pConfig.setCacheMode(CacheMode.PARTITIONED);
> pConfig.setIndexedTypes(AffinityKey.class, Person.class);
> pConfig.setCopyOnRead(false);
> pConfig.setSwapEnabled(true);
> pConfig.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
> pConfig.setOffHeapMaxMemory(1024 * 1024 * 1024 * 8);
>
>
> i set the query entities in xml and tried to use @SqlQueryField for Person
> pojo fields and did not work.
>
> Thanks.
>
>

Mime
View raw message