ServiceContext Class
- java.
lang. Object - system.
fabric. ServiceContext
- system.
public class ServiceContext
Represents the service context that the service is operating under.
Constructor Summary
Constructor | Description |
---|---|
ServiceContext(NodeContext nodeContext, CodePackageActivationContext codePackageActivationContext, String serviceTypeName, URI serviceName, byte[] initializationData, UUID partitionId, long replicaOrInstanceId) |
Initializes a new instance of the system.fabric.ServiceContext class. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Code |
getCodePackageActivationContext()
Gets the code package activation context. |
byte [] |
getInitializationData()
Gets the initialization data of the service. |
Node |
getNodeContext()
Gets the node context for the node where the service replica is instantiated. |
UUID |
getPartitionId()
Gets the partition id. |
long |
getReplicaOrInstanceId()
Gets the stateful service replica id or the stateless service instance id. |
URI |
getServiceName()
Get the service name. |
String |
getServiceTypeName()
Gets the service type name. |
String |
getTraceId()
Gets the trace id of the service.
Remarks:The trace id can be used as an identifier for generated traces. |
Constructor Details
ServiceContext
protected ServiceContext(NodeContext nodeContext, CodePackageActivationContext codePackageActivationContext, String serviceTypeName, URI serviceName, byte[] initializationData, UUID partitionId, long replicaOrInstanceId)
Initializes a new instance of the system.fabric.ServiceContext class.
Parameters:
Method Details
getCodePackageActivationContext
public CodePackageActivationContext getCodePackageActivationContext()
Gets the code package activation context.
Returns:
getInitializationData
public byte [] getInitializationData()
Gets the initialization data of the service.
Returns:
getNodeContext
public NodeContext getNodeContext()
Gets the node context for the node where the service replica is instantiated.
Returns:
getPartitionId
public UUID getPartitionId()
Gets the partition id.
Returns:
getReplicaOrInstanceId
public long getReplicaOrInstanceId()
Gets the stateful service replica id or the stateless service instance id.
Returns:
getServiceName
public URI getServiceName()
Get the service name.
Returns:
getServiceTypeName
public String getServiceTypeName()
Gets the service type name.
Returns:
getTraceId
public String getTraceId()
Gets the trace id of the service.
Remarks:The trace id can be used as an identifier for generated traces.
Returns: