Class contains common connection-error handling logic. More...
Inherited by GridGain.Client.Impl.GridClientComputeImpl, and GridGain.Client.Impl.GridClientDataImpl.
Protected Member Functions | |
| internal | GridClientAbstractProjection (IGridClientProjectionConfig cfg, IEnumerable< N > nodes, Predicate< N > filter, IGridClientLoadBalancer balancer) |
| Creates projection with specified client. | |
| IGridClientFuture< TRes > | WithReconnectHandling< TRes > (Func< IGridClientConnection, Guid, IGridClientFuture< TRes >> c) |
| This method executes request to a communication layer and handles connection error, if it occurs. In case of communication exception client instance is notified and new instance of client is created. If none of the grid servers can be reached, an exception is thrown. | |
| IGridClientFuture< TRes > | WithReconnectHandling< TRes > (Func< IGridClientConnection, Guid, IGridClientFuture< TRes >> c, String cacheName, Object affKey) |
| This method executes request to a communication layer and handles connection error, if it occurs. Server is picked up according to the projection affinity and key given. Connection will be made with the node on which key is cached. In case of communication exception client instance is notified and new instance of client is created. If none of servers can be reached, an exception is thrown. | |
| bool | CheckNodeAlive (Guid nodeId) |
| Tries to refresh node on every possible connection in topology. | |
| IList< N > | ProjectionNodes () |
| Gets most recently refreshed topology. If this compute instance is a projection, then only nodes that satisfy projection criteria will be returned. | |
| T | CreateProjection (ICollection< N > nodes, Predicate< N > filter, IGridClientLoadBalancer balancer) |
| Creates a sub-projection for current projection. | |
| abstract T | CreateProjectionImpl (IEnumerable< N > nodes, Predicate< N > filter, IGridClientLoadBalancer balancer) |
| Subclasses must implement this method and return concrete implementation of projection needed. | |
Protected Attributes | |
| readonly IList< N > | _nodes |
| List of nodes included in this projection. If null, all nodes in topology are included. | |
| readonly Predicate< N > | _filter |
| Node filter to be applied for this projection. | |
| readonly IGridClientLoadBalancer | _balancer |
| Node filter to be applied for this projection. | |
| readonly IGridClientProjectionConfig | cfg |
| Projection configuration. | |
| T | : | GridClientAbstractProjection<T> |
| bool GridGain.Client.Impl.GridClientAbstractProjection< T >.CheckNodeAlive | ( | Guid | nodeId | ) | [protected] |
| nodeId | Node id to check. |
True if response was received, null if either null response received or no nodes can be contacted at all.| GridClientClosedException | If client was closed manually. |
| T GridGain.Client.Impl.GridClientAbstractProjection< T >.CreateProjection | ( | ICollection< N > | nodes, | |
| Predicate< N > | filter, | |||
| IGridClientLoadBalancer | balancer | |||
| ) | [protected] |
| nodes | Collection of nodes that sub-projection will be restricted to. If null, |
created projection is dynamic and will take nodes from topology.
| filter | Filter to be applied to nodes in projection. | |
| balancer | Balancer to use in projection. |
| GridClientException | If resulting projection is empty. Note that this exception may only be thrown on case of static projections, i.e. where collection of nodes is not null. |
| abstract T GridGain.Client.Impl.GridClientAbstractProjection< T >.CreateProjectionImpl | ( | IEnumerable< N > | nodes, | |
| Predicate< N > | filter, | |||
| IGridClientLoadBalancer | balancer | |||
| ) | [protected, pure virtual] |
| nodes | Nodes that are included in projection. | |
| filter | Filter to be applied. | |
| balancer | Balancer to be used. |
| internal GridGain.Client.Impl.GridClientAbstractProjection< T >.GridClientAbstractProjection | ( | IGridClientProjectionConfig | cfg, | |
| IEnumerable< N > | nodes, | |||
| Predicate< N > | filter, | |||
| IGridClientLoadBalancer | balancer | |||
| ) | [protected] |
| cfg | Progjection configuration. | |
| nodes | Collections of nodes included in this projection. | |
| filter | Node filter to be applied. | |
| balancer | Balancer to use. |
| IList<N> GridGain.Client.Impl.GridClientAbstractProjection< T >.ProjectionNodes | ( | ) | [protected] |
| IGridClientFuture<TRes> GridGain.Client.Impl.GridClientAbstractProjection< T >.WithReconnectHandling< TRes > | ( | Func< IGridClientConnection, Guid, IGridClientFuture< TRes >> | c, | |
| String | cacheName, | |||
| Object | affKey | |||
| ) | [protected] |
| c | Closure to be executed. | |
| cacheName | Cache name for which mapped node will be calculated. | |
| affKey | Affinity key. |
| IGridClientFuture<TRes> GridGain.Client.Impl.GridClientAbstractProjection< T >.WithReconnectHandling< TRes > | ( | Func< IGridClientConnection, Guid, IGridClientFuture< TRes >> | c | ) | [protected] |
| c | Closure to be executed. |
readonly IGridClientLoadBalancer GridGain.Client.Impl.GridClientAbstractProjection< T >._balancer [protected] |
readonly Predicate<N> GridGain.Client.Impl.GridClientAbstractProjection< T >._filter [protected] |
readonly IList<N> GridGain.Client.Impl.GridClientAbstractProjection< T >._nodes [protected] |
readonly IGridClientProjectionConfig GridGain.Client.Impl.GridClientAbstractProjection< T >.cfg [protected] |
1.7.1