Class GridPeerDeployAwareAdapter

    • 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.