Search in sources :

Example 1 with PlatformLogger

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);
}
Also used : PlatformConfiguration(org.apache.ignite.configuration.PlatformConfiguration) PlatformDotNetConfiguration(org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration) IgniteException(org.apache.ignite.IgniteException) PlatformMemoryManagerImpl(org.apache.ignite.internal.processors.platform.memory.PlatformMemoryManagerImpl) PlatformLogger(org.apache.ignite.internal.logger.platform.PlatformLogger)

Aggregations

IgniteException (org.apache.ignite.IgniteException)1 PlatformConfiguration (org.apache.ignite.configuration.PlatformConfiguration)1 PlatformLogger (org.apache.ignite.internal.logger.platform.PlatformLogger)1 PlatformMemoryManagerImpl (org.apache.ignite.internal.processors.platform.memory.PlatformMemoryManagerImpl)1 PlatformDotNetConfiguration (org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration)1