Class ServiceInfo
- java.lang.Object
-
- org.apache.ignite.internal.processors.service.ServiceInfo
-
- All Implemented Interfaces:
Serializable,ServiceDescriptor
public class ServiceInfo extends Object implements ServiceDescriptor
Service's information container.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ServiceInfo(@NotNull UUID originNodeId, @NotNull IgniteUuid srvcId, @NotNull LazyServiceConfiguration cfg)ServiceInfo(@NotNull UUID originNodeId, @NotNull IgniteUuid srvcId, @NotNull LazyServiceConfiguration cfg, boolean staticCfg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K> KaffinityKey()Gets affinity key used for key-to-node affinity calculation.@Nullable StringcacheName()Gets cache name used for key-to-node affinity calculation.LazyServiceConfigurationconfiguration()Returns service's configuration.voidcontext(GridKernalContext ctx)Sets kernal context.intmaxPerNodeCount()Gets maximum allowed number of deployed services on each node,0for unlimited.Stringname()Gets service name.UUIDoriginNodeId()Gets ID of grid node that initiated the service deployment.Class<? extends Service>serviceClass()Gets service class.IgniteUuidserviceId()Rerurns services id.booleanstaticallyConfigured()booleantopologyInitialized()Whether service topology was initialized.Map<UUID,Integer>topologySnapshot()Gets service deployment topology snapshot.voidtopologySnapshot(@NotNull Map<UUID,Integer> top)Sets service's new topology snapshot.StringtoString()inttotalCount()Gets maximum allowed total number of deployed services in the grid,0for unlimited.
-
-
-
Constructor Detail
-
ServiceInfo
public ServiceInfo(@NotNull @NotNull UUID originNodeId, @NotNull @NotNull IgniteUuid srvcId, @NotNull @NotNull LazyServiceConfiguration cfg)- Parameters:
originNodeId- Initiating node id.srvcId- Service id.cfg- Service configuration.
-
ServiceInfo
public ServiceInfo(@NotNull @NotNull UUID originNodeId, @NotNull @NotNull IgniteUuid srvcId, @NotNull @NotNull LazyServiceConfiguration cfg, boolean staticCfg)- Parameters:
originNodeId- Initiating node id.srvcId- Service id.cfg- Service configuration.staticCfg- Statically configured flag.
-
-
Method Detail
-
context
public void context(GridKernalContext ctx)
Sets kernal context.- Parameters:
ctx- Context.
-
topologySnapshot
public void topologySnapshot(@NotNull @NotNull Map<UUID,Integer> top)Sets service's new topology snapshot.- Parameters:
top- Topology snapshot.
-
configuration
public LazyServiceConfiguration configuration()
Returns service's configuration.- Returns:
- Service configuration.
-
staticallyConfigured
public boolean staticallyConfigured()
- Returns:
trueif statically configured.
-
serviceId
public IgniteUuid serviceId()
Rerurns services id.- Returns:
- Service id.
-
name
public String name()
Gets service name.- Specified by:
namein interfaceServiceDescriptor- Returns:
- Service name.
-
serviceClass
public Class<? extends Service> serviceClass()
Gets service class.- Specified by:
serviceClassin interfaceServiceDescriptor- Returns:
- Service class.
-
totalCount
public int totalCount()
Gets maximum allowed total number of deployed services in the grid,0for unlimited.- Specified by:
totalCountin interfaceServiceDescriptor- Returns:
- Maximum allowed total number of deployed services in the grid,
0for unlimited.
-
maxPerNodeCount
public int maxPerNodeCount()
Gets maximum allowed number of deployed services on each node,0for unlimited.- Specified by:
maxPerNodeCountin interfaceServiceDescriptor- Returns:
- Maximum allowed total number of deployed services on each node,
0for unlimited.
-
cacheName
@Nullable public @Nullable 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:
cacheNamein interfaceServiceDescriptor- 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:
affinityKeyin interfaceServiceDescriptor- Type Parameters:
K- Affinity key type.- Returns:
- Affinity key, possibly
null.
-
originNodeId
public UUID originNodeId()
Gets ID of grid node that initiated the service deployment.- Specified by:
originNodeIdin interfaceServiceDescriptor- 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:
topologySnapshotin interfaceServiceDescriptor- Returns:
- Map of number of service instances per node ID.
-
topologyInitialized
public boolean topologyInitialized()
Whether service topology was initialized.- Returns:
Trueif service topology was initialized.
-
-