Class ServiceContextImpl
- java.lang.Object
-
- org.apache.ignite.internal.processors.service.ServiceContextImpl
-
- All Implemented Interfaces:
Serializable,ServiceContext
public class ServiceContextImpl extends Object implements ServiceContext
Service context implementation.- See Also:
- Serialized Form
-
-
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.ServiceCallContextcurrentCallContext()Gets context of the current service call.UUIDexecutionId()Gets service execution ID.booleanisCancelled()Get flag indicating whether service has been cancelled or not.Stringname()Gets service name.voidsetCancelled(boolean isCancelled)StringtoString()
-
-
-
Method Detail
-
name
public String name()
Gets service name.- Specified by:
namein interfaceServiceContext- Returns:
- Service name.
-
executionId
public UUID executionId()
Gets service execution ID. Execution ID is guaranteed to be unique across all service deployments.- Specified by:
executionIdin interfaceServiceContext- Returns:
- Service execution ID.
-
isCancelled
public boolean isCancelled()
Get flag indicating whether service has been cancelled or not.- Specified by:
isCancelledin interfaceServiceContext- Returns:
- Flag indicating whether service has been cancelled or not.
-
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 interfaceServiceContext- 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 interfaceServiceContext- Type Parameters:
K- Affinity key type.- Returns:
- Affinity key, possibly
null.
-
currentCallContext
public ServiceCallContext currentCallContext()
Gets context of the current service call.- Specified by:
currentCallContextin interfaceServiceContext- Returns:
- Context of the current service call, possibly
null. - See Also:
ServiceCallContext
-
setCancelled
public void setCancelled(boolean isCancelled)
- Parameters:
isCancelled- Cancelled flag.
-
-