org.apache.ignite.internal.util.lang

## Class GridPeerDeployAwareAdapter

- java.lang.Object
- - org.apache.ignite.internal.util.lang.GridPeerDeployAwareAdapter

All Implemented Interfaces:
  Serializable, GridPeerDeployAware

    public class GridPeerDeployAwareAdapter
    extends Object
    implements GridPeerDeployAware

Adapter for common interfaces in closures, reducers and predicates.

See Also:
  Serialized Form

### Field Summary

Fields
`protected GridPeerDeployAware` `pda` Peer deploy aware class.

### Constructor Summary

Constructors
Constructor and Description
`GridPeerDeployAwareAdapter()`

### Method Summary

All Methods Instance Methods Concrete Methods
`ClassLoader` `classLoader()` Gets class loader for the class.
`Class<?>` `deployClass()` Gets top level user class being deployed.
`void` `peerDeployLike(Object obj)` Sets object that from which peer deployment information will be copied, i.e. this lambda object will be peer deployed using the same class loader as given object.

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

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

### Field Detail

#### pda

    protected transient GridPeerDeployAware pda

Peer deploy aware class.

### Constructor Detail

#### GridPeerDeployAwareAdapter

    public GridPeerDeployAwareAdapter()

### Method Detail

#### peerDeployLike

    public void peerDeployLike(Object obj)

Sets object that from which peer deployment information will be copied, i.e. this lambda object will be peer deployed using the same class loader as given object.

Note that in most cases Ignite attempts to automatically call this method whenever lambda classes like closures and predicates are created that wrap user object (the peer deploy information in such cases will be copied from the user object).

In general, if user gets class not found exception during peer loading it is very likely that peer deploy information was lost during wrapping of one object into another.

Parameters:
  `obj` - Peer deploy aware.

#### deployClass

    public Class<?> deployClass()

Gets top level user class being deployed.

Specified by:
  `deployClass` in interface `GridPeerDeployAware`
Returns:
  Top level user deployed class.

#### classLoader

    public ClassLoader classLoader()

Gets class loader for the class. This class loader must be able to load the class returned from `GridPeerDeployAware.deployClass()` as well as all of its dependencies.

Note that in most cases the class loader returned from this method and the class loader for the class returned from `GridPeerDeployAware.deployClass()` method will be the same. If they are not the same, it is required that the class loader returned from this method still has to be able to load the deploy class and all its dependencies.

Specified by:
  `classLoader` in interface `GridPeerDeployAware`
Returns:
  Class loader for the class.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020