Public Member Functions | Properties

GridGain.Client.Impl.IGridClientConnection Interface Reference

Facade for all possible network communications between client and server. Introduced to hide protocol implementation (TCP, HTTP) from client code.

Inherited by GridGain.Client.Impl.GridClientConnectionAdapter.

List of all members.

Public Member Functions

void Close (bool waitCompletion)
 Closes connection facade.
bool CloseIfIdle (TimeSpan timeout)
 Closes connection facade if no requests are in progress.
IGridClientFuture< Boolean > CachePut< K, V > (String cacheName, ISet< GridClientCacheFlag > cacheFlags, K key, V val, Guid destNodeId)
 Puts key-value pair into cache.
IGridClientFuture< V > CacheGet< K, V > (String cacheName, ISet< GridClientCacheFlag > cacheFlags, K key, Guid destNodeId)
 Gets entry from the cache for specified key.
IGridClientFuture< Boolean > CacheRemove< K > (String cacheName, ISet< GridClientCacheFlag > cacheFlags, K key, Guid destNodeId)
 Removes entry from the cache for specified key.
IGridClientFuture< Boolean > CachePutAll< K, V > (String cacheName, ISet< GridClientCacheFlag > cacheFlags, IDictionary< K, V > entries, Guid destNodeId)
 Puts bundle of entries into cache.
IGridClientFuture< IDictionary
< K, V > > 
CacheGetAll< K, V > (String cacheName, ISet< GridClientCacheFlag > cacheFlags, IEnumerable< K > keys, Guid destNodeId)
 Gets bundle of entries for specified keys from the cache.
IGridClientFuture< Boolean > CacheRemoveAll< K > (String cacheName, ISet< GridClientCacheFlag > cacheFlags, IEnumerable< K > keys, Guid destNodeId)
 Removes bundle of entries for specified keys from the cache.
IGridClientFuture< Boolean > CacheReplace< K, V > (String cacheName, ISet< GridClientCacheFlag > cacheFlags, K key, V val, Guid destNodeId)
 Replace key-value pair in cache if already exist.
IGridClientFuture< Boolean > CacheAppend< K, V > (String cacheName, ISet< GridClientCacheFlag > cacheFlags, K key, V val, Guid destNodeId)
 Append value to already cached for specified key.
IGridClientFuture< Boolean > CachePrepend< K, V > (String cacheName, ISet< GridClientCacheFlag > cacheFlags, K key, V val, Guid destNodeId)
 Prepend value to already cached for specified key.
IGridClientFuture< Boolean > CacheCompareAndSet< K, V > (String cacheName, ISet< GridClientCacheFlag > cacheFlags, K key, V newVal, V oldVal, Guid destNodeId)
IGridClientFuture
< IGridClientDataMetrics > 
CacheMetrics (String cacheName, ISet< GridClientCacheFlag > cacheFlags, Guid destNodeId)
 Gets cache metrics for the key.
IGridClientFuture< T > Execute< T > (String taskName, Object taskArg, Guid destNodeId)
 Requests task execution with specified name.
IGridClientFuture
< IGridClientNode > 
Node (Guid id, bool includeAttrs, bool includeMetrics, Guid destNodeId)
 Requests node by its ID.
IGridClientFuture
< IGridClientNode > 
Node (String ipAddr, bool includeAttrs, bool includeMetrics, Guid destNodeId)
 Requests node by its IP address.
IGridClientFuture< IList
< IGridClientNode > > 
Topology (bool includeAttrs, bool includeMetrics, Guid destNodeId)
 Requests actual grid topology.
IGridClientFuture< IList
< String > > 
Log (String path, int fromLine, int toLine, Guid destNodeId)
 Requests server log entries in specified scope.

Properties

IPEndPoint ServerAddress [get]
 Server address this connection linked to.

Member Function Documentation

IGridClientFuture<Boolean> GridGain.Client.Impl.IGridClientConnection.CacheAppend< K, V > ( String  cacheName,
ISet< GridClientCacheFlag >  cacheFlags,
K  key,
V  val,
Guid  destNodeId 
)
Parameters:
cacheName Cache name.
cacheFlags Cache flags.
key Key of cached value.
val Value to append.
destNodeId Node ID to route request to.
Returns:
Whether value was actually appended.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.

Implemented in GridGain.Client.Impl.GridClientConnectionAdapter, GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.

IGridClientFuture<Boolean> GridGain.Client.Impl.IGridClientConnection.CacheCompareAndSet< K, V > ( String  cacheName,
ISet< GridClientCacheFlag >  cacheFlags,
K  key,
V  newVal,
V  oldVal,
Guid  destNodeId 
)
New valueActual/old valueBehaviour
null null Remove entry for key.
newVal null Put newVal into cache if such key doesn't exist.
null oldVal Remove if actual value oldVal is equals to value in cache.
newVal oldVal Replace if actual value oldVal is equals to value in cache.
Parameters:
cacheName Cache name.
cacheFlags Cache flags.
key Key.
newVal Value 1.
oldVal Value 2.
destNodeId Node ID to route request to.
Returns:
Whether new value was actually set.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.

Implemented in GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.

IGridClientFuture<V> GridGain.Client.Impl.IGridClientConnection.CacheGet< K, V > ( String  cacheName,
ISet< GridClientCacheFlag >  cacheFlags,
K  key,
Guid  destNodeId 
)
Parameters:
cacheName Cache name.
cacheFlags Cache flags.
key Key.
destNodeId Node ID to route request to.
Returns:
Value.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.
IGridClientFuture<IDictionary<K, V> > GridGain.Client.Impl.IGridClientConnection.CacheGetAll< K, V > ( String  cacheName,
ISet< GridClientCacheFlag >  cacheFlags,
IEnumerable< K >  keys,
Guid  destNodeId 
)
Parameters:
cacheName Cache name.
cacheFlags Cache flags.
keys Keys.
destNodeId Node ID to route request to.
Returns:
Entries.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.

Implemented in GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.

IGridClientFuture<IGridClientDataMetrics> GridGain.Client.Impl.IGridClientConnection.CacheMetrics ( String  cacheName,
ISet< GridClientCacheFlag >  cacheFlags,
Guid  destNodeId 
)
Parameters:
cacheName Cache name.
cacheFlags Cache flags.
destNodeId Node ID to route request to.
Returns:
Metrics.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.

Implemented in GridGain.Client.Impl.GridClientConnectionAdapter, GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.

IGridClientFuture<Boolean> GridGain.Client.Impl.IGridClientConnection.CachePrepend< K, V > ( String  cacheName,
ISet< GridClientCacheFlag >  cacheFlags,
K  key,
V  val,
Guid  destNodeId 
)
Parameters:
cacheName Cache name.
cacheFlags Cache flags.
key Key of cached value.
val Value to prepend.
destNodeId Node ID to route request to.
Returns:
Whether value was actually appended.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.

Implemented in GridGain.Client.Impl.GridClientConnectionAdapter, GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.

IGridClientFuture<Boolean> GridGain.Client.Impl.IGridClientConnection.CachePut< K, V > ( String  cacheName,
ISet< GridClientCacheFlag >  cacheFlags,
K  key,
V  val,
Guid  destNodeId 
)
Parameters:
cacheName Cache name.
cacheFlags Cache flags.
key Key.
val Value.
destNodeId Node ID to route request to.
Returns:
If value was actually put.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.
IGridClientFuture<Boolean> GridGain.Client.Impl.IGridClientConnection.CachePutAll< K, V > ( String  cacheName,
ISet< GridClientCacheFlag >  cacheFlags,
IDictionary< K, V >  entries,
Guid  destNodeId 
)
Parameters:
cacheName Cache name.
cacheFlags Cache flags.
entries Entries.
destNodeId Node ID to route request to.
Returns:
True if map contained more then one entry or if put succeeded in case of one entry,

false otherwise

Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.

Implemented in GridGain.Client.Impl.GridClientTcpConnection.

IGridClientFuture<Boolean> GridGain.Client.Impl.IGridClientConnection.CacheRemove< K > ( String  cacheName,
ISet< GridClientCacheFlag >  cacheFlags,
K  key,
Guid  destNodeId 
)
Parameters:
cacheName Cache name.
cacheFlags Cache flags.
key Key.
destNodeId Node ID to route request to.
Returns:
Whether entry was actually removed.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.

Implemented in GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.

IGridClientFuture<Boolean> GridGain.Client.Impl.IGridClientConnection.CacheRemoveAll< K > ( String  cacheName,
ISet< GridClientCacheFlag >  cacheFlags,
IEnumerable< K >  keys,
Guid  destNodeId 
)
Parameters:
cacheName Cache name.
cacheFlags Cache flags.
keys Keys.
destNodeId Node ID to route request to.
Returns:
Whether operation finishes.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.

Implemented in GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.

IGridClientFuture<Boolean> GridGain.Client.Impl.IGridClientConnection.CacheReplace< K, V > ( String  cacheName,
ISet< GridClientCacheFlag >  cacheFlags,
K  key,
V  val,
Guid  destNodeId 
)
Parameters:
cacheName Cache name.
cacheFlags Cache flags.
key Key.
val Value.
destNodeId Node ID to route request to.
Returns:
Whether value was actually replaced.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.

Implemented in GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.

void GridGain.Client.Impl.IGridClientConnection.Close ( bool  waitCompletion  ) 
Parameters:
waitCompletion If true this method will wait until all pending requests are handled.

Implemented in GridGain.Client.Impl.GridClientConnectionAdapter, GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.

bool GridGain.Client.Impl.IGridClientConnection.CloseIfIdle ( TimeSpan  timeout  ) 
Returns:

Idle timeout.

True if no requests were in progress and client was closed, True otherwise.

Implemented in GridGain.Client.Impl.GridClientConnectionAdapter, GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.

IGridClientFuture<T> GridGain.Client.Impl.IGridClientConnection.Execute< T > ( String  taskName,
Object  taskArg,
Guid  destNodeId 
)
Parameters:
taskName Task name.
taskArg Task argument.
destNodeId Node ID to route request to.
Returns:
Task execution result.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.

Implemented in GridGain.Client.Impl.GridClientConnectionAdapter, GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.

IGridClientFuture<IList<String> > GridGain.Client.Impl.IGridClientConnection.Log ( String  path,
int  fromLine,
int  toLine,
Guid  destNodeId 
)
Parameters:
path Log file path.
fromLine Index of start line that should be retrieved.
toLine Index of end line that should be retrieved.
destNodeId Node ID to route request to.
Returns:
Log file contents.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.

Implemented in GridGain.Client.Impl.GridClientConnectionAdapter, GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.

IGridClientFuture<IGridClientNode> GridGain.Client.Impl.IGridClientConnection.Node ( Guid  id,
bool  includeAttrs,
bool  includeMetrics,
Guid  destNodeId 
)
Parameters:
id Node ID.
includeAttrs Whether to include attributes.
includeMetrics Whether to include metrics.
destNodeId Node ID to route request to.
Returns:
Node.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.

Implemented in GridGain.Client.Impl.GridClientConnectionAdapter, GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.

IGridClientFuture<IGridClientNode> GridGain.Client.Impl.IGridClientConnection.Node ( String  ipAddr,
bool  includeAttrs,
bool  includeMetrics,
Guid  destNodeId 
)
Parameters:
ipAddr IP address.
includeAttrs Whether to include attributes.
includeMetrics Whether to include metrics.
destNodeId Node ID to route request to.
Returns:
Node.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.

Implemented in GridGain.Client.Impl.GridClientConnectionAdapter, GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.

IGridClientFuture<IList<IGridClientNode> > GridGain.Client.Impl.IGridClientConnection.Topology ( bool  includeAttrs,
bool  includeMetrics,
Guid  destNodeId 
)
Parameters:
includeAttrs Whether to include attributes.
includeMetrics Whether to include metrics.
destNodeId Node ID to route request to.
Returns:
Nodes.
Exceptions:
GridClientConnectionResetException In case of error.
GridClientClosedException If client was manually closed before request was sent over network.

Implemented in GridGain.Client.Impl.GridClientConnectionAdapter, GridGain.Client.Impl.GridClientHttpConnection, and GridGain.Client.Impl.GridClientTcpConnection.


Property Documentation

IPEndPoint GridGain.Client.Impl.IGridClientConnection.ServerAddress [get]