use of org.apache.ignite.internal.logger.platform.PlatformLogger in project ignite by apache.
the class PlatformDotNetConfigurationClosure method apply0.
/**
* {@inheritDoc}
*/
@SuppressWarnings("deprecation")
@Override
protected void apply0(IgniteConfiguration igniteCfg) {
// 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 logger = null;
if (useLogger) {
logger = new PlatformLogger();
logger.setGateway(gate);
igniteCfg.setGridLogger(logger);
}
PlatformDotNetConfigurationEx dotNetCfg0 = new PlatformDotNetConfigurationEx(dotNetCfg, gate, memMgr, logger);
igniteCfg.setPlatformConfiguration(dotNetCfg0);
// Set Ignite home so that marshaller context works.
String ggHome = igniteCfg.getIgniteHome();
if (ggHome != null)
U.setIgniteHome(ggHome);
// Callback to .Net.
prepare(igniteCfg, dotNetCfg0);
// Make sure binary config is right.
setBinaryConfiguration(igniteCfg, dotNetCfg0);
}
Aggregations