Public Member Functions | Properties | List of all members
GridGain.Services.IServices Interface Reference

Defines functionality to deploy distributed services on the grid. More...

Inherits GridGain.Common.IAsyncSupport< IServices >.

Public Member Functions

void DeployClusterSingleton (string name, IService service)
 Deploys a cluster-wide singleton service. Grid guarantees that there is always one instance of the service in the cluster. In case if grid node on which the service was deployed crashes or stops, grid will automatically redeploy it on another node. However, if the node on which the service is deployed remains in topology, then the service will always be deployed on that node only, regardless of topology changes. More...
 
void DeployNodeSingleton (string name, IService service)
 Deploys a per-node singleton service. Grid guarantees that there is always one instance of the service running on each node. Whenever new nodes are started within the underlying cluster group, grid will automatically deploy one instance of the service on every new node. More...
 
void DeployKeyAffinitySingleton< K > (string name, IService service, string cacheName, K affinityKey)
 Deploys one instance of this service on the primary node for a given affinity key. Whenever topology changes and primary node assignment changes, Ignite will always make sure that the service is undeployed on the previous primary node and deployed on the new primary node. More...
 
void DeployMultiple (string name, IService service, int totalCount, int maxPerNodeCount)
 Deploys multiple instances of the service on the grid. Grid will deploy a maximum amount of services equal to totalCount parameter making sure that there are no more than maxPerNodeCount service instances running on each node. Whenever topology changes, grid will automatically rebalance the deployed services within cluster to make sure that each node will end up with about equal number of deployed instances whenever possible. More...
 
void Deploy (ServiceConfiguration configuration)
 Deploys instances of the service on the grid according to provided configuration. More...
 
void Cancel (string name)
 Cancels service deployment. If a service with specified name was deployed on the grid, then IService.Cancel method will be called on it. Note that grid cannot guarantee that the service exits from IService.Execute method whenever IService.Cancel is called. It is up to the user to make sure that the service code properly reacts to cancellations. More...
 
void CancelAll ()
 Cancels all deployed services. Note that depending on user logic, it may still take extra time for a service to finish execution, even after it was cancelled. More...
 
ICollection< IServiceDescriptor > GetServiceDescriptors ()
 Gets metadata about all deployed services. More...
 
T GetService< T > (string name)
 Gets deployed service with specified name. More...
 
ICollection< T > GetServices< T > (string name)
 Gets all deployed services with specified name. More...
 
T GetServiceProxy< T > (string name)
 Gets a remote handle on the service. If service is available locally, then local instance is returned, otherwise, a remote proxy is dynamically created and provided for the specified service. More...
 
T GetServiceProxy< T > (string name, bool sticky)
 Gets a remote handle on the service. If service is available locally, then local instance is returned, otherwise, a remote proxy is dynamically created and provided for the specified service. More...
 
IServices WithKeepPortable ()
 Returns an instance with portable mode enabled. Service method results will be kept in portable form. More...
 
IServices WithServerKeepPortable ()
 Returns an instance with server-side portable mode enabled. Service method arguments will be kept in portable form. More...
 
- Public Member Functions inherited from GridGain.Common.IAsyncSupport< IServices >
TWithAsync WithAsync ()
 Gets component with asynchronous mode enabled. More...
 
IFuture GetFuture ()
 Gets and resets future for previous asynchronous operation. More...
 
IFuture< TResult > GetFuture< TResult > ()
 Gets and resets future for previous asynchronous operation. More...
 

Properties

IClusterGroup ClusterGroup [get]
 Gets the cluster group to which this instance belongs. More...
 
- Properties inherited from GridGain.Common.IAsyncSupport< IServices >
bool IsAsync [get]
 Gets a value indicating whether this instance is in asynchronous mode. More...
 

Detailed Description

Member Function Documentation

void GridGain.Services.IServices.Cancel ( string  name)
Parameters
nameName of the service to cancel.
void GridGain.Services.IServices.CancelAll ( )
void GridGain.Services.IServices.Deploy ( ServiceConfiguration  configuration)
Parameters
configurationService configuration.
void GridGain.Services.IServices.DeployClusterSingleton ( string  name,
IService  service 
)

Note that in case of topology changes, due to network delays, there may be a temporary situation when a singleton service instance will be active on more than one node (e.g. crash detection delay).

Parameters
nameService name.
serviceService instance.
void GridGain.Services.IServices.DeployKeyAffinitySingleton< K > ( string  name,
IService  service,
string  cacheName,
K  affinityKey 
)

Note that in case of topology changes, due to network delays, there may be a temporary situation when a service instance will be active on more than one node (e.g. crash detection delay).

Parameters
nameService name.
serviceService instance.
cacheNameName of the cache on which affinity for key should be calculated, null for default cache.
affinityKeyAffinity cache key.
void GridGain.Services.IServices.DeployMultiple ( string  name,
IService  service,
int  totalCount,
int  maxPerNodeCount 
)
Parameters
nameService name.
serviceService instance.
totalCountMaximum number of deployed services in the grid, 0 for unlimited.
maxPerNodeCountMaximum number of deployed services on each node, 0 for unlimited.
void GridGain.Services.IServices.DeployNodeSingleton ( string  name,
IService  service 
)
Parameters
nameService name.
serviceService instance.
T GridGain.Services.IServices.GetService< T > ( string  name)
Template Parameters
TService type.
Parameters
nameService name.
Returns
Deployed service with specified name.
ICollection<IServiceDescriptor> GridGain.Services.IServices.GetServiceDescriptors ( )
Returns
Metadata about all deployed services.
T GridGain.Services.IServices.GetServiceProxy< T > ( string  name)
Template Parameters
TService type.
Parameters
nameService name.
Returns
Either proxy over remote service or local service if it is deployed locally.
Type Constraints
T :class 
T GridGain.Services.IServices.GetServiceProxy< T > ( string  name,
bool  sticky 
)
Template Parameters
TService type.
Parameters
nameService name.
stickyWhether or not grid should always contact the same remote service or try to load-balance between services.
Returns
Either proxy over remote service or local service if it is deployed locally.
Type Constraints
T :class 
ICollection<T> GridGain.Services.IServices.GetServices< T > ( string  name)
Template Parameters
TService type.
Parameters
nameService name.
Returns
All deployed services with specified name.
IServices GridGain.Services.IServices.WithKeepPortable ( )
Returns
Instance with portable mode enabled.
IServices GridGain.Services.IServices.WithServerKeepPortable ( )
Returns
Instance with server-side portable mode enabled.

Property Documentation

IClusterGroup GridGain.Services.IServices.ClusterGroup
get

The cluster group to which this instance belongs.