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 Constructor Description LazyServiceConfiguration()Default constructor.LazyServiceConfiguration(ServiceConfiguration cfg, byte[] srvcBytes, byte[] nodeFilterBytes, byte[] interceptorsBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)booleanequalsIgnoreNodeFilter(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.ServicegetService()Gets service instance.byte[]interceptorBytes()byte[]nodeFilterBytes()byte[]serviceBytes()StringserviceClassName()ServiceConfigurationsetNodeFilter(IgnitePredicate<ClusterNode> nodeFilter)Sets node filter used to filter nodes on which the service will be deployed.StringtoString()-
Methods inherited from class org.apache.ignite.services.ServiceConfiguration
getAffinityKey, getCacheName, getMaxPerNodeCount, getName, getTotalCount, hashCode, isStatisticsEnabled, setAffinityKey, setCacheName, setInterceptors, setMaxPerNodeCount, setName, setService, setStatisticsEnabled, setTotalCount
-
-
-
-
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:
getServicein classServiceConfiguration- 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:
setNodeFilterin classServiceConfiguration- Parameters:
nodeFilter- Node filter used to filter nodes on which the service will be deployed, possiblynull.- Returns:
thisfor 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:
getNodeFilterin classServiceConfiguration- 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:
getInterceptorsin classServiceConfiguration- Returns:
- Service call interceptors.
-
interceptorBytes
public byte[] interceptorBytes()
- Returns:
- Interceptors bytes.
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classServiceConfiguration
-
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:
equalsIgnoreNodeFilterin classServiceConfiguration- Parameters:
o- Other configuration.- Returns:
Trueif configurations are equal,falseotherwise.
-
toString
public String toString()
- Overrides:
toStringin classServiceConfiguration
-
-