Search in sources :

Example 1 with Parking

use of org.apache.ignite.console.demo.model.Parking in project ignite by apache.

the class DemoCachesLoadService method cacheParking.

/**
 * Configure cacheEmployee.
 */
private static CacheConfiguration cacheParking() {
    CacheConfiguration ccfg = cacheConfiguration(PARKING_CACHE_NAME);
    // Configure cacheParking types.
    Collection<QueryEntity> qryEntities = new ArrayList<>();
    // PARKING.
    QueryEntity type = new QueryEntity();
    qryEntities.add(type);
    type.setKeyType(Integer.class.getName());
    type.setValueType(Parking.class.getName());
    // Query fields for PARKING.
    LinkedHashMap<String, String> qryFlds = new LinkedHashMap<>();
    qryFlds.put("id", "java.lang.Integer");
    qryFlds.put("name", "java.lang.String");
    qryFlds.put("capacity", "java.lang.Integer");
    type.setFields(qryFlds);
    ccfg.setQueryEntities(qryEntities);
    return ccfg;
}
Also used : ArrayList(java.util.ArrayList) Parking(org.apache.ignite.console.demo.model.Parking) QueryEntity(org.apache.ignite.cache.QueryEntity) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) LinkedHashMap(java.util.LinkedHashMap)

Aggregations

ArrayList (java.util.ArrayList)1 LinkedHashMap (java.util.LinkedHashMap)1 QueryEntity (org.apache.ignite.cache.QueryEntity)1 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)1 Parking (org.apache.ignite.console.demo.model.Parking)1