org.apache.ignite.spi.systemview

## Class SqlViewExporterSpi

- java.lang.Object
- - org.apache.ignite.spi.IgniteSpiAdapter
  - - org.apache.ignite.spi.systemview.SqlViewExporterSpi

- All Implemented Interfaces:
    IgniteSpi, SystemViewExporterSpi

      public class SqlViewExporterSpi
      extends IgniteSpiAdapter
      implements SystemViewExporterSpi

  This SPI implementation exports metrics as SQL views. Note, instance of this class created with reflection.
  See Also:
    `IgnitionEx.SYSTEM_VIEW_SQL_SPI`

- - ### Field Summary

    - ### Fields inherited from class org.apache.ignite.spi.IgniteSpiAdapter

      `ignite, igniteInstanceName, log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SqlViewExporterSpi()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `onContextInitialized0(IgniteSpiContext spiCtx)` Method to be called in the end of onContextInitialized method.
    `void` | `setExportFilter(Predicate<SystemView<?>> filter)` Sets export filter.
    `void` | `setSystemViewRegistry(ReadOnlySystemViewRegistry mlreg)` Sets system view registry that SPI should export.
    `void` | `spiStart(@Nullable String igniteInstanceName)` This method is called to start SPI.
    `void` | `spiStop()` This method is called to stop SPI.

    - ### Methods inherited from class org.apache.ignite.spi.IgniteSpiAdapter

      `addTimeoutObject, assertParameter, checkConfigurationConsistency0, clientFailureDetectionTimeout, configInfo, createSpiAttributeName, failureDetectionTimeout, failureDetectionTimeoutEnabled, failureDetectionTimeoutEnabled, getConsistentAttributeNames, getExceptionRegistry, getLocalNode, getName, getNodeAttributes, getSpiContext, ignite, initFailureDetectionTimeout, injectables, injectResources, isNodeStopping, onBeforeStart, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextDestroyed0, onContextInitialized, registerMBean, removeTimeoutObject, setName, started, startInfo, startStopwatch, stopInfo, unregisterMBean`

    - ### 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.spi.IgniteSpi

      `getName, getNodeAttributes, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextInitialized`

- - ### Constructor Detail

    - #### SqlViewExporterSpi

          public SqlViewExporterSpi()

  - ### Method Detail

    - #### onContextInitialized0

          protected void onContextInitialized0(IgniteSpiContext spiCtx)
                                        throws IgniteSpiException

      Method to be called in the end of onContextInitialized method.
      Overrides:
        `onContextInitialized0` in class `IgniteSpiAdapter`
      Parameters:
        `spiCtx` - SPI context.
      Throws:
        `IgniteSpiException` - In case of errors.

    - #### spiStart

          public void spiStart(@Nullable
                               @Nullable String igniteInstanceName)
                        throws IgniteSpiException

      This method is called to start SPI. After this method returns successfully kernel assumes that SPI is fully operational.
      Specified by:
        `spiStart` in interface `IgniteSpi`
      Parameters:
        `igniteInstanceName` - Name of Ignite instance this SPI is being started for (`null` for default Ignite instance).
      Throws:
        `IgniteSpiException` - Throws in case of any error during SPI start.

    - #### spiStop

          public void spiStop()
                       throws IgniteSpiException

      This method is called to stop SPI. After this method returns kernel assumes that this SPI is finished and all resources acquired by it are released.

      Note that this method can be called at any point including during recovery of failed start. It should make no assumptions on what state SPI will be in when this method is called.

      Specified by:
        `spiStop` in interface `IgniteSpi`
      Throws:
        `IgniteSpiException` - Thrown in case of any error during SPI stop.

    - #### setSystemViewRegistry

          public void setSystemViewRegistry(ReadOnlySystemViewRegistry mlreg)

      Sets system view registry that SPI should export. This method called before `IgniteSpi.spiStart(String)`.
      Specified by:
        `setSystemViewRegistry` in interface `SystemViewExporterSpi`
      Parameters:
        `mlreg` - System view registry.

    - #### setExportFilter

          public void setExportFilter(Predicate<SystemView<?>> filter)

      Sets export filter. System view that not satisfy `filter` shouldn't be exported.
      Specified by:
        `setExportFilter` in interface `SystemViewExporterSpi`
      Parameters:
        `filter` - Filter.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020