Package org.apache.ignite.internal.processors.service

## Class LazyServiceConfiguration

- java.lang.Object
- - org.apache.ignite.services.ServiceConfiguration
  - - org.apache.ignite.internal.processors.service.LazyServiceConfiguration

All Implemented Interfaces:
  `Serializable`

    public class LazyServiceConfiguration
    extends ServiceConfiguration

Lazy service configuration.

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.services.ServiceConfiguration

`affKey, cacheName, isStatisticsEnabled, maxPerNodeCnt, name, totalCnt`

### Constructor Summary

Constructors
`LazyServiceConfiguration()` Default constructor.
`LazyServiceConfiguration​(ServiceConfiguration cfg, byte[] srvcBytes, byte[] nodeFilterBytes, byte[] interceptorsBytes)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals​(Object o)`
`boolean` `equalsIgnoreNodeFilter​(Object o)` Checks if configurations are equal ignoring the node filter.
`ServiceCallInterceptor[]` `getInterceptors()` Gets service call interceptors.
`IgnitePredicate<ClusterNode>` `getNodeFilter()` Gets node filter used to filter nodes on which the service will be deployed.
`Service` `getService()` Gets service instance.
`byte[]` `interceptorBytes()`
`byte[]` `nodeFilterBytes()`
`byte[]` `serviceBytes()`
`String` `serviceClassName()`
`ServiceConfiguration` `setNodeFilter​(IgnitePredicate<ClusterNode> nodeFilter)` Sets node filter used to filter nodes on which the service will be deployed.
`String` `toString()`

### Methods inherited from class org.apache.ignite.services.ServiceConfiguration

`getAffinityKey, getCacheName, getMaxPerNodeCount, getName, getTotalCount, hashCode, isStatisticsEnabled, setAffinityKey, setCacheName, setInterceptors, setMaxPerNodeCount, setName, setService, setStatisticsEnabled, setTotalCount`

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

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

### 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`.

#### getInterceptors

    public ServiceCallInterceptor[] getInterceptors()

Gets service call interceptors.

Overrides:
  `getInterceptors` in class `ServiceConfiguration`
Returns:
  Service call interceptors.

#### interceptorBytes

    public byte[] interceptorBytes()

Returns:
  Interceptors bytes.

#### equals

    public boolean equals​(Object o)

Overrides:
  `equals` in class `ServiceConfiguration`

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

#### toString

    public String toString()

Overrides:
  `toString` in class `ServiceConfiguration`