/** * Executes example. * * @param args Command line arguments, none required. */ public static void main(String[] args) { try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) { System.out.println(); System.out.println(">>> Cache star schema example started."); CacheConfiguration<Integer, FactPurchase> factCacheCfg = new CacheConfiguration<>(PARTITIONED_CACHE_NAME); factCacheCfg.setCacheMode(CacheMode.PARTITIONED); factCacheCfg.setIndexedTypes(Integer.class, FactPurchase.class); CacheConfiguration<Integer, Object> dimCacheCfg = new CacheConfiguration<>(REPLICATED_CACHE_NAME); dimCacheCfg.setCacheMode(CacheMode.REPLICATED); dimCacheCfg.setIndexedTypes( Integer.class, DimStore.class, Integer.class, DimProduct.class); try (IgniteCache<Integer, FactPurchase> factCache = ignite.getOrCreateCache(factCacheCfg); IgniteCache<Integer, Object> dimCache = ignite.getOrCreateCache(dimCacheCfg)) { populateDimensions(dimCache); populateFacts(factCache); queryStorePurchases(); queryProductPurchases(); } } }