ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Gura <ag...@apache.org>
Subject Re: generic class support
Date Thu, 09 Mar 2017 11:03:45 GMT
Generics are compile time. You should know what types will be used in
runtime and configure indexing accordingly to this knowledge. If your
entires can contain different types just use java.lang.Object.

On Thu, Mar 9, 2017 at 4:37 AM, shawn.du <shawn.du@neulion.com.cn> wrote:
> Hi,
>
> see below configuration:
> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>          <property name="name" value="cacheName"/>
>          <property name="indexedTypes">
>              <list>
>                      <value>java.lang.String</value>
>                      <value>com.example.MyClass</value>
>               </list>
>          </property>
> </bean>
>
> MyClass is a generic class.  T can be Integer/Long/byte[]/String etc simple
> data type.
>
> public class MyClass<T>
> {
>     @QuerySqlField
>      private T value;
> }
>
> Does ignite support?
>
> Thanks
> Shawn
>

Mime
View raw message