use of org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration in project ignite by apache.
the class PlatformDotNetConfigurationClosure method apply0.
/** {@inheritDoc} */
@SuppressWarnings("deprecation")
@Override
protected void apply0(IgniteConfiguration igniteCfg) {
// 3. Validate and copy Interop configuration setting environment pointer along the way.
PlatformConfiguration interopCfg = igniteCfg.getPlatformConfiguration();
if (interopCfg != null && !(interopCfg instanceof PlatformDotNetConfiguration))
throw new IgniteException("Illegal platform configuration (must be of type " + PlatformDotNetConfiguration.class.getName() + "): " + interopCfg.getClass().getName());
PlatformDotNetConfiguration dotNetCfg = interopCfg != null ? (PlatformDotNetConfiguration) interopCfg : null;
if (dotNetCfg == null)
dotNetCfg = new PlatformDotNetConfiguration();
memMgr = new PlatformMemoryManagerImpl(gate, 1024);
PlatformLogger userLogger = null;
if (igniteCfg.getGridLogger() instanceof PlatformLogger) {
userLogger = (PlatformLogger) igniteCfg.getGridLogger();
userLogger.setGateway(gate);
}
PlatformDotNetConfigurationEx dotNetCfg0 = new PlatformDotNetConfigurationEx(dotNetCfg, gate, memMgr, userLogger);
igniteCfg.setPlatformConfiguration(dotNetCfg0);
// Set Ignite home so that marshaller context works.
String ggHome = igniteCfg.getIgniteHome();
if (ggHome != null)
U.setIgniteHome(ggHome);
// 4. Callback to .Net.
prepare(igniteCfg, dotNetCfg0);
// Make sure binary config is right.
setBinaryConfiguration(igniteCfg, dotNetCfg0);
}
Aggregations