use of org.apache.ignite.spi.encryption.noop.NoopEncryptionSpi in project ignite by apache.
the class BPlusTreeReuseListPageMemoryImplTest method createPageMemory.
/**
* {@inheritDoc}
*/
@Override
protected PageMemory createPageMemory() throws Exception {
long[] sizes = new long[CPUS + 1];
for (int i = 0; i < sizes.length; i++) sizes[i] = 1024 * MB / CPUS;
sizes[CPUS] = 10 * MB;
DirectMemoryProvider provider = new UnsafeMemoryProvider(log);
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setEncryptionSpi(new NoopEncryptionSpi());
cfg.setMetricExporterSpi(new NoopMetricExporterSpi());
cfg.setSystemViewExporterSpi(new JmxSystemViewExporterSpi());
cfg.setDataStorageConfiguration(new DataStorageConfiguration());
GridTestKernalContext cctx = new GridTestKernalContext(log, cfg);
cctx.add(new IgnitePluginProcessor(cctx, cfg, Collections.emptyList()));
cctx.add(new GridInternalSubscriptionProcessor(cctx));
cctx.add(new PerformanceStatisticsProcessor(cctx));
cctx.add(new GridEncryptionManager(cctx));
cctx.add(new GridMetricManager(cctx));
cctx.add(new GridSystemViewManager(cctx));
GridCacheSharedContext<Object, Object> sharedCtx = new GridCacheSharedContext<>(cctx, null, null, null, new NoOpPageStoreManager(), new NoOpWALManager(), null, new IgniteCacheDatabaseSharedManager(), null, null, null, null, null, null, null, null, null, null, null, null, null);
IgniteOutClosure<CheckpointProgress> clo = new IgniteOutClosure<CheckpointProgress>() {
@Override
public CheckpointProgress apply() {
return Mockito.mock(CheckpointProgressImpl.class);
}
};
PageMemory mem = new PageMemoryImpl(provider, sizes, sharedCtx, sharedCtx.pageStore(), PAGE_SIZE, (fullPageId, byteBuf, tag) -> {
assert false : "No page replacement (rotation with disk) should happen during the test";
}, new GridInClosure3X<Long, FullPageId, PageMemoryEx>() {
@Override
public void applyx(Long page, FullPageId fullPageId, PageMemoryEx pageMem) {
}
}, () -> true, new DataRegionMetricsImpl(new DataRegionConfiguration(), cctx), PageMemoryImpl.ThrottlingPolicy.DISABLED, clo);
mem.start();
return mem;
}
use of org.apache.ignite.spi.encryption.noop.NoopEncryptionSpi in project ignite by apache.
the class IgnitePageMemReplaceDelayedWriteUnitTest method getConfiguration.
/**
* @param overallSize default region size in bytes
* @return configuration for test.
*/
@NotNull
private IgniteConfiguration getConfiguration(long overallSize) {
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setEncryptionSpi(new NoopEncryptionSpi());
cfg.setMetricExporterSpi(new NoopMetricExporterSpi());
cfg.setEventStorageSpi(new NoopEventStorageSpi());
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true).setMaxSize(overallSize)));
return cfg;
}
use of org.apache.ignite.spi.encryption.noop.NoopEncryptionSpi in project ignite by apache.
the class PlatformConfigurationUtils method writeEncryptionConfiguration.
/**
* Writes encryption configuration.
*
* @param w Writer.
* @param enc Encryption Spi.
*/
private static void writeEncryptionConfiguration(BinaryRawWriter w, EncryptionSpi enc) {
if (enc instanceof NoopEncryptionSpi) {
w.writeBoolean(false);
return;
}
KeystoreEncryptionSpi keystoreEnc = (KeystoreEncryptionSpi) enc;
w.writeBoolean(true);
w.writeString(keystoreEnc.getMasterKeyName());
w.writeInt(keystoreEnc.getKeySize());
w.writeString(keystoreEnc.getKeyStorePath());
w.writeCharArray(keystoreEnc.getKeyStorePwd());
}
Aggregations