org.apache.ignite.internal.managers.systemview

## Class GridSystemViewManager

- java.lang.Object
- - org.apache.ignite.internal.managers.GridManagerAdapter<SystemViewExporterSpi>
  - - org.apache.ignite.internal.managers.systemview.GridSystemViewManager

All Implemented Interfaces:
  Iterable<SystemView<?>>, GridComponent, GridManager, ReadOnlySystemViewRegistry

    public class GridSystemViewManager
    extends GridManagerAdapter<SystemViewExporterSpi>
    implements ReadOnlySystemViewRegistry

This manager should provide `ReadOnlySystemViewRegistry` for each configured `SystemViewExporterSpi`.

See Also:
  `SystemView`, `SystemViewAdapter`

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent

`GridComponent.DiscoveryDataExchangeType`

### Field Summary

Fields
`static String` `STREAM_POOL_QUEUE_VIEW` Name of the system view for a data streamer `StripedExecutor` queue view.
`static String` `STREAM_POOL_QUEUE_VIEW_DESC` Description of the system view for a data streamer `StripedExecutor` queue view.
`static String` `SYS_POOL_QUEUE_VIEW` Name of the system view for a system `StripedExecutor` queue view.
`static String` `SYS_POOL_QUEUE_VIEW_DESC` Description of the system view for a system `StripedExecutor` queue view.

### Fields inherited from class org.apache.ignite.internal.managers.GridManagerAdapter

`ctx, log`

### Constructor Summary

Constructors
Constructor and Description
`GridSystemViewManager(GridKernalContext ctx)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addSystemViewCreationListener(Consumer<SystemView<?>> lsnr)` Adds listener of view creation events.
`@NotNull Iterator<SystemView<?>>` `iterator()`
`<C,R,D> void` `registerInnerArrayView(String name, String desc, Class<R> rowCls, Collection<C> container, Function<C,D[]> dataExtractor, BiFunction<C,D,R> rowFunc)` Registers `SystemViewInnerCollectionsAdapter` view which exports container content.
`<C,R,D> void` `registerInnerCollectionView(String name, String desc, Class<R> rowCls, Collection<C> container, Function<C,Collection<D>> dataExtractor, BiFunction<C,D,R> rowFunc)` Registers `SystemViewInnerCollectionsAdapter` view which exports container content.
`void` `registerThreadPools(StripedExecutor stripedExecSvc, StripedExecutor dataStreamExecSvc)` Registers system views for a striped thread pools.
`<R,D> void` `registerView(String name, String desc, Class<R> rowCls, Collection<D> data, Function<D,R> rowFunc)` Registers `SystemViewAdapter` view which exports `Collection` content.
`<R,D> void` `registerView(String name, String desc, Class<R> rowCls, Supplier<Collection<D>> dataSupplier, Function<D,R> rowFunc)` Registers view which exports `Collection` content provided by specified `Supplier`.
`<R> void` `registerView(SystemView<R> sysView)` Registers `SystemView` instance.
`<R> void` `registerWalker(Class<R> rowClass, SystemViewRowAttributeWalker<R> walker)` Registers walker for specified class.
`void` `start()` Starts grid component.
`void` `stop(boolean cancel)` Stops grid component.
`<R> @Nullable SystemView<R>` `view(String name)`

### Methods inherited from class org.apache.ignite.internal.managers.GridManagerAdapter

`assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, enabled, getSpi, getSpi, getSpis, inject, onAfterSpiStart, onBeforeSpiStart, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStart0, onKernalStop, onKernalStop0, onReconnected, printMemoryStats, startInfo, startSpi, stopInfo, stopSpi, toString, validateNode, validateNode`

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

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

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Field Detail

#### SYS_POOL_QUEUE_VIEW

    public static final String SYS_POOL_QUEUE_VIEW

Name of the system view for a system `StripedExecutor` queue view.

#### SYS_POOL_QUEUE_VIEW_DESC

    public static final String SYS_POOL_QUEUE_VIEW_DESC

Description of the system view for a system `StripedExecutor` queue view.

See Also:
  Constant Field Values

#### STREAM_POOL_QUEUE_VIEW

    public static final String STREAM_POOL_QUEUE_VIEW

Name of the system view for a data streamer `StripedExecutor` queue view.

#### STREAM_POOL_QUEUE_VIEW_DESC

    public static final String STREAM_POOL_QUEUE_VIEW_DESC

Description of the system view for a data streamer `StripedExecutor` queue view.

See Also:
  Constant Field Values

### Constructor Detail

#### GridSystemViewManager

    public GridSystemViewManager(GridKernalContext ctx)

Parameters:
  `ctx` - Kernal context.

### Method Detail

#### start

    public void start()
               throws IgniteCheckedException

Starts grid component.

Specified by:
  `start` in interface `GridComponent`
Throws:
  `IgniteCheckedException` - Throws in case of any errors.

#### stop

    public void stop(boolean cancel)
              throws IgniteCheckedException

Stops grid component.

Specified by:
  `stop` in interface `GridComponent`
Parameters:
  `cancel` - If `true`, then all ongoing tasks or jobs for relevant components need to be cancelled.
Throws:
  `IgniteCheckedException` - Thrown in case of any errors.

#### registerThreadPools

    public void registerThreadPools(StripedExecutor stripedExecSvc,
                                    StripedExecutor dataStreamExecSvc)

Registers system views for a striped thread pools.

Parameters:
  `stripedExecSvc` - Striped executor.
  `dataStreamExecSvc` - Data streamer executor service.

#### registerView

    public <R> void registerView(SystemView<R> sysView)

Registers `SystemView` instance.

Type Parameters:
  `R` - Row type.
Parameters:
  `sysView` - System view.

#### registerView

    public <R,D> void registerView(String name,
                                   String desc,
                                   Class<R> rowCls,
                                   Collection<D> data,
                                   Function<D,R> rowFunc)

Registers `SystemViewAdapter` view which exports `Collection` content.

Type Parameters:
  `R` - View row type.
  `D` - Collection data type.
Parameters:
  `name` - Name.
  `desc` - Description.
  `rowCls` - Row class.
  `data` - Data.
  `rowFunc` - value to row function.

#### registerInnerCollectionView

    public <C,R,D> void registerInnerCollectionView(String name,
                                                    String desc,
                                                    Class<R> rowCls,
                                                    Collection<C> container,
                                                    Function<C,Collection<D>> dataExtractor,
                                                    BiFunction<C,D,R> rowFunc)

Registers `SystemViewInnerCollectionsAdapter` view which exports container content.

Type Parameters:
  `C` - Container entry type.
  `R` - View row type.
  `D` - Collection data type.
Parameters:
  `name` - Name.
  `desc` - Description.
  `rowCls` - Row class.
  `container` - Container of the data.
  `dataExtractor` - Data extractor function.
  `rowFunc` - Row function

#### registerInnerArrayView

    public <C,R,D> void registerInnerArrayView(String name,
                                               String desc,
                                               Class<R> rowCls,
                                               Collection<C> container,
                                               Function<C,D[]> dataExtractor,
                                               BiFunction<C,D,R> rowFunc)

Registers `SystemViewInnerCollectionsAdapter` view which exports container content.

Type Parameters:
  `C` - Container entry type.
  `R` - View row type.
  `D` - Collection data type.
Parameters:
  `name` - Name.
  `desc` - Description.
  `rowCls` - Row class.
  `container` - Container of the data.
  `dataExtractor` - Data extractor function.
  `rowFunc` - Row function

#### registerView

    public <R,D> void registerView(String name,
                                   String desc,
                                   Class<R> rowCls,
                                   Supplier<Collection<D>> dataSupplier,
                                   Function<D,R> rowFunc)

Registers view which exports `Collection` content provided by specified `Supplier`.

Type Parameters:
  `R` - View row type.
  `D` - Collection data type.
Parameters:
  `name` - Name.
  `desc` - Description.
  `rowCls` - Row class.
  `dataSupplier` - Data supplier.
  `rowFunc` - value to row function.

#### view

    @Nullable
    public <R> @Nullable SystemView<R> view(String name)

Parameters:
  `name` - Name of the view.
Returns:
  List.

#### registerWalker

    public <R> void registerWalker(Class<R> rowClass,
                                   SystemViewRowAttributeWalker<R> walker)

Registers walker for specified class.

Type Parameters:
  `R` - Row type.
Parameters:
  `rowClass` - Row class.
  `walker` - Walker.

#### addSystemViewCreationListener

    public void addSystemViewCreationListener(Consumer<SystemView<?>> lsnr)

Adds listener of view creation events.

Specified by:
  `addSystemViewCreationListener` in interface `ReadOnlySystemViewRegistry`
Parameters:
  `lsnr` - Listener.

#### iterator

    @NotNull
    public @NotNull Iterator<SystemView<?>> iterator()

Specified by:
  `iterator` in interface `Iterable<SystemView<?>>`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.0
Release Date | : February 27 2020