org.apache.ignite.internal.managers.deployment

## Class GridDeploymentPerVersionStore

- java.lang.Object
- - org.apache.ignite.internal.managers.deployment.GridDeploymentPerVersionStore

All Implemented Interfaces:
  GridDeploymentStore

    public class GridDeploymentPerVersionStore
    extends Object

Deployment storage for `DeploymentMode.SHARED` and `DeploymentMode.CONTINUOUS` modes.

### Field Summary

Fields
`protected org.apache.ignite.internal.managers.deployment.GridDeploymentCommunication` `comm` Deployment communication.
`protected GridKernalContext` `ctx` Kernal context.
`protected IgniteLogger` `log` Logger.
`protected DeploymentSpi` `spi` Deployment SPI.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addParticipants(Map<UUID,IgniteUuid> allParticipants, Map<UUID,IgniteUuid> addedParticipants)` Adds participants to all deployments.
`protected void` `clearSerializationCaches()` Clears serialization caches to avoid PermGen memory leaks.
`GridDeployment` `explicitDeploy(Class<?> cls, ClassLoader clsLdr)` Explicitly deploys class.
`void` `explicitUndeploy(UUID nodeId, String rsrcName)`
`GridDeployment` `getDeployment(org.apache.ignite.internal.managers.deployment.GridDeploymentMetadata meta)`
`GridDeployment` `getDeployment(IgniteUuid ldrId)` Gets class loader based on ID.
`Collection<GridDeployment>` `getDeployments()`
`protected boolean` `isTask(Class<?> cls)`
`void` `onKernalStart()` Kernal started callback.
`void` `onKernalStop()` Kernel stopping callback.
`void` `start()` Starts store.
`protected String` `startInfo()`
`void` `stop()` Stops store.
`protected String` `stopInfo()`
`String` `toString()`
`protected String` `userVersion(ClassLoader ldr)`

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

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

### Field Detail

#### log

    protected final IgniteLogger log

Logger.

#### spi

    protected final DeploymentSpi spi

Deployment SPI.

#### ctx

    protected final GridKernalContext ctx

Kernal context.

#### comm

    protected final org.apache.ignite.internal.managers.deployment.GridDeploymentCommunication comm

Deployment communication.

### Method Detail

#### start

    public void start()
               throws IgniteCheckedException

Starts store.

Throws:
  `IgniteCheckedException` - If start failed.

#### stop

    public void stop()

Stops store.

#### onKernalStart

    public void onKernalStart()
                       throws IgniteCheckedException

Kernal started callback.

Specified by:
  `onKernalStart` in interface `GridDeploymentStore`
Throws:
  `IgniteCheckedException` - If callback execution failed.

#### onKernalStop

    public void onKernalStop()

Kernel stopping callback.

Specified by:
  `onKernalStop` in interface `GridDeploymentStore`

#### getDeployments

    public Collection<GridDeployment> getDeployments()

Returns:
  All current deployments.

#### getDeployment

    public GridDeployment getDeployment(IgniteUuid ldrId)

Gets class loader based on ID.

Parameters:
  `ldrId` - Class loader ID.
Returns:
  Class loader of `null` if not found.

#### getDeployment

    @Nullable
    public GridDeployment getDeployment(org.apache.ignite.internal.managers.deployment.GridDeploymentMetadata meta)

Parameters:
  `meta` - Deployment metadata.
Returns:
  Deployment.

#### addParticipants

    public void addParticipants(Map<UUID,IgniteUuid> allParticipants,
                                Map<UUID,IgniteUuid> addedParticipants)

Adds participants to all deployments.

Parameters:
  `allParticipants` - All participants to determine which deployments to add to.
  `addedParticipants` - Participants to add.

#### explicitUndeploy

    public void explicitUndeploy(UUID nodeId,
                                 String rsrcName)

Parameters:
  `nodeId` - Optional ID of node that initiated request.
  `rsrcName` - Undeploys all deployments that have given

#### toString

    public String toString()

#### startInfo

    protected final String startInfo()

Returns:
  Startup log message.

#### stopInfo

    protected final String stopInfo()

Returns:
  Stop log message.

#### explicitDeploy

    @Nullable
    public GridDeployment explicitDeploy(Class<?> cls,
                                                   ClassLoader clsLdr)
                                            throws IgniteCheckedException

Explicitly deploys class.

Specified by:
  `explicitDeploy` in interface `GridDeploymentStore`
Parameters:
  `cls` - Class to explicitly deploy.
  `clsLdr` - Class loader.
Returns:
  Grid deployment.
Throws:
  `IgniteCheckedException` - Id deployment failed.

#### userVersion

    protected final String userVersion(ClassLoader ldr)

Parameters:
  `ldr` - Class loader.
Returns:
  User version.

#### isTask

    protected final boolean isTask(Class<?> cls)

Parameters:
  `cls` - Class to check.
Returns:
  `True` if class is task class.

#### clearSerializationCaches

    protected final void clearSerializationCaches()

Clears serialization caches to avoid PermGen memory leaks. This method should be called on each undeployment.

For more information: http://www.szegedi.org/articles/memleak3.html.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.5.0
Release Date | : May 23 2018