use of org.apache.ignite.configuration.EncryptionConfiguration in project ignite by apache.
the class CacheGroupReencryptionTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String name) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(name);
cfg.setConsistentId(name);
cfg.setIncludeEventTypes(EventType.EVT_CACHE_REBALANCE_STOPPED);
EncryptionConfiguration encCfg = new EncryptionConfiguration().setReencryptionBatchSize(pageScanBatchSize).setReencryptionRateLimit(pageScanRate);
DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(1024 * 1024 * 1024L).setPersistenceEnabled(true)).setPageSize(4 * 1024).setWalSegmentSize(10 * 1024 * 1024).setWalSegments(4).setMaxWalArchiveSize(100 * 1024 * 1024L).setCheckpointFrequency(TimeUnit.SECONDS.toMillis(checkpointFreq)).setWalMode(LOG_ONLY).setFileIOFactory(new FailingFileIOFactory(new RandomAccessFileIOFactory(), failFileIO)).setEncryptionConfiguration(encCfg);
cfg.setDataStorageConfiguration(memCfg);
return cfg;
}
use of org.apache.ignite.configuration.EncryptionConfiguration in project ignite by apache.
the class GridCommandHandlerAbstractTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
if (atomicConfiguration != null)
cfg.setAtomicConfiguration(atomicConfiguration);
cfg.setCommunicationSpi(new TestRecordingCommunicationSpi());
cfg.setConnectorConfiguration(new ConnectorConfiguration().setSslEnabled(sslEnabled()));
if (sslEnabled())
cfg.setSslContextFactory(GridTestUtils.sslFactory());
DataStorageConfiguration dsCfg = new DataStorageConfiguration().setWalMode(WALMode.LOG_ONLY).setCheckpointFrequency(checkpointFreq).setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(50L * 1024 * 1024).setPersistenceEnabled(persistent));
if (dataRegionConfiguration != null)
dsCfg.setDataRegionConfigurations(dataRegionConfiguration);
cfg.setDataStorageConfiguration(dsCfg);
cfg.setConsistentId(igniteInstanceName);
cfg.setClientMode(igniteInstanceName.startsWith(CLIENT_NODE_NAME_PREFIX));
cfg.setDaemon(igniteInstanceName.startsWith(DAEMON_NODE_NAME_PREFIX));
// Extend if necessary.
cfg.setIncludeEventTypes(EVT_CONSISTENCY_VIOLATION);
if (encryptionEnabled) {
KeystoreEncryptionSpi encSpi = new KeystoreEncryptionSpi();
encSpi.setKeyStorePath(KEYSTORE_PATH);
encSpi.setKeyStorePassword(KEYSTORE_PASSWORD.toCharArray());
cfg.setEncryptionSpi(encSpi);
EncryptionConfiguration encCfg = new EncryptionConfiguration();
encCfg.setReencryptionRateLimit(reencryptSpeed);
encCfg.setReencryptionBatchSize(reencryptBatchSize);
dsCfg.setEncryptionConfiguration(encCfg);
}
return cfg;
}
Aggregations