Class LazyServiceConfiguration

    • Constructor Detail

      • LazyServiceConfiguration

        public LazyServiceConfiguration()
        Default constructor.
      • LazyServiceConfiguration

        public LazyServiceConfiguration​(ServiceConfiguration cfg,
                                        byte[] srvcBytes,
                                        byte[] nodeFilterBytes,
                                        byte[] interceptorsBytes)
        Parameters:
        cfg - Configuration.
        srvcBytes - Marshalled service.
        interceptorsBytes - Marshalled interceptors.
    • Method Detail

      • nodeFilterBytes

        public byte[] nodeFilterBytes()
        Returns:
        Node filter bytes.
      • serviceBytes

        public byte[] serviceBytes()
        Returns:
        Service bytes.
      • serviceClassName

        public String serviceClassName()
        Returns:
        Service class name.
      • getService

        public Service getService()
        Gets service instance.

        This parameter is mandatory when deploying a service.

        Overrides:
        getService in class ServiceConfiguration
        Returns:
        Service instance.
      • setNodeFilter

        public ServiceConfiguration setNodeFilter​(IgnitePredicate<ClusterNode> nodeFilter)
        Sets node filter used to filter nodes on which the service will be deployed.

        This parameter is optional. If not provided service may be deployed on any or all nodes in the grid, based on configuration.

        Overrides:
        setNodeFilter in class ServiceConfiguration
        Parameters:
        nodeFilter - Node filter used to filter nodes on which the service will be deployed, possibly null.
        Returns:
        this for chaining.
      • getNodeFilter

        public IgnitePredicate<ClusterNode> getNodeFilter()
        Gets node filter used to filter nodes on which the service will be deployed.

        This parameter is optional. If not provided service may be deployed on any or all nodes in the grid, based on configuration.

        Overrides:
        getNodeFilter in class ServiceConfiguration
        Returns:
        Node filter used to filter nodes on which the service will be deployed, possibly null.
      • interceptorBytes

        public byte[] interceptorBytes()
        Returns:
        Interceptors bytes.
      • equalsIgnoreNodeFilter

        public boolean equalsIgnoreNodeFilter​(Object o)
        Checks if configurations are equal ignoring the node filter. Node filters control on which nodes the services are deployed and often can be ignored for equality checks.
        Overrides:
        equalsIgnoreNodeFilter in class ServiceConfiguration
        Parameters:
        o - Other configuration.
        Returns:
        True if configurations are equal, false otherwise.