Java Code Examples for org.apache.ignite.configuration.IgniteConfiguration#getDataStorageConfiguration()
The following examples show how to use
org.apache.ignite.configuration.IgniteConfiguration#getDataStorageConfiguration() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ValidationOnNodeJoinUtils.java From ignite with Apache License 2.0 | 5 votes |
/** * @param c Ignite Configuration. * @param cc Cache Configuration. * @param ctx Context. * @return {@code true} if cache is starting on client node and this node is affinity node for the cache. */ private static boolean storesLocallyOnClient(IgniteConfiguration c, CacheConfiguration cc, GridKernalContext ctx) { if (c.isClientMode() && c.getDataStorageConfiguration() == null) { if (cc.getCacheMode() == LOCAL) return true; return ctx.discovery().cacheAffinityNode(ctx.discovery().localNode(), cc.getName()); } else return false; }
Example 2
Source File: IgnitionEx.java From ignite with Apache License 2.0 | 5 votes |
/** * @param cfg Ignite configuration. */ private void initializeDataStorageConfiguration(IgniteConfiguration cfg) throws IgniteCheckedException { if (cfg.getDataStorageConfiguration() != null && (cfg.getMemoryConfiguration() != null || cfg.getPersistentStoreConfiguration() != null)) { throw new IgniteCheckedException("Data storage can be configured with either legacy " + "(MemoryConfiguration, PersistentStoreConfiguration) or new (DataStorageConfiguration) classes, " + "but not both."); } if (cfg.getMemoryConfiguration() != null || cfg.getPersistentStoreConfiguration() != null) convertLegacyDataStorageConfigurationToNew(cfg); if (!cfg.isClientMode() && cfg.getDataStorageConfiguration() == null) cfg.setDataStorageConfiguration(new DataStorageConfiguration()); }
Example 3
Source File: GridAbstractTest.java From ignite with Apache License 2.0 | 5 votes |
/** * @param cfg Config. */ private void validateConfiguration(IgniteConfiguration cfg) { if (cfg.getDataStorageConfiguration() != null) { validateDataRegion(cfg.getDataStorageConfiguration().getDefaultDataRegionConfiguration()); if (cfg.getDataStorageConfiguration().getDataRegionConfigurations() != null) { for (DataRegionConfiguration reg : cfg.getDataStorageConfiguration().getDataRegionConfigurations()) validateDataRegion(reg); } } }
Example 4
Source File: IgnitePersistenceSequentialCheckpointTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); DataStorageConfiguration dsCfg = cfg.getDataStorageConfiguration(); dsCfg.setCheckpointThreads(4).setCheckpointWriteOrder(CheckpointWriteOrder.SEQUENTIAL); return cfg; }
Example 5
Source File: EncryptedCacheCreateTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String name) throws Exception { IgniteConfiguration cfg = super.getConfiguration(name); DataStorageConfiguration memCfg = cfg.getDataStorageConfiguration(); memCfg.setDataRegionConfigurations(new DataRegionConfiguration() .setMaxSize(10L * 1024 * 1024) .setName(NO_PERSISTENCE_REGION) .setPersistenceEnabled(false)); return cfg; }