org.apache.ignite.internal.processors.service

## Class ServiceDescriptorImpl

- java.lang.Object
- - org.apache.ignite.internal.processors.service.ServiceDescriptorImpl

All Implemented Interfaces:
  Serializable, ServiceDescriptor

    public class ServiceDescriptorImpl
    extends Object
    implements ServiceDescriptor

Service descriptor.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`ServiceDescriptorImpl(GridServiceDeployment dep)`

### Method Summary

All Methods Instance Methods Concrete Methods
`<K> K` `affinityKey()` Gets affinity key used for key-to-node affinity calculation.
`String` `cacheName()` Gets cache name used for key-to-node affinity calculation.
`int` `maxPerNodeCount()` Gets maximum allowed number of deployed services on each node, `0` for unlimited.
`String` `name()` Gets service name.
`UUID` `originNodeId()` Gets ID of grid node that initiated the service deployment.
`Class<? extends Service>` `serviceClass()` Gets service class.
`Map<UUID,Integer>` `topologySnapshot()` Gets service deployment topology snapshot.
`String` `toString()`
`int` `totalCount()` Gets maximum allowed total number of deployed services in the grid, `0` for unlimited.

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

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

### Constructor Detail

#### ServiceDescriptorImpl

    public ServiceDescriptorImpl(GridServiceDeployment dep)

Parameters:
  `dep` - Deployment.

### Method Detail

#### name

    public String name()

Gets service name.

Specified by:
  `name` in interface `ServiceDescriptor`
Returns:
  Service name.

#### serviceClass

    public Class<? extends Service> serviceClass()

Gets service class.

Specified by:
  `serviceClass` in interface `ServiceDescriptor`
Returns:
  Service class.

#### totalCount

    public int totalCount()

Gets maximum allowed total number of deployed services in the grid, `0` for unlimited.

Specified by:
  `totalCount` in interface `ServiceDescriptor`
Returns:
  Maximum allowed total number of deployed services in the grid, `0` for unlimited.

#### maxPerNodeCount

    public int maxPerNodeCount()

Gets maximum allowed number of deployed services on each node, `0` for unlimited.

Specified by:
  `maxPerNodeCount` in interface `ServiceDescriptor`
Returns:
  Maximum allowed total number of deployed services on each node, `0` for unlimited.

#### cacheName

    @Nullable
    public String cacheName()

Gets cache name used for key-to-node affinity calculation. This parameter is optional and is set only when key-affinity service was deployed.

Specified by:
  `cacheName` in interface `ServiceDescriptor`
Returns:
  Cache name, possibly `null`.

#### affinityKey

    @Nullable
    public <K> K affinityKey()

Gets affinity key used for key-to-node affinity calculation. This parameter is optional and is set only when key-affinity service was deployed.

Specified by:
  `affinityKey` in interface `ServiceDescriptor`
Returns:
  Affinity key, possibly `null`.

#### originNodeId

    public UUID originNodeId()

Gets ID of grid node that initiated the service deployment.

Specified by:
  `originNodeId` in interface `ServiceDescriptor`
Returns:
  ID of grid node that initiated the service deployment.

#### topologySnapshot

    public Map<UUID,Integer> topologySnapshot()

Gets service deployment topology snapshot. Service topology snapshot is represented by number of service instances deployed on a node mapped to node ID.

Specified by:
  `topologySnapshot` in interface `ServiceDescriptor`
Returns:
  Map of number of service instances per node ID.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.5.0
Release Date | : May 23 2018