Public Member Functions | Properties

GridGain.Client.IGridClientData Interface Reference

A data projection of grid client. Contains various methods for cache operations and metrics retrieval.

Inherited by GridGain.Client.Impl.GridClientDataImpl.

List of all members.

Public Member Functions

IGridClientData CacheFlagsOn (ICollection< GridClientCacheFlag > cacheFlags)
 Creates new client data object with enabled cache flags.
IGridClientData CacheFlagsOff (ICollection< GridClientCacheFlag > cacheFlags)
 Creates new client data object with disabled cache flags.
IGridClientData PinNodes (IGridClientNode node, params IGridClientNode[] nodes)
 Gets client data which will only contact specified remote grid node. By default, remote node is determined based on IGridClientDataAffinity provided - this method allows to override default behavior and use only specified server for all cache operations. Use this method when there are other than key-affinity reasons why a certain node should be contacted.
ICollection< IGridClientNode > PinnedNodes ()
 Gets pinned node or null if no node was pinned.
bool Put< TKey, TVal > (TKey key, TVal val)
 Puts value to default cache.
IGridClientFuture< Boolean > PutAsync< TKey, TVal > (TKey key, TVal val)
 Asynchronously puts value to default cache.
Boolean PutAll< TKey, TVal > (IDictionary< TKey, TVal > entries)
 Puts entries to default cache.
IGridClientFuture< Boolean > PutAllAsync< TKey, TVal > (IDictionary< TKey, TVal > entries)
 Asynchronously puts entries to default cache.
TVal GetItem< TKey, TVal > (TKey key)
 Gets value from default cache.
IGridClientFuture< TVal > GetAsync< TKey, TVal > (TKey key)
 Asynchronously gets value from default cache.
IDictionary< TKey, TVal > GetAll< TKey, TVal > (ICollection< TKey > keys)
 Gets entries from default cache.
IGridClientFuture< IDictionary
< TKey, TVal > > 
GetAllAsync< TKey, TVal > (ICollection< TKey > keys)
 Asynchronously gets entries from default cache.
bool Remove< TKey > (TKey key)
 Removes value from default cache.
IGridClientFuture< Boolean > RemoveAsync< TKey > (TKey key)
 Asynchronously removes value from default cache.
void RemoveAll< TKey > (ICollection< TKey > keys)
 Removes entries from default cache.
IGridClientFuture RemoveAllAsync< TKey > (ICollection< TKey > keys)
 Asynchronously removes entries from default cache.
bool Replace< TKey, TVal > (TKey key, TVal val)
 Replaces value in default cache.
IGridClientFuture< Boolean > ReplaceAsync< TKey, TVal > (TKey key, TVal val)
 Asynchronously replaces value in default cache.
Boolean Append< TKey, TVal > (TKey key, TVal val)
 Append requested value to already cached one. This method supports work with strings, lists and maps. Note that this operation is affinity-aware and will immediately contact exactly the remote node on which this key is supposed to be cached (unless some nodes were pinned).
IGridClientFuture< Boolean > AppendAsync< TKey, TVal > (TKey key, TVal val)
 Append requested value to already cached one. This method supports work with strings, lists and maps. Note that this operation is affinity-aware and will immediately contact exactly the remote node on which this key is supposed to be cached (unless some nodes were pinned).
Boolean Prepend< TKey, TVal > (TKey key, TVal val)
 Prepend requested value to already cached one. This method supports work with strings, lists and maps. Note that this operation is affinity-aware and will immediately contact exactly the remote node on which this key is supposed to be cached (unless some nodes were pinned).
IGridClientFuture< Boolean > PrependAsync< TKey, TVal > (TKey key, TVal val)
 Prepend requested value to already cached one. This method supports work with strings, lists and maps. Note that this operation is affinity-aware and will immediately contact exactly the remote node on which this key is supposed to be cached (unless some nodes were pinned).
bool Cas (String key, String val1, String val2)
 Sets entry value to val1 if current value is val1. If val1 is val2 and val2 is equal to current value, entry is removed from cache. If val2 is val1, entry is created if it doesn't exist. If both val1 and val1 are val1, entry is removed.
IGridClientFuture< Boolean > CasAsync (String key, String val1, String val2)
 Asynchronously sets entry value to val1 if current value is val1. If val1 is val2 and val2 is equal to current value, entry is removed from cache. If val2 is val1, entry is created if it doesn't exist. If both val1 and null are null, entry is removed.
Guid Affinity< TKey > (TKey key)
 Gets affinity node ID for provided key. This method will return null if no affinity was configured for the given cache or there are no nodes in topology with cache enabled.
IGridClientDataMetrics Metrics ()
 Gets metrics for default cache.
IGridClientFuture
< IGridClientDataMetrics > 
MetricsAsync ()
 Asynchronously gets metrics for default cache.

Properties

String CacheName [get]
 Gets name of the remote cache.
ISet< GridClientCacheFlag > CacheFlags [get]
 Gets cache flags of the remote cache.

Member Function Documentation

Guid GridGain.Client.IGridClientData.Affinity< TKey > ( TKey  key  ) 
Parameters:
key Key.
Returns:
Node ID.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

Boolean GridGain.Client.IGridClientData.Append< TKey, TVal > ( TKey  key,
TVal  val 
)
Parameters:
key Key to manipulate cache value for.
val Value to append to the cached one.
Returns:
Whether value of entry was changed.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientFuture<Boolean> GridGain.Client.IGridClientData.AppendAsync< TKey, TVal > ( TKey  key,
TVal  val 
)
Parameters:
key Key to manipulate cache value for.
val Value to append to the cached one.
Returns:
Future whether value of entry was changed.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientData GridGain.Client.IGridClientData.CacheFlagsOff ( ICollection< GridClientCacheFlag >  cacheFlags  ) 
Parameters:
cacheFlags Cache flags to be disabled.
Returns:
New client data object.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientData GridGain.Client.IGridClientData.CacheFlagsOn ( ICollection< GridClientCacheFlag >  cacheFlags  ) 
Parameters:
cacheFlags Cache flags to be disabled.
Returns:
New client data object.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

bool GridGain.Client.IGridClientData.Cas ( String  key,
String  val1,
String  val2 
)
Parameters:
key Key.
val1 Value to set.
val2 Check value.
Returns:
Whether value of entry was changed.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientFuture<Boolean> GridGain.Client.IGridClientData.CasAsync ( String  key,
String  val1,
String  val2 
)
Parameters:
key Key.
val1 Value to set.
val2 Check value.
Returns:
Future whether value of entry was changed.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IDictionary<TKey, TVal> GridGain.Client.IGridClientData.GetAll< TKey, TVal > ( ICollection< TKey >  keys  ) 
Parameters:
keys Keys.
Exceptions:
GridClientException In case of error.
Returns:
Entries.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientFuture<IDictionary<TKey, TVal> > GridGain.Client.IGridClientData.GetAllAsync< TKey, TVal > ( ICollection< TKey >  keys  ) 
Parameters:
keys Keys.
Returns:
Future with entries retrieved from remote cache nodes.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientFuture<TVal> GridGain.Client.IGridClientData.GetAsync< TKey, TVal > ( TKey  key  ) 
Parameters:
key key.
Returns:
Future with value for given key or with null if no value was cached.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

TVal GridGain.Client.IGridClientData.GetItem< TKey, TVal > ( TKey  key  ) 
Parameters:
key Key.
Returns:
Value.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientDataMetrics GridGain.Client.IGridClientData.Metrics (  ) 
Returns:
Cache metrics.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientFuture<IGridClientDataMetrics> GridGain.Client.IGridClientData.MetricsAsync (  ) 
Returns:
Future with cache metrics.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

ICollection<IGridClientNode> GridGain.Client.IGridClientData.PinnedNodes (  ) 
Returns:
Pinned node.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientData GridGain.Client.IGridClientData.PinNodes ( IGridClientNode  node,
params IGridClientNode[]  nodes 
)
Parameters:
node Node to be contacted.
nodes Optional additional nodes.
Returns:
Client data which will only contact server with given node ID.
Exceptions:
GridClientException If resulting projection is empty.
Boolean GridGain.Client.IGridClientData.Prepend< TKey, TVal > ( TKey  key,
TVal  val 
)
Parameters:
key Key to manipulate cache value for.
val Value to prepend to the cached one.
Returns:
Whether value of entry was changed.

GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientFuture<Boolean> GridGain.Client.IGridClientData.PrependAsync< TKey, TVal > ( TKey  key,
TVal  val 
)
Parameters:
key Key to manipulate cache value for.
val Value to prepend to the cached one.
Returns:
Future whether value of entry was changed.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

bool GridGain.Client.IGridClientData.Put< TKey, TVal > ( TKey  key,
TVal  val 
)
Parameters:
key Key.
val Value.
Returns:
Whether value was actually put to cache.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

Boolean GridGain.Client.IGridClientData.PutAll< TKey, TVal > ( IDictionary< TKey, TVal >  entries  ) 
Parameters:
entries Entries.
Returns:
True if map contained more then one entry or if put succeeded in case of one entry,

false otherwise

Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientFuture<Boolean> GridGain.Client.IGridClientData.PutAllAsync< TKey, TVal > ( IDictionary< TKey, TVal >  entries  ) 
Parameters:
entries Entries.
Returns:
Future whether this operation completes.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientFuture<Boolean> GridGain.Client.IGridClientData.PutAsync< TKey, TVal > ( TKey  key,
TVal  val 
)
Parameters:
key key.
val Value.
Returns:
Future whether value was actually put to cache.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

bool GridGain.Client.IGridClientData.Remove< TKey > ( TKey  key  ) 
Parameters:
key Key.
Returns:
Whether value was actually removed.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

void GridGain.Client.IGridClientData.RemoveAll< TKey > ( ICollection< TKey >  keys  ) 
Parameters:
keys Keys.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientFuture GridGain.Client.IGridClientData.RemoveAllAsync< TKey > ( ICollection< TKey >  keys  ) 
Parameters:
keys Keys.
Returns:
Future whether operation finishes.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientFuture<Boolean> GridGain.Client.IGridClientData.RemoveAsync< TKey > ( TKey  key  ) 
Parameters:
key key.
Returns:
Future whether entry was actually removed.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

bool GridGain.Client.IGridClientData.Replace< TKey, TVal > ( TKey  key,
TVal  val 
)
Parameters:
key Key.
val Value.
Returns:
Whether value was actually replaced.
Exceptions:
GridClientException In case of error.

Implemented in GridGain.Client.Impl.GridClientDataImpl.

IGridClientFuture<Boolean> GridGain.Client.IGridClientData.ReplaceAsync< TKey, TVal > ( TKey  key,
TVal  val 
)
Parameters:
key key.
val Value.
Returns:
Future whether value was actually replaced.

Implemented in GridGain.Client.Impl.GridClientDataImpl.


Property Documentation

ISet<GridClientCacheFlag> GridGain.Client.IGridClientData.CacheFlags [get]
String GridGain.Client.IGridClientData.CacheName [get]