org.apache.ignite.ml.util.plugin

## Class MLPluginProvider

- java.lang.Object
- - org.apache.ignite.ml.util.plugin.MLPluginProvider

- All Implemented Interfaces:
    PluginProvider<MLPluginConfiguration>

      public class MLPluginProvider
      extends Object
      implements PluginProvider<MLPluginConfiguration>

  Machine learning inference plugin provider.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MLPluginProvider()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `copyright()`
    `CachePluginProvider` | `createCacheProvider(CachePluginContext ctx)` Creates cache plugin provider.
    `<T> T` | `createComponent(PluginContext ctx, Class<T> cls)` Creates Ignite component.
    `void` | `initExtensions(PluginContext ctx, ExtensionRegistry registry)` Registers extensions.
    `String` | `name()`
    `void` | `onIgniteStart()` Callback that notifies that Ignite has successfully started, including all internal components.
    `void` | `onIgniteStop(boolean cancel)` Callback to notify that Ignite is about to stop.
    `<T extends IgnitePlugin> T` | `plugin()`
    `@Nullable Serializable` | `provideDiscoveryData(UUID nodeId)` Gets plugin discovery data object that will be sent to the new node during discovery process.
    `void` | `receiveDiscoveryData(UUID nodeId, Serializable data)` Receives plugin discovery data object from remote nodes (called on new node during discovery process).
    `void` | `start(PluginContext ctx)` Starts grid component.
    `void` | `stop(boolean cancel)` Stops grid component.
    `void` | `validateNewNode(ClusterNode node)` Validates that new node can join grid topology, this method is called on coordinator node before new node joins topology.
    `String` | `version()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.ignite.plugin.PluginProvider

      `validateNewNode`

- - ### Constructor Detail

    - #### MLPluginProvider

          public MLPluginProvider()

  - ### Method Detail

    - #### name

          public String name()

      Specified by:
        `name` in interface `PluginProvider<MLPluginConfiguration>`
      Returns:
        Plugin name.

    - #### version

          public String version()

      Specified by:
        `version` in interface `PluginProvider<MLPluginConfiguration>`
      Returns:
        Plugin version.

    - #### copyright

          public String copyright()

      Specified by:
        `copyright` in interface `PluginProvider<MLPluginConfiguration>`
      Returns:
        Copyright.

    - #### plugin

          public <T extends IgnitePlugin> T plugin()

      Specified by:
        `plugin` in interface `PluginProvider<MLPluginConfiguration>`
      Returns:
        Plugin API.

    - #### initExtensions

          public void initExtensions(PluginContext ctx,
                                     ExtensionRegistry registry)

      Registers extensions.
      Specified by:
        `initExtensions` in interface `PluginProvider<MLPluginConfiguration>`
      Parameters:
        `ctx` - Plugin context.
        `registry` - Extension registry.

    - #### createComponent

          @Nullable
          public <T> T createComponent(PluginContext ctx,
                                                 Class<T> cls)

      Creates Ignite component.
      Specified by:
        `createComponent` in interface `PluginProvider<MLPluginConfiguration>`
      Parameters:
        `ctx` - Plugin context.
        `cls` - Ignite component class.
      Returns:
        Ignite component or `null` if component is not supported.

    - #### createCacheProvider

          public CachePluginProvider createCacheProvider(CachePluginContext ctx)

      Creates cache plugin provider.
      Specified by:
        `createCacheProvider` in interface `PluginProvider<MLPluginConfiguration>`
      Parameters:
        `ctx` - Plugin context.
      Returns:
        Cache plugin provider class.

    - #### start

          public void start(PluginContext ctx)

      Starts grid component.
      Specified by:
        `start` in interface `PluginProvider<MLPluginConfiguration>`
      Parameters:
        `ctx` - Plugin context.

    - #### stop

          public void stop(boolean cancel)

      Stops grid component.
      Specified by:
        `stop` in interface `PluginProvider<MLPluginConfiguration>`
      Parameters:
        `cancel` - If `true`, then all ongoing tasks or jobs for relevant components need to be cancelled.

    - #### onIgniteStart

          public void onIgniteStart()

      Callback that notifies that Ignite has successfully started, including all internal components.
      Specified by:
        `onIgniteStart` in interface `PluginProvider<MLPluginConfiguration>`

    - #### onIgniteStop

          public void onIgniteStop(boolean cancel)

      Callback to notify that Ignite is about to stop.
      Specified by:
        `onIgniteStop` in interface `PluginProvider<MLPluginConfiguration>`
      Parameters:
        `cancel` - Flag indicating whether jobs should be canceled.

    - #### provideDiscoveryData

          @Nullable
          public @Nullable Serializable provideDiscoveryData(UUID nodeId)

      Gets plugin discovery data object that will be sent to the new node during discovery process.
      Specified by:
        `provideDiscoveryData` in interface `PluginProvider<MLPluginConfiguration>`
      Parameters:
        `nodeId` - ID of new node that joins topology.
      Returns:
        Discovery data object or `null` if there is nothing to send for this component.

    - #### receiveDiscoveryData

          public void receiveDiscoveryData(UUID nodeId,
                                           Serializable data)

      Receives plugin discovery data object from remote nodes (called on new node during discovery process). This data is provided by `PluginProvider.provideDiscoveryData(UUID)` method on the other nodes.
      Specified by:
        `receiveDiscoveryData` in interface `PluginProvider<MLPluginConfiguration>`
      Parameters:
        `nodeId` - Remote node ID.
        `data` - Discovery data object or `null` if nothing was sent for this component.

    - #### validateNewNode

          public void validateNewNode(ClusterNode node)
                               throws PluginValidationException

      Validates that new node can join grid topology, this method is called on coordinator node before new node joins topology.
      Specified by:
        `validateNewNode` in interface `PluginProvider<MLPluginConfiguration>`
      Parameters:
        `node` - Joining node.
      Throws:
        `PluginValidationException` - If cluster-wide plugin validation failed.

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021