Public Member Functions | Properties

GridGain.Client.IGridClientCompute Interface Reference

A compute projection of grid client. Contains various methods for task execution, full and partial (per node) topology refresh and log downloading.

Inherited by GridGain.Client.Impl.GridClientComputeImpl.

List of all members.

Public Member Functions

IGridClientCompute Projection (IGridClientNode node)
 Creates a projection that will communicate only with specified remote node. If current projection is dynamic projection, then this method will check is passed node is in topology. If any filters were specified in current topology, this method will check if passed node is accepted by the filter. If current projection was restricted to any subset of nodes, this method will check if passed node is in that subset. If any of the checks fails an exception will be thrown.
IGridClientCompute Projection (Predicate< IGridClientNode > filter)
 Creates a projection that will communicate only with nodes that are accepted by the passed filter. If current projection is dynamic projection, then filter will be applied to the most relevant topology snapshot every time a node to communicate is selected. If current projection is a static projection, then resulting projection will only be restricted to nodes that were in parent projection and were accepted by the passed filter. If any of the checks fails an exception will be thrown.
IGridClientCompute Projection (ICollection< IGridClientNode > nodes)
 Creates a projection that will communicate only with specified remote nodes. For any particular call a node to communicate will be selected with balancer of this projection. If current projection is dynamic projection, then this method will check is passed nodes are in topology. If any filters were specified in current topology, this method will check if passed nodes are accepted by the filter. If current projection was restricted to any subset of nodes, this method will check if passed nodes are in that subset (i.e. calculate the intersection of two collections). If any of the checks fails an exception will be thrown.
IGridClientCompute Projection (Predicate< IGridClientNode > filter, IGridClientLoadBalancer balancer)
 Creates a projection that will communicate only with nodes that are accepted by the passed filter. The balancer passed will override default balancer specified in configuration. If current projection is dynamic projection, then filter will be applied to the most relevant topology snapshot every time a node to communicate is selected. If current projection is a static projection, then resulting projection will only be restricted to nodes that were in parent projection and were accepted by the passed filter. If any of the checks fails an exception will be thrown.
IGridClientCompute Projection (ICollection< IGridClientNode > nodes, IGridClientLoadBalancer balancer)
 Creates a projection that will communicate only with specified remote nodes. For any particular call a node to communicate will be selected with passed balancer.. If current projection is dynamic projection, then this method will check is passed nodes are in topology. If any filters were specified in current topology, this method will check if passed nodes are accepted by the filter. If current projection was restricted to any subset of nodes, this method will check if passed nodes are in that subset (i.e. calculate the intersection of two collections). If any of the checks fails an exception will be thrown.
T Execute< T > (String taskName, Object taskArg)
 Executes task.
IGridClientFuture< T > ExecuteAsync< T > (String taskName, Object taskArg)
 Asynchronously executes task.
T AffinityExecute< T > (String taskName, String cacheName, Object affKey, Object taskArg)
 Executes task using cache affinity key for routing. This way the task will start executing exactly on the node where this affinity key is cached.
IGridClientFuture< T > AffinityExecuteAsync< T > (String taskName, String cacheName, Object affKey, Object taskArg)
 Asynchronously executes task using cache affinity key for routing. This way the task will start executing exactly on the node where this affinity key is cached.
IList< IGridClientNode > Nodes ()
 Gets most recently refreshed topology. If this compute instance is a projection, then only nodes that satisfy projection criteria will be returned.
IGridClientNode Node (Guid id)
 Gets node with given id from most recently refreshed topology.
IList< IGridClientNode > Nodes (ICollection< Guid > ids)
 Gets nodes for the given IDs based on most recently refreshed topology.
IList< IGridClientNode > Nodes (Predicate< IGridClientNode > filter)
 Gets nodes that passes the filter. If this compute instance is a projection, then only nodes that passes projection criteria will be passed to the filter.
IGridClientNode RefreshNode (Guid id, bool includeAttrs, bool includeMetrics)
 Gets node by its ID.
IGridClientFuture
< IGridClientNode > 
RefreshNodeAsync (Guid id, bool includeAttrs, bool includeMetrics)
 Asynchronously gets node by its ID.
IGridClientNode RefreshNode (String ip, bool includeAttrs, bool includeMetrics)
 Gets node by IP address.
IGridClientFuture
< IGridClientNode > 
RefreshNodeAsync (String ip, bool includeAttrs, bool includeMetrics)
 Asynchronously gets node by IP address.
IList< IGridClientNode > RefreshTopology (bool includeAttrs, bool includeMetrics)
 Gets current topology.
IGridClientFuture< IList
< IGridClientNode > > 
RefreshTopologyAsync (bool includeAttrs, bool includeMetrics)
 Asynchronously gets current topology.
IList< String > Log (int lineFrom, int lineTo)
 Gets contents of default log file (GRIDGAIN_HOME/work/log/gridgain.log).
IGridClientFuture< IList
< String > > 
LogAsync (int lineFrom, int lineTo)
 Asynchronously gets contents of default log file (GRIDGAIN_HOME/work/log/gridgain.log).
IList< String > Log (String path, int lineFrom, int lineTo)
 Gets contents of custom log file.
IGridClientFuture< IList
< String > > 
LogAsync (String path, int lineFrom, int lineTo)
 Asynchronously gets contents of custom log file.

Properties

IGridClientLoadBalancer Balancer [get]
 Gets balancer used by projection.

Member Function Documentation

T GridGain.Client.IGridClientCompute.AffinityExecute< T > ( String  taskName,
String  cacheName,
Object  affKey,
Object  taskArg 
)
Parameters:
taskName Task name or task class name.
cacheName Name of the cache on which affinity should be calculated.
affKey Affinity key.
taskArg Optional task argument.
Returns:
Task execution result.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IGridClientFuture<T> GridGain.Client.IGridClientCompute.AffinityExecuteAsync< T > ( String  taskName,
String  cacheName,
Object  affKey,
Object  taskArg 
)
Parameters:
taskName Task name or task class name.
cacheName Name of the cache on which affinity should be calculated.
affKey Affinity key.
taskArg Optional task argument.
Returns:
Future.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

T GridGain.Client.IGridClientCompute.Execute< T > ( String  taskName,
Object  taskArg 
)
Parameters:
taskName Task name or task class name.
taskArg Optional task argument.
Returns:
Task execution result.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IGridClientFuture<T> GridGain.Client.IGridClientCompute.ExecuteAsync< T > ( String  taskName,
Object  taskArg 
)
Parameters:
taskName Task name or task class name.
taskArg Optional task argument.
Returns:
Future.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IList<String> GridGain.Client.IGridClientCompute.Log ( int  lineFrom,
int  lineTo 
)
Parameters:
lineFrom Index of line from which log is get, inclusive (starting from 0).
lineTo Index of line to which log is get, inclusive (starting from 0).
Returns:
Log contents.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IList<String> GridGain.Client.IGridClientCompute.Log ( String  path,
int  lineFrom,
int  lineTo 
)
Parameters:
path Log file path. Can be absolute or relative to GRIDGAIN_HOME.
lineFrom Index of line from which log is get, inclusive (starting from 0).
lineTo Index of line to which log is get, inclusive (starting from 0).
Returns:
Log contents.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IGridClientFuture<IList<String> > GridGain.Client.IGridClientCompute.LogAsync ( String  path,
int  lineFrom,
int  lineTo 
)
Parameters:
path Log file path. Can be absolute or relative to GRIDGAIN_HOME.
lineFrom Index of line from which log is get, inclusive (starting from 0).
lineTo Index of line to which log is get, inclusive (starting from 0).
Returns:
Future.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IGridClientFuture<IList<String> > GridGain.Client.IGridClientCompute.LogAsync ( int  lineFrom,
int  lineTo 
)
Parameters:
lineFrom Index of line from which log is get, inclusive (starting from 0).
lineTo Index of line to which log is get, inclusive (starting from 0).
Returns:
Future.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IGridClientNode GridGain.Client.IGridClientCompute.Node ( Guid  id  ) 
Parameters:
id Node ID.
Returns:
Node for given ID or null if node with given id was not found.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IList<IGridClientNode> GridGain.Client.IGridClientCompute.Nodes (  ) 
Returns:
Most recently refreshed topology.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IList<IGridClientNode> GridGain.Client.IGridClientCompute.Nodes ( ICollection< Guid >  ids  ) 
Parameters:
ids Node IDs.
Returns:
Collection of nodes for provided IDs.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IList<IGridClientNode> GridGain.Client.IGridClientCompute.Nodes ( Predicate< IGridClientNode >  filter  ) 
Parameters:
filter Node filter.
Returns:
Collection of nodes that satisfy provided filter.
IGridClientCompute GridGain.Client.IGridClientCompute.Projection ( Predicate< IGridClientNode >  filter,
IGridClientLoadBalancer  balancer 
)
Parameters:
filter Filter that will select nodes for projection.
balancer Balancer that will select balanced node in resulting projection.
Returns:
Resulting projection (static or dynamic, depending in parent projection type).
Exceptions:
GridClientException In case of error.
IGridClientCompute GridGain.Client.IGridClientCompute.Projection ( Predicate< IGridClientNode >  filter  ) 
Parameters:
filter Filter that will select nodes for projection.
Returns:
Resulting projection (static or dynamic, depending in parent projection type).
Exceptions:
GridClientException In case of error.
IGridClientCompute GridGain.Client.IGridClientCompute.Projection ( ICollection< IGridClientNode >  nodes,
IGridClientLoadBalancer  balancer 
)
Parameters:
nodes Collection of nodes to which this projection will be restricted.
balancer Balancer that will select nodes in resulting projection.
Returns:
Resulting static projection that is bound to a given nodes.
Exceptions:
GridClientException In case of error.
IGridClientCompute GridGain.Client.IGridClientCompute.Projection ( ICollection< IGridClientNode >  nodes  ) 
Parameters:
nodes Collection of nodes to which this projection will be restricted.
Returns:
Resulting static projection that is bound to a given nodes.
Exceptions:
GridClientException In case of error.
IGridClientCompute GridGain.Client.IGridClientCompute.Projection ( IGridClientNode  node  ) 
Parameters:
node Single node to which this projection will be restricted.
Returns:
Resulting static projection that is bound to a given node.
Exceptions:
GridClientException In case of error.
IGridClientNode GridGain.Client.IGridClientCompute.RefreshNode ( String  ip,
bool  includeAttrs,
bool  includeMetrics 
)
Parameters:
ip IP address.
includeAttrs Whether to include node attributes.
includeMetrics Whether to include node metrics.
Returns:
Node descriptor or null if node doesn't exist.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IGridClientNode GridGain.Client.IGridClientCompute.RefreshNode ( Guid  id,
bool  includeAttrs,
bool  includeMetrics 
)
Parameters:
id Node ID.
includeAttrs Whether to include node attributes.
includeMetrics Whether to include node metrics.
Returns:
Node descriptor or null if node doesn't exist.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IGridClientFuture<IGridClientNode> GridGain.Client.IGridClientCompute.RefreshNodeAsync ( String  ip,
bool  includeAttrs,
bool  includeMetrics 
)
Parameters:
ip IP address.
includeAttrs Whether to include node attributes.
includeMetrics Whether to include node metrics.
Returns:
Future.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IGridClientFuture<IGridClientNode> GridGain.Client.IGridClientCompute.RefreshNodeAsync ( Guid  id,
bool  includeAttrs,
bool  includeMetrics 
)
Parameters:
id Node ID.
includeAttrs Whether to include node attributes.
includeMetrics Whether to include node metrics.
Returns:
Future.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IList<IGridClientNode> GridGain.Client.IGridClientCompute.RefreshTopology ( bool  includeAttrs,
bool  includeMetrics 
)
Parameters:
includeAttrs Whether to include node attributes.
includeMetrics Whether to include node metrics.
Returns:
Node descriptors.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.

IGridClientFuture<IList<IGridClientNode> > GridGain.Client.IGridClientCompute.RefreshTopologyAsync ( bool  includeAttrs,
bool  includeMetrics 
)
Parameters:
includeAttrs Whether to include node attributes.
includeMetrics Whether to include node metrics.
Returns:
Future.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.


Property Documentation

IGridClientLoadBalancer GridGain.Client.IGridClientCompute.Balancer [get]
Returns:
Instance of IGridClientLoadBalancer.

Implemented in GridGain.Client.Impl.GridClientComputeImpl.