org.apache.ignite.internal.processors.service

## Class GridServiceProcessor

- java.lang.Object
- - org.apache.ignite.internal.processors.GridProcessorAdapter
  - - org.apache.ignite.internal.processors.service.ServiceProcessorAdapter
    - - org.apache.ignite.internal.processors.service.GridServiceProcessor

All Implemented Interfaces:
  GridComponent, IgniteChangeGlobalStateSupport, GridProcessor

Deprecated.
Here is improved, but uncompatible implementation `IgniteServiceProcessor`, see IEP-17 for details.

    @Deprecated
    public class GridServiceProcessor
    extends ServiceProcessorAdapter
    implements IgniteChangeGlobalStateSupport

Grid service processor.

Obsolete implementation of service processor, based on replicated system cache.

NOTE: if you fix a bug in this class, please take a look in `IgniteServiceProcessor`, perhaps the class contains a similar block of code which also should be updated.

See Also:
  `IgniteServiceProcessor`

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent

`GridComponent.DiscoveryDataExchangeType`

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter

`ctx, diagnosticLog, log`

### Constructor Summary

Constructors
Constructor and Description
`GridServiceProcessor(GridKernalContext ctx)` Deprecated.

### Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods
`IgniteInternalFuture<?>` `cancel(String name)` Deprecated.
`IgniteInternalFuture<?>` `cancelAll()` Deprecated.
`IgniteInternalFuture<?>` `cancelAll(Collection<String> servicesNames)` Deprecated.
`IgniteInternalFuture<?>` `deployAll(ClusterGroup prj, Collection<ServiceConfiguration> cfgs)` Deprecated.
`IgniteInternalFuture<?>` `deployClusterSingleton(ClusterGroup prj, String name, Service srvc)` Deprecated.
`IgniteInternalFuture<?>` `deployKeyAffinitySingleton(String name, Service srvc, String cacheName, Object affKey)` Deprecated.
`IgniteInternalFuture<?>` `deployMultiple(ClusterGroup prj, String name, Service srvc, int totalCnt, int maxPerNodeCnt)` Deprecated.
`IgniteInternalFuture<?>` `deployNodeSingleton(ClusterGroup prj, String name, Service srvc)` Deprecated.
`void` `onActivate(GridKernalContext kctx)` Deprecated. Called when cluster performing activation.
`void` `onContinuousProcessorStarted(GridKernalContext ctx)` Deprecated.
`void` `onDeActivate(GridKernalContext kctx)` Deprecated. Called when cluster performing deactivation.
`void` `onDisconnected(IgniteFuture<?> reconnectFut)` Deprecated. Client disconnected callback.
`void` `onKernalStart(boolean active)` Deprecated. Callback that notifies that kernal has successfully started, including all managers and processors.
`void` `onKernalStop(boolean cancel)` Deprecated. Callback to notify that kernal is about to stop.
`void` `onUtilityCacheStarted()` Deprecated. Called right after utility cache is started and ready for the usage.
`<T> T` `service(String name)` Deprecated.
`ServiceContextImpl` `serviceContext(String name)` Deprecated.
`Collection<ServiceDescriptor>` `serviceDescriptors()` Deprecated.
`<T> T` `serviceProxy(ClusterGroup prj, String name, Class<? super T> srvcCls, boolean sticky, long timeout)` Deprecated.
`<T> Collection<T>` `services(String name)` Deprecated.
`Map<UUID,Integer>` `serviceTopology(String name, long timeout)` Deprecated.
`void` `start()` Deprecated. Starts grid component.
`void` `updateUtilityCache()` Deprecated.

### Methods inherited from class org.apache.ignite.internal.processors.service.ServiceProcessorAdapter

`onLocalJoin`

### Methods inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter

`assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onGridDataReceived, onJoiningNodeDataReceived, onReconnected, printMemoryStats, stop, toString, validateNode, validateNode`

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

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

### Constructor Detail

#### GridServiceProcessor

    public GridServiceProcessor(GridKernalContext ctx)

Deprecated.

Parameters:
  `ctx` - Kernal context.

### Method Detail

#### onContinuousProcessorStarted

    public void onContinuousProcessorStarted(GridKernalContext ctx)
                                      throws IgniteCheckedException

Deprecated.

Parameters:
  `ctx` - Context.
Throws:
  `IgniteCheckedException` - If failed.

#### start

    public void start()
               throws IgniteCheckedException

Deprecated.
Starts grid component.

Specified by:
  `start` in interface `GridComponent`
Overrides:
  `start` in class `GridProcessorAdapter`
Throws:
  `IgniteCheckedException` - Throws in case of any errors.

#### onKernalStart

    public void onKernalStart(boolean active)
                       throws IgniteCheckedException

Deprecated.
Callback that notifies that kernal has successfully started, including all managers and processors.

Specified by:
  `onKernalStart` in interface `GridComponent`
Overrides:
  `onKernalStart` in class `GridProcessorAdapter`
Parameters:
  `active` - Cluster active flag (note: should be used carefully since state can change concurrently).
Throws:
  `IgniteCheckedException` - Thrown in case of any errors.

#### updateUtilityCache

    public void updateUtilityCache()

Deprecated.

#### onKernalStop

    public void onKernalStop(boolean cancel)

Deprecated.
Callback to notify that kernal is about to stop.

Specified by:
  `onKernalStop` in interface `GridComponent`
Overrides:
  `onKernalStop` in class `GridProcessorAdapter`
Parameters:
  `cancel` - Flag indicating whether jobs should be canceled.

#### onActivate

    public void onActivate(GridKernalContext kctx)
                    throws IgniteCheckedException

Deprecated.
Called when cluster performing activation.

Specified by:
  `onActivate` in interface `IgniteChangeGlobalStateSupport`
Parameters:
  `kctx` - Kernal context.
Throws:
  `IgniteCheckedException` - If failed.

#### onDeActivate

    public void onDeActivate(GridKernalContext kctx)

Deprecated.
Called when cluster performing deactivation.

Specified by:
  `onDeActivate` in interface `IgniteChangeGlobalStateSupport`
Parameters:
  `kctx` - Kernal context.

#### onDisconnected

    public void onDisconnected(IgniteFuture<?> reconnectFut)
                        throws IgniteCheckedException

Deprecated.
Client disconnected callback.

Specified by:
  `onDisconnected` in interface `GridComponent`
Overrides:
  `onDisconnected` in class `GridProcessorAdapter`
Parameters:
  `reconnectFut` - Reconnect future.
Throws:
  `IgniteCheckedException` - If failed.

#### deployNodeSingleton

    public IgniteInternalFuture<?> deployNodeSingleton(ClusterGroup prj,
                                                       String name,
                                                       Service srvc)

Deprecated.

Specified by:
  `deployNodeSingleton` in class `ServiceProcessorAdapter`
Parameters:
  `prj` - Grid projection.
  `name` - Service name.
  `srvc` - Service.
Returns:
  Future.

#### deployClusterSingleton

    public IgniteInternalFuture<?> deployClusterSingleton(ClusterGroup prj,
                                                          String name,
                                                          Service srvc)

Deprecated.

Specified by:
  `deployClusterSingleton` in class `ServiceProcessorAdapter`
  `name` - Service name.
  `srvc` - Service instance.
Returns:
  Future.

#### deployMultiple

    public IgniteInternalFuture<?> deployMultiple(ClusterGroup prj,
                                                  String name,
                                                  Service srvc,
                                                  int totalCnt,
                                                  int maxPerNodeCnt)

Deprecated.

Specified by:
  `deployMultiple` in class `ServiceProcessorAdapter`
  `name` - Service name.
  `srvc` - Service.
  `totalCnt` - Total count.
  `maxPerNodeCnt` - Max per-node count.
Returns:
  Future.

#### deployKeyAffinitySingleton

    public IgniteInternalFuture<?> deployKeyAffinitySingleton(String name,
                                                              Service srvc,
                                                              String cacheName,
                                                              Object affKey)

Deprecated.

Specified by:
  `deployKeyAffinitySingleton` in class `ServiceProcessorAdapter`
Parameters:
  `name` - Service name.
  `srvc` - Service.
  `cacheName` - Cache name.
  `affKey` - Affinity key.
Returns:
  Future.

#### deployAll

    public IgniteInternalFuture<?> deployAll(ClusterGroup prj,
                                             Collection<ServiceConfiguration> cfgs)

Deprecated.

Specified by:
  `deployAll` in class `ServiceProcessorAdapter`
Parameters:
  `prj` - Grid projection.
  `cfgs` - Service configurations.
Returns:
  Future for deployment.

#### cancel

    public IgniteInternalFuture<?> cancel(String name)

Deprecated.

Specified by:
  `cancel` in class `ServiceProcessorAdapter`
Parameters:
  `name` - Service name.
Returns:
  Future.

#### cancelAll

    public IgniteInternalFuture<?> cancelAll()

Deprecated.

Specified by:
  `cancelAll` in class `ServiceProcessorAdapter`
Returns:
  Future.

#### cancelAll

    public IgniteInternalFuture<?> cancelAll(Collection<String> servicesNames)

Deprecated.

Specified by:
  `cancelAll` in class `ServiceProcessorAdapter`
Parameters:
  `servicesNames` - Name of services to deploy.
Returns:
  Future.

#### serviceTopology

    public Map<UUID,Integer> serviceTopology(String name,
                                             long timeout)
                                      throws IgniteCheckedException

Deprecated.

Specified by:
  `serviceTopology` in class `ServiceProcessorAdapter`
Parameters:
  `name` - Service name.
  `timeout` - If greater than 0 limits task execution time. Cannot be negative.
Returns:
  Service topology.
Throws:
  `IgniteCheckedException` - On error.

#### serviceDescriptors

    public Collection<ServiceDescriptor> serviceDescriptors()

Deprecated.

Specified by:
  `serviceDescriptors` in class `ServiceProcessorAdapter`
Returns:
  Collection of service descriptors.

#### service

    public <T> T service(String name)

Deprecated.

Specified by:
  `service` in class `ServiceProcessorAdapter`
Type Parameters:
  `T` - Service type.
Parameters:
  `name` - Service name.
Returns:
  Service by specified service name.

#### serviceContext

    public ServiceContextImpl serviceContext(String name)

Deprecated.

Specified by:
  `serviceContext` in class `ServiceProcessorAdapter`
Parameters:
  `name` - Service name.
Returns:
  Service by specified service name.

#### serviceProxy

    public <T> T serviceProxy(ClusterGroup prj,
                              String name,
                              Class<? super T> srvcCls,
                              boolean sticky,
                              long timeout)
                       throws IgniteException

Deprecated.

Specified by:
  `serviceProxy` in class `ServiceProcessorAdapter`
Type Parameters:
  `T` - Service interface type.
Parameters:
  `prj` - Grid projection.
  `name` - Service name.
  `srvcCls` - Service class.
  `sticky` - Whether multi-node request should be done.
  `timeout` - If greater than 0 limits service acquire time. Cannot be negative.
Returns:
  The proxy of a service by its name and class.
Throws:
  `IgniteException` - If failed to create proxy.

#### services

    public <T> Collection<T> services(String name)

Deprecated.

Specified by:
  `services` in class `ServiceProcessorAdapter`
Type Parameters:
  `T` - Service type.
Parameters:
  `name` - Service name.
Returns:
  Services by specified service name.

#### onUtilityCacheStarted

    public void onUtilityCacheStarted()

Deprecated.
Called right after utility cache is started and ready for the usage.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022