Namespace Apache.Ignite.Core.Services
Classes
ServiceCallContextBuilder
Service call context builder.
ServiceConfiguration
Service configuration.
ServiceDeploymentException
Indicates an error during Grid Services deployment.
ServiceInvocationException
Indicates an error during Grid Services invocation.
Interfaces
IService
Represents Ignite-managed service.
IServiceCallContext
Represents service call context.
This context is implicitly passed to the service and can be retrieved inside the service using CurrentCallContext. It is accessible only from the local thread during the execution of a service method.
Use ServiceCallContextBuilder to instantiate the context.
Note: passing the context to the service may lead to performance overhead, so it should only be used for "middleware" tasks.
Usage example:
// Service implementation.
public class HelloServiceImpl : HelloService
{
private IServiceContext ctx;
public void Init(IServiceContext ctx)
{
this.ctx = ctx;
}
public string Call(string msg)
{
return msg + ctx.CurrentCallContext.Attribute("user");
}
...
}
...
// Call this service with context.
IServiceCallContext callCtx = new ServiceCallContextBuilder().Set("user", "John").build();
HelloService helloSvc = ignite.GetServices().GetServiceProxy<HelloService>("hello-service", false, callCtx);
// Print "Hello John".
Console.WriteLine( helloSvc.call("Hello ") );
IServiceContext
Represents service execution context.
IServiceDescriptor
Service deployment descriptor.
IServices
Defines functionality to deploy distributed services in the Ignite.