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 Modifier and Type Field Description protected GridPeerDeployAwarepdaPeer deploy aware class.
-
Constructor Summary
Constructors Constructor Description GridPeerDeployAwareAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassLoaderclassLoader()Gets class loader for the class.Class<?>deployClass()Gets top level user class being deployed.voidpeerDeployLike(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.
-
-
-
Field Detail
-
pda
protected transient GridPeerDeployAware pda
Peer deploy aware class.
-
-
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:
deployClassin interfaceGridPeerDeployAware- 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 fromGridPeerDeployAware.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:
classLoaderin interfaceGridPeerDeployAware- Returns:
- Class loader for the class.
-
-