JBoss Data Grid HotRod C# Client
7.2.0
|
Provides remote reference to a Hot Rod server/cluster. More...
Public Member Functions | |
string | GetName () |
Retrieves the name of the cache. More... | |
string | GetVersion () |
Retrieves the Infinispan version. More... | |
string | GetProtocolVersion () |
Returns the HotRod protocol version supported by this RemoteCache implementation. More... | |
ulong | Size () |
Retrieves the number of records of the cache. More... | |
bool | IsEmpty () |
Used to check whether the cache is empty or not. More... | |
ServerStatistics | Stats () |
Used to retreive statistical information about the remote cache. More... | |
V | Put (K key, V val, ulong lifespan, TimeUnit lifespanUnit) |
Insert a new entry into the cache with the specified lifetime. More... | |
V | Put (K key, V val, ulong lifespan, TimeUnit lifespanUnit, ulong maxIdleTime, TimeUnit maxIdleUnit) |
Insert a new entry into the cache with the specified lifetime and max idle time. More... | |
V | Put (K key, V val) |
Insert a new entry into the cache. More... | |
V | PutIfAbsent (K key, V val, ulong lifespan, TimeUnit lifespanUnit, ulong maxIdleTime, TimeUnit maxIdleUnit) |
If the specified key is absent inserts a new entry into the cache with the specified lifetime and max idle time. More... | |
V | PutIfAbsent (K key, V val, ulong lifespan, TimeUnit lifespanUnit) |
If the specified key is absent inserts a new entry into the cache with the specified lifetime. More... | |
V | PutIfAbsent (K key, V val) |
If the specified key is absent inserts a new entry into the cache. More... | |
void | PutAll (IDictionary< K, V > map, ulong lifespan, TimeUnit lifespanUnit, ulong maxIdleTime, TimeUnit maxIdleUnit) |
Puts all the entries in the given map in the cache and for each entry sets lifespan and maxidle to the values provided. More... | |
void | PutAll (IDictionary< K, V > map, ulong lifespan, TimeUnit lifespanUnit) |
Puts all the entries in the given map in the cache and for each entry sets lifespan to the value provided. More... | |
void | PutAll (IDictionary< K, V > map) |
Puts all the entries in the given map in the cache. More... | |
V | Replace (K key, V val, ulong lifespan, TimeUnit lifespanUnit, ulong maxIdleTime, TimeUnit maxIdleUnit) |
Replaces an existing value with a new one with the specified lifetime and max idle time. More... | |
V | Replace (K key, V val, ulong lifespan, TimeUnit lifespanUnit) |
Replaces an existing value with a new one with the specified lifetime. More... | |
V | Replace (K key, V val) |
Replaces an existing value with a new value. More... | |
bool | ContainsKey (K key) |
Checks whether the passes key exists in the cache. More... | |
bool | ContainsValue (V val) |
Checks whether the passes value exists in the cache. More... | |
V | Get (K key) |
Retrieve from the cache the value associated with the given key. More... | |
IDictionary< K, V > | GetAll (ISet< K > keySet) |
Retrieve from the cache the values associated with the given key set. More... | |
IDictionary< K, V > | GetBulk (int size) |
Bulk get operations, returns the entries within the remote cache limiting the returned set of values to the specified size. No ordering is guaranteed, and there is no guarantee that "size" elements are returned (e.g. if the number of elements in the back-end server is smaller that "size") More... | |
IDictionary< K, V > | GetBulk () |
Bulk get operations, returns all the entries within the remote cache. More... | |
V | Remove (K key) |
Removes from the cache the value associated with the given key. More... | |
void | Clear () |
Clears the cache. More... | |
IVersionedValue< V > | GetVersioned (K key) |
Returns the VersionedValue associated to the supplied key param, or null if it doesn't exist. More... | |
IMetadataValue< V > | GetWithMetadata (K key) |
Returns the MetadataValue associated to the supplied key param, or null if it doesn't exist. More... | |
bool | RemoveWithVersion (K key, ulong version) |
Removes the given value only if its version matches the supplied version. More... | |
bool | ReplaceWithVersion (K key, V val, ulong version, ulong lifespan, ulong maxIdleTime) |
Replaces the given value only if its version matches the supplied version. More... | |
bool | ReplaceWithVersion (K key, V val, ulong version, ulong lifespan) |
Replaces the given value only if its version matches the supplied version. More... | |
bool | ReplaceWithVersion (K key, V val, ulong version) |
Replaces the given value only if its version matches the supplied version. More... | |
ISet< KeyValuePair< K, V > > | EntrySet () |
Returns the set of entries present in the cache. More... | |
ISet< K > | KeySet () |
Returns the set of keys present in the cache. More... | |
IList< V > | Values () |
Returns the set of values present in the cache. More... | |
IRemoteCache< K, V > | WithFlags (Flags flags) |
Applies one or more flags to the scope of a single invocation. More... | |
QueryResponse | Query (QueryRequest query) |
Query the cache More... | |
object | Execute (String scriptName, IDictionary< String, Object > dict=null) |
Execute a script on the server More... | |
Task< V > | GetAsync (K key) |
Async version of the Get method More... | |
Task< V > | PutAsync (K key, V val, ulong lifespan=0, TimeUnit lifespanUnit=TimeUnit.MILLISECONDS, ulong maxIdleTime=0, TimeUnit maxIdleUnit=TimeUnit.MILLISECONDS) |
Async version of the Put method More... | |
Task | PutAllAsync (IDictionary< K, V > map, ulong lifespan=0, TimeUnit lifespanUnit=TimeUnit.MILLISECONDS, ulong maxIdleTime=0, TimeUnit maxIdleUnit=TimeUnit.MILLISECONDS) |
Async version of the PutAll method More... | |
Task< V > | PutIfAbsentAsync (K key, V val, ulong lifespan=0, TimeUnit lifespanUnit=TimeUnit.MILLISECONDS, ulong maxIdleTime=0, TimeUnit maxIdleUnit=TimeUnit.MILLISECONDS) |
Async version of the PutIfAbsent method More... | |
Task< V > | ReplaceAsync (K key, V val, ulong lifespan=0, TimeUnit lifespanUnit=TimeUnit.MILLISECONDS, ulong maxIdleTime=0, TimeUnit maxIdleUnit=TimeUnit.MILLISECONDS) |
Async version of the Replace method More... | |
Task< V > | RemoveAsync (K key) |
Async version of the Replace method More... | |
Task | ClearAsync () |
Async version of the Clear method More... | |
Task< bool > | ReplaceWithVersionAsync (K key, V val, ulong version, ulong lifespan=0, ulong maxIdleTime=0) |
Async version of the ReplaceWithVersion method More... | |
Task< bool > | RemoveWithVersionAsync (K key, ulong version) |
Async version of the RemoveWithVersion method More... | |
void | AddClientListener (Event.ClientListener< K, V > cl, string[] filterFactoryParams, string[] converterFactoryParams, Action recoveryCallback) |
void | AddContinuousQueryListener< CQK, CQV > (Event.ContinuousQueryListener< CQK, CQV > cql) |
Register a continuous query listener on the server More... | |
void | RemoveClientListener (Event.ClientListener< K, V > cl) |
void | RemoveContinuousQueryListener< CQK, CQV > (Event.ContinuousQueryListener< CQK, CQV > cql) |
Unregister a continuous query listener from the server More... | |
Provides remote reference to a Hot Rod server/cluster.
Concurrency: implementors of this interface will support multi-threaded access.
Return values: previously existing values for certain operations are not returned, null is returned instead.
Synthetic operations: aggregate operations are being implemented based on other Hot Rod operations. E.g. GetBulk is implemented through multiple individual gets. This means that the these operations are not atomic and that they are costly since the number of network round-trips is not one.
changing default behavior through Flags: it is possible to change the default cache behaviour by using flags.
In the previous example, using ForceRetunValue will make the client to also return previously existing value associated with "aKey". If this flag would not be present, Infinispan would return (by default) null. This is in order to avoid fetching a possibly large object from the remote server, which might not be needed.
Eviction and expiration: Unlike local cache, which allows specifying time values with any granularity, HotRod only supports seconds as time units. When using .NET Hotrod Client library, you can use milliseconds also but it will result in loss of precision for values specified as nanos or milliseconds. Another fundamental difference is in the case of lifespan (naturally does NOT apply for max idle): If number of seconds is bigger than 30 days, this number of seconds is treated as UNIX time and so, represents the number of seconds since 1/1/1970. Passing 0 as maxIdle and lifeSpan (which are also default values) these values are set to infinity.
void Infinispan.HotRod.IRemoteCache< K, V >.AddClientListener | ( | Event.ClientListener< K, V > | cl, |
string[] | filterFactoryParams, | ||
string[] | converterFactoryParams, | ||
Action | recoveryCallback | ||
) |
cl | |
filterFactoryParams | |
converterFactoryParams | |
recoveryCallback |
void Infinispan.HotRod.IRemoteCache< K, V >.AddContinuousQueryListener< CQK, CQV > | ( | Event.ContinuousQueryListener< CQK, CQV > | cql | ) |
Register a continuous query listener on the server
cql | The listener to be installed |
void Infinispan.HotRod.IRemoteCache< K, V >.Clear | ( | ) |
Clears the cache.
Task Infinispan.HotRod.IRemoteCache< K, V >.ClearAsync | ( | ) |
Async version of the Clear method
bool Infinispan.HotRod.IRemoteCache< K, V >.ContainsKey | ( | K | key | ) |
Checks whether the passes key exists in the cache.
key | key |
bool Infinispan.HotRod.IRemoteCache< K, V >.ContainsValue | ( | V | val | ) |
Checks whether the passes value exists in the cache.
val | value |
ISet<KeyValuePair<K, V> > Infinispan.HotRod.IRemoteCache< K, V >.EntrySet | ( | ) |
Returns the set of entries present in the cache.
object Infinispan.HotRod.IRemoteCache< K, V >.Execute | ( | String | scriptName, |
IDictionary< String, Object > | dict = null |
||
) |
Execute a script on the server
scriptName | script name |
dict | map of the arguments |
V Infinispan.HotRod.IRemoteCache< K, V >.Get | ( | K | key | ) |
Retrieve from the cache the value associated with the given key.
key | key |
IDictionary<K,V> Infinispan.HotRod.IRemoteCache< K, V >.GetAll | ( | ISet< K > | keySet | ) |
Retrieve from the cache the values associated with the given key set.
keySet | the key set |
Task<V> Infinispan.HotRod.IRemoteCache< K, V >.GetAsync | ( | K | key | ) |
Async version of the Get method
key | key |
IDictionary<K, V> Infinispan.HotRod.IRemoteCache< K, V >.GetBulk | ( | int | size | ) |
Bulk get operations, returns the entries within the remote cache limiting the returned set of values to the specified size. No ordering is guaranteed, and there is no guarantee that "size" elements are returned (e.g. if the number of elements in the back-end server is smaller that "size")
size | limit on the number of elements to be returned |
IDictionary<K, V> Infinispan.HotRod.IRemoteCache< K, V >.GetBulk | ( | ) |
Bulk get operations, returns all the entries within the remote cache.
string Infinispan.HotRod.IRemoteCache< K, V >.GetName | ( | ) |
Retrieves the name of the cache.
string Infinispan.HotRod.IRemoteCache< K, V >.GetProtocolVersion | ( | ) |
Returns the HotRod protocol version supported by this RemoteCache implementation.
string Infinispan.HotRod.IRemoteCache< K, V >.GetVersion | ( | ) |
Retrieves the Infinispan version.
IVersionedValue<V> Infinispan.HotRod.IRemoteCache< K, V >.GetVersioned | ( | K | key | ) |
Returns the VersionedValue associated to the supplied key param, or null if it doesn't exist.
key |
IMetadataValue<V> Infinispan.HotRod.IRemoteCache< K, V >.GetWithMetadata | ( | K | key | ) |
Returns the MetadataValue associated to the supplied key param, or null if it doesn't exist.
key | key |
bool Infinispan.HotRod.IRemoteCache< K, V >.IsEmpty | ( | ) |
Used to check whether the cache is empty or not.
ISet<K> Infinispan.HotRod.IRemoteCache< K, V >.KeySet | ( | ) |
Returns the set of keys present in the cache.
V Infinispan.HotRod.IRemoteCache< K, V >.Put | ( | K | key, |
V | val, | ||
ulong | lifespan, | ||
TimeUnit | lifespanUnit | ||
) |
Insert a new entry into the cache with the specified lifetime.
key | key |
val | value |
lifespan | lifespan in the specified time unit |
lifespanUnit | the unit of time for lifespan |
V Infinispan.HotRod.IRemoteCache< K, V >.Put | ( | K | key, |
V | val, | ||
ulong | lifespan, | ||
TimeUnit | lifespanUnit, | ||
ulong | maxIdleTime, | ||
TimeUnit | maxIdleUnit | ||
) |
Insert a new entry into the cache with the specified lifetime and max idle time.
key | key |
val | value |
lifespan | lifespan in the specified time unit |
lifespanUnit | the unit of time for lifespan |
maxIdleTime | maximum idle time in in the specified time unit |
maxIdleUnit | the unit of time for maximum idle time |
V Infinispan.HotRod.IRemoteCache< K, V >.Put | ( | K | key, |
V | val | ||
) |
Insert a new entry into the cache.
key | key |
val | value |
void Infinispan.HotRod.IRemoteCache< K, V >.PutAll | ( | IDictionary< K, V > | map, |
ulong | lifespan, | ||
TimeUnit | lifespanUnit, | ||
ulong | maxIdleTime, | ||
TimeUnit | maxIdleUnit | ||
) |
Puts all the entries in the given map in the cache and for each entry sets lifespan and maxidle to the values provided.
map | the entries to add |
lifespan | lifespan in the specified time unit |
lifespanUnit | the unit of time for lifespan |
maxIdleTime | maximum idle time in in the specified time unit |
maxIdleUnit | the unit of time for maximum idle time |
void Infinispan.HotRod.IRemoteCache< K, V >.PutAll | ( | IDictionary< K, V > | map, |
ulong | lifespan, | ||
TimeUnit | lifespanUnit | ||
) |
Puts all the entries in the given map in the cache and for each entry sets lifespan to the value provided.
map | the entries to add |
lifespan | lifespan in the specified time unit |
lifespanUnit | the unit of time for lifespan |
void Infinispan.HotRod.IRemoteCache< K, V >.PutAll | ( | IDictionary< K, V > | map | ) |
Puts all the entries in the given map in the cache.
map | the entries to add |
Task Infinispan.HotRod.IRemoteCache< K, V >.PutAllAsync | ( | IDictionary< K, V > | map, |
ulong | lifespan = 0 , |
||
TimeUnit | lifespanUnit = TimeUnit.MILLISECONDS , |
||
ulong | maxIdleTime = 0 , |
||
TimeUnit | maxIdleUnit = TimeUnit.MILLISECONDS |
||
) |
Async version of the PutAll method
map | the entries to add |
lifespan | lifespan in the specified time unit |
lifespanUnit | the unit of time for lifespan |
maxIdleTime | maximum idle time in in the specified time unit |
maxIdleUnit | the unit of time for maximum idle time |
Task<V> Infinispan.HotRod.IRemoteCache< K, V >.PutAsync | ( | K | key, |
V | val, | ||
ulong | lifespan = 0 , |
||
TimeUnit | lifespanUnit = TimeUnit.MILLISECONDS , |
||
ulong | maxIdleTime = 0 , |
||
TimeUnit | maxIdleUnit = TimeUnit.MILLISECONDS |
||
) |
Async version of the Put method
key | key |
val | value |
lifespan | lifespan in the specified time unit |
lifespanUnit | the unit of time for lifespan |
maxIdleTime | maximum idle time in in the specified time unit |
maxIdleUnit | the unit of time for maximum idle time |
V Infinispan.HotRod.IRemoteCache< K, V >.PutIfAbsent | ( | K | key, |
V | val, | ||
ulong | lifespan, | ||
TimeUnit | lifespanUnit, | ||
ulong | maxIdleTime, | ||
TimeUnit | maxIdleUnit | ||
) |
If the specified key is absent inserts a new entry into the cache with the specified lifetime and max idle time.
key | key |
val | value |
lifespan | lifespan in the specified time unit |
lifespanUnit | the unit of time for lifespan |
maxIdleTime | maximum idle time in in the specified time unit |
maxIdleUnit | the unit of time for maximum idle time |
V Infinispan.HotRod.IRemoteCache< K, V >.PutIfAbsent | ( | K | key, |
V | val, | ||
ulong | lifespan, | ||
TimeUnit | lifespanUnit | ||
) |
If the specified key is absent inserts a new entry into the cache with the specified lifetime.
key | key |
val | value |
lifespan | lifespan in the specified time unit |
lifespanUnit | the unit of time for lifespan |
V Infinispan.HotRod.IRemoteCache< K, V >.PutIfAbsent | ( | K | key, |
V | val | ||
) |
If the specified key is absent inserts a new entry into the cache.
key | key |
val | value |
Task<V> Infinispan.HotRod.IRemoteCache< K, V >.PutIfAbsentAsync | ( | K | key, |
V | val, | ||
ulong | lifespan = 0 , |
||
TimeUnit | lifespanUnit = TimeUnit.MILLISECONDS , |
||
ulong | maxIdleTime = 0 , |
||
TimeUnit | maxIdleUnit = TimeUnit.MILLISECONDS |
||
) |
Async version of the PutIfAbsent method
key | key |
val | value |
lifespan | lifespan in the specified time unit |
lifespanUnit | the unit of time for lifespan |
maxIdleTime | maximum idle time in in the specified time unit |
maxIdleUnit | the unit of time for maximum idle time |
QueryResponse Infinispan.HotRod.IRemoteCache< K, V >.Query | ( | QueryRequest | query | ) |
Query the cache
query | the query sring |
QueryRequest qReq = new QueryResponse(); qReq.QueryString="from sample_bank_account.User"; QueryResponse qRes= remoteCache.query(qReq);
V Infinispan.HotRod.IRemoteCache< K, V >.Remove | ( | K | key | ) |
Removes from the cache the value associated with the given key.
key | Key |
Task<V> Infinispan.HotRod.IRemoteCache< K, V >.RemoveAsync | ( | K | key | ) |
Async version of the Replace method
key | key |
void Infinispan.HotRod.IRemoteCache< K, V >.RemoveClientListener | ( | Event.ClientListener< K, V > | cl | ) |
cl | ClientListener to be removed |
void Infinispan.HotRod.IRemoteCache< K, V >.RemoveContinuousQueryListener< CQK, CQV > | ( | Event.ContinuousQueryListener< CQK, CQV > | cql | ) |
Unregister a continuous query listener from the server
cql | ContinuousQueryListener to be removed |
bool Infinispan.HotRod.IRemoteCache< K, V >.RemoveWithVersion | ( | K | key, |
ulong | version | ||
) |
Removes the given value only if its version matches the supplied version.
key | key |
version | version numeric version that should match the one in the server for the operation to succeed |
Task<bool> Infinispan.HotRod.IRemoteCache< K, V >.RemoveWithVersionAsync | ( | K | key, |
ulong | version | ||
) |
Async version of the RemoveWithVersion method
key | key |
version | version numeric version that should match the one in the server for the operation to succeed |
V Infinispan.HotRod.IRemoteCache< K, V >.Replace | ( | K | key, |
V | val, | ||
ulong | lifespan, | ||
TimeUnit | lifespanUnit, | ||
ulong | maxIdleTime, | ||
TimeUnit | maxIdleUnit | ||
) |
Replaces an existing value with a new one with the specified lifetime and max idle time.
key | key |
val | value |
lifespan | lifespan in the specified time unit |
lifespanUnit | the unit of time for lifespan |
maxIdleTime | maximum idle time in in the specified time unit |
maxIdleUnit | the unit of time for maximum idle time |
V Infinispan.HotRod.IRemoteCache< K, V >.Replace | ( | K | key, |
V | val, | ||
ulong | lifespan, | ||
TimeUnit | lifespanUnit | ||
) |
Replaces an existing value with a new one with the specified lifetime.
key | key |
val | value |
lifespan | lifespan in the specified time unit |
lifespanUnit | the unit of time for lifespan |
V Infinispan.HotRod.IRemoteCache< K, V >.Replace | ( | K | key, |
V | val | ||
) |
Replaces an existing value with a new value.
key | key |
val | value |
Task<V> Infinispan.HotRod.IRemoteCache< K, V >.ReplaceAsync | ( | K | key, |
V | val, | ||
ulong | lifespan = 0 , |
||
TimeUnit | lifespanUnit = TimeUnit.MILLISECONDS , |
||
ulong | maxIdleTime = 0 , |
||
TimeUnit | maxIdleUnit = TimeUnit.MILLISECONDS |
||
) |
Async version of the Replace method
key | key |
val | value |
lifespan | lifespan in the specified time unit |
lifespanUnit | the unit of time for lifespan |
maxIdleTime | maximum idle time in in the specified time unit |
maxIdleUnit | the unit of time for maximum idle time |
bool Infinispan.HotRod.IRemoteCache< K, V >.ReplaceWithVersion | ( | K | key, |
V | val, | ||
ulong | version, | ||
ulong | lifespan, | ||
ulong | maxIdleTime | ||
) |
Replaces the given value only if its version matches the supplied version.
key | key |
val | value |
version | version numeric version that should match the one in the server for the operation to succeed |
lifespan | the lifespan of the new entry |
maxIdleTime | the max idle time of the new entry |
bool Infinispan.HotRod.IRemoteCache< K, V >.ReplaceWithVersion | ( | K | key, |
V | val, | ||
ulong | version, | ||
ulong | lifespan | ||
) |
Replaces the given value only if its version matches the supplied version.
key | key |
val | value |
version | version numeric version that should match the one in the server for the operation to succeed |
lifespan | the lifespan of the new entry |
bool Infinispan.HotRod.IRemoteCache< K, V >.ReplaceWithVersion | ( | K | key, |
V | val, | ||
ulong | version | ||
) |
Replaces the given value only if its version matches the supplied version.
key | key |
val | value |
version | version numeric version that should match the one in the server for the operation to succeed |
Task<bool> Infinispan.HotRod.IRemoteCache< K, V >.ReplaceWithVersionAsync | ( | K | key, |
V | val, | ||
ulong | version, | ||
ulong | lifespan = 0 , |
||
ulong | maxIdleTime = 0 |
||
) |
Async version of the ReplaceWithVersion method
key | key |
val | value |
version | version numeric version that should match the one in the server for the operation to succeed |
lifespan | the lifespan of the new entry |
maxIdleTime | the max idle time of the new entry |
ulong Infinispan.HotRod.IRemoteCache< K, V >.Size | ( | ) |
Retrieves the number of records of the cache.
ServerStatistics Infinispan.HotRod.IRemoteCache< K, V >.Stats | ( | ) |
Used to retreive statistical information about the remote cache.
IList<V> Infinispan.HotRod.IRemoteCache< K, V >.Values | ( | ) |
Returns the set of values present in the cache.
IRemoteCache<K, V> Infinispan.HotRod.IRemoteCache< K, V >.WithFlags | ( | Flags | flags | ) |
Applies one or more flags to the scope of a single invocation.
remoteCache.WithFlags(Flags.FORCE_RETURN_VALUE | Flags.DEFAULT_LIFETIME).put("hello", "world");