org.apache.ignite.internal

## Class GridPluginContext

- java.lang.Object
- - org.apache.ignite.internal.GridPluginContext

All Implemented Interfaces:
  PluginContext

    public class GridPluginContext
    extends Object
    implements PluginContext

### Constructor Summary

Constructors
Constructor and Description
`GridPluginContext(GridKernalContext ctx, IgniteConfiguration igniteCfg)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `deregisterPort(int port, IgnitePortProtocol proto, Class<?> cls)` Deregisters closed port.
`void` `deregisterPorts(Class<?> cls)` Deregisters all closed ports.
`Ignite` `grid()`
`IgniteConfiguration` `igniteConfiguration()`
`ClusterNode` `localNode()` Gets local grid node.
`IgniteLogger` `log(Class<?> cls)` Gets logger for given class.
`MarshallerContext` `marshallerContext()`
`Collection<ClusterNode>` `nodes()` Gets a collection of all grid nodes.
`void` `registerPort(int port, IgnitePortProtocol proto, Class<?> cls)` Registers open port.

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

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

### Constructor Detail

#### GridPluginContext

    public GridPluginContext(GridKernalContext ctx,
                             IgniteConfiguration igniteCfg)

Parameters:
  `ctx` - Kernal context.
  `igniteCfg` - Ignite configuration.

### Method Detail

#### igniteConfiguration

    public IgniteConfiguration igniteConfiguration()

Specified by:
  `igniteConfiguration` in interface `PluginContext`
Returns:
  Ignite configuration.

#### grid

    public Ignite grid()

Specified by:
  `grid` in interface `PluginContext`
Returns:
  Grid.

#### marshallerContext

    public MarshallerContext marshallerContext()

Specified by:
  `marshallerContext` in interface `PluginContext`
Returns:
  Marshaller context.

#### nodes

    public Collection<ClusterNode> nodes()

Gets a collection of all grid nodes. Remote nodes are discovered via underlying `DiscoverySpi` implementation used.

Specified by:
  `nodes` in interface `PluginContext`
Returns:
  Collection of grid nodes.
See Also:
  `PluginContext.localNode()`, `DiscoverySpi`

#### localNode

    public ClusterNode localNode()

Gets local grid node. Instance of local node is provided by underlying `DiscoverySpi` implementation used.

Specified by:
  `localNode` in interface `PluginContext`
Returns:
  Local grid node.
See Also:
  `DiscoverySpi`

#### log

    public IgniteLogger log(Class<?> cls)

Gets logger for given class.

Specified by:
  `log` in interface `PluginContext`
Parameters:
  `cls` - Class to get logger for.
Returns:
  Logger.

#### registerPort

    public void registerPort(int port,
                             IgnitePortProtocol proto,
                             Class<?> cls)

Registers open port.

Specified by:
  `registerPort` in interface `PluginContext`
Parameters:
  `port` - Port.
  `proto` - Protocol.
  `cls` - Class.

#### deregisterPort

    public void deregisterPort(int port,
                               IgnitePortProtocol proto,
                               Class<?> cls)

Deregisters closed port.

Specified by:
  `deregisterPort` in interface `PluginContext`
Parameters:
  `port` - Port.
  `proto` - Protocol.
  `cls` - Class.

#### deregisterPorts

    public void deregisterPorts(Class<?> cls)

Deregisters all closed ports.

Specified by:
  `deregisterPorts` in interface `PluginContext`
Parameters:
  `cls` - Class.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023