Apache Ignite Documentation

GridGain Developer Hub - Apache Ignitetm

Welcome to the Apache Ignite developer hub run by GridGain. Here you'll find comprehensive guides and documentation to help you start working with Apache Ignite as quickly as possible, as well as support if you get stuck.

 

GridGain also provides Community Edition which is a distribution of Apache Ignite made available by GridGain. It is the fastest and easiest way to get started with Apache Ignite. The Community Edition is generally more stable than the Apache Ignite release available from the Apache Ignite website and may contain extra bug fixes and features that have not made it yet into the release on the Apache website.

 

Let's jump right in!

 

Documentation     Ask a Question     Download

 

Javadoc     Scaladoc     Examples

Plugins

Extending Ignite features with custom plugins.

Overview

Ignite plugin system allows third parties to extend the core functionality of Ignite. The best way to explain how Ignite plugins work is by looking at the life cycle of plugins.

Plugin Configuration

Every plugin starts with PluginConfiguration which has to be registered via the IgniteConfiguration.PluginConfigurations property, as shown below:

<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
	<!-- Plugin Configuration -->
  <property name="pluginConfigurations">
      <bean class="ignite.myexamples.MyPluginConfiguration"/>
  </property>

  <!--Other Ignite configurations -->
</bean>
IgniteConfiguration cfg = new IgniteConfiguration();

MyPluginConfiguration mpc = new MyPluginConfiguration();

cfg.setPluginConfigurations(mpc);

Ignition.start(cfg);

// Start Ignite node.
Ignite ignite = Ignition.start(cfg);

An implementation of PluginConfiguration might look like this:

public class MyPluginConfiguration implements PluginConfiguration {

    // Get and Set some plugin related properties
}

This class can be empty or contain some plugin specific properties, but it must exist.

Plugin Provider

PluginProvider<PluginConfiguration> implementation is the work-horse of the newly added plugin. It creates the plugin on node start-up. This interface has lots of methods that can be implemented or left empty based on user needs. However, name() and plugin() methods must not be null.

public class MyPluginProvider implements PluginProvider<MyPluginConfiguration> {
    @Override
    public String name() {
        return "IGNITE";
    }

    @Override
    public <T extends IgnitePlugin> T plugin() {
        return (T)new MyPlugin();
    }

    @Nullable
    @Override
    public <T> T createComponent(PluginContext pluginContext, Class<T> aClass) {
        return null;
    }

    // Other methods can be no-op
}

The three important methods of the PluginProvider<PluginConfiguration> interface are:

  • name() - name of the plugin.
  • plugin() - creates the plugin.
  • createComponent() - This method allows creating components already known by Ignite, such as - data snapshots, grid security, node discovery, and cross-platform support for 3rd party Java APIs.

Load Plugin Provider

Ignite plugins are loaded using the ServiceLoader class of JDK. For the plugin provider to be loaded, create a file with the name org.apache.ignite.plugin.PluginProvider in the META_INF folder,

and provide the name of the plugin provider implementation in that file.

Ignite.NET plugin

See https://apacheignite-net.readme.io/docs/plugins for Ignite.NET plugin documentation.

Plugins


Extending Ignite features with custom plugins.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.