Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
public class TypeConfiguration implements Serializable {
    /** Serial version UID. */
    private static final long serialVersionUID = 0L;
 
    /** 
     * Type name. Can be one of three things:
     * - Simple type name. Use it when type is not in classpath;
     * - Fully qualified type name. Prefer it when type is in classpath to avoid conflicts. 
     *   E.g. "my.package.employee.Address", "my.package.organization.Address";
     * - Package wildcard. Must ends with ".*" in this case. E.g. "my.package.*".
     */
    private String typeName;
 
    /** Used to configure single type when it is not in classpath. */
    public void setTypeName(String);
 
    /** Used to configure specific class. Both typeName and packageName fields will be set. */
    public void setClass(Class);
 
    /** Affinity key field name. */
    private String affKeyFieldName;

    /** Type info extensions. */
    private Map<Class<? extends TypeInfo>, ? extends TypeInfo> typeInfos;
 
    public voidTypeInfo[] setTypeInfo(TypeInfo... typeInfosgetTypeInfo() {...}
 
    public void TypeInfo[] getTypeInfo(setTypeInfo(TypeInfo... typeInfos) {...}  
 
    public <T extends TypeInfo> T getTypeInfo(Class<T> infoCls) {...}
}

...

Code Block
languagejava
public class PersistenceTypeInfo implements TypeInfo {
    /** Serial version UID. */
    private static final long serialVersionUID = 0L;

    /** Schema name in database. */
    private String dbSchema;

    /** Table name in database. */
    private String dbTbl;

    /** Persisted fields. */
    private Collection<PersistenceFieldInfo>Collection<PersistenceField> fields;
}
Code Block
languagejava
public class PersistenceFieldInfoPersistenceField implements Serializable {
    /** Serial version UID. */
    private static final long serialVersionUID = 0L;

    /** Column name in database. */
    private String dbFieldName;

    /** Column JDBC type in database. */
    private int dbFieldType;

    /** Field name in java object. */
    private String javaFieldName;

    /** Corresponding java type. */
    private Class<?> javaFieldType;
}

...

Code Block
languagejava
public class QueryTypeInfo implements TypeInfo {
    /** Serial version UID. */
    private static final long serialVersionUID = 0L;

    /** Field name-to-type map to be queried, in addition to indexed fields. */
    @GridToStringIncludeFields. */
    private QueryField[] flds;
 
    /** Group indexes. */
    private Map<String, Class<?>> qryFldsQueryCompoundIndex[] grpIdxs;
 
    /** Field name-to-type map Fields to index inas ascending ordertext. */
    private String[] txtIdxs;    
}
Code Block
languagejava
public class QueryField implements Serializable  @GridToStringInclude{
    /** Serial version UID. */
    private Map<String, Class<?>> ascFlds static final long serialVersionUID = 0L;

    /** Field name-to-type map to index in descending order. */
    @GridToStringInclude. */
    private String name;
 
    /** Field class. */
    private Map<String, Class<?>> descFldsClass cls;
 
    /** FieldsWhether to index as textthe field. Disabled by default. */
    @GridToStringInclude
private QueryFieldIndexType idxTyp  private Collection<String> txtFlds;

= QueryFieldIndexType.NONE;
}
Code Block
languagejava
public enum QueryFieldIndexType {
    /** Fields to create group indexes for Do not index the field. */
    NONE,
 
    /** Ascending order. */ 
    @GridToStringIncludeASC,
 
     private Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> grps;/** Descending order. */ 
    DESC
}
Code Block
languagejava
public class QueryTypeInfoQueryCompoundIndex implements TypeInfoSerializable {
    /** Serial version UID. */
    private static final long serialVersionUID = 0L;

    /** FieldIndex name-to-type map to be queried, in addition to indexed. */
    String name;
 
    /** Participating fields. */
    private QueryFieldInfo[] @GridToStringInclude
    private Map<String, Class<?>> qryFlds;

    /** Field name-to-type map to index in ascending order. */
    @GridToStringInclude
    private Map<String, Class<?>> ascFlds;

    /** Field name-to-type map to index in descending order. */
    @GridToStringInclude
    private Map<String, Class<?>> descFlds;

    /** Fields to index as text. */
    @GridToStringIncludeflds;
}

Notes

  • QueryFieldInfo.cls is a problem for non-Java users, because they have to write ugly things like "java.lang.Integer" which is very hard to understand for non-Java users. Lets switch to enum here?

IgniteConfiguration

Code Block
languagejava
public class IgniteConfiguration {
    /** Type configurations. */
    private TypeConfiguration[] typeCfg;
 
    public TypeConfiguration[] getTypeConfiguration();
    public void setTypeConfiguration(TypeConfiguration... typeCfg);
}

CacheConfiguration

Code Block
languagejava
public class CacheConfiguration {
    /** Type configurations. */
    private Collection<String>TypeConfiguration[] txtFldstypeCfg;
 
    /** Fields to create group indexes for. */public TypeConfiguration[] getTypeConfiguration();
    @GridToStringInclude
public void   private Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> grpssetTypeConfiguration(TypeConfiguration... typeCfg);
}