Infinispan.Hotrod.Core 0.0.3
.NET Core client for Infinispan Hotrod Protocol
|
Public Member Functions | |
Cache (InfinispanDG ispnCluster, Marshaller< K > keyM, Marshaller< V > valM, string name) | |
async Task< V > | Get (K key) |
Get an entry from the cache More... | |
async Task< ValueWithVersion< V > > | GetWithVersion (K key) |
Get an entry from the cache with its version More... | |
async Task< ValueWithMetadata< V > > | GetWithMetadata (K key) |
Get an entry from the cache with its metadata More... | |
async Task< V > | Put (K key, V value, ExpirationTime lifespan=null, ExpirationTime maxidle=null) |
Put/replace an entry in the cache More... | |
async Task< V > | PutIfAbsent (K key, V value, ExpirationTime lifespan=null, ExpirationTime maxidle=null) |
Put an entry in the cache if absent, does nothing otherwise More... | |
async Task< Int32 > | Size () |
Return the number of entries in a cache More... | |
async Task< Boolean > | ContainsKey (K key) |
Check if an entry with the given key is present More... | |
async Task<(V PrevValue, Boolean Removed)> | Remove (K key) |
Remove an entry from the cache More... | |
async Task | Clear () |
Clear the cache | |
async Task< Boolean > | IsEmpty () |
Return true is the cache is empty | |
async Task< ServerStatistics > | Stats () |
Acquire some cache/cluster statistics More... | |
async Task<(V PrevValue, Boolean Replaced)> | Replace (K key, V value, ExpirationTime lifespan=null, ExpirationTime maxidle=null) |
Replace an entry value More... | |
async Task< Boolean > | ReplaceWithVersion (K key, V value, Int64 version, ExpirationTime lifeSpan=null, ExpirationTime maxIdle=null) |
Replace the value of an entry with the given version More... | |
async Task<(V V, Boolean Removed)> | RemoveWithVersion (K key, Int64 version) |
Remove an entry with the given version More... | |
async Task< QueryResponse > | Query (QueryRequest query) |
Run a query on the cache More... | |
async Task< List< Object > > | Query (String query) |
A simplified method to run query More... | |
async Task< ISet< K > > | KeySet () |
Returns the set of all the cache entry keys | |
async Task | PutAll (Dictionary< K, V > map, ExpirationTime lifespan=null, ExpirationTime maxidle=null) |
Put in the cache all the entries in the map More... | |
async Task< IDictionary< K, V > > | GetAll (ISet< K > keys) |
Get all the entries matching the keys in the set More... | |
IPartResult< IDictionary< K, V > > | GetAllPart (ISet< K > keys) |
An optimized for speed version of GetAll More... | |
IPartResult | PutAllPart (IDictionary< K, V > map, ExpirationTime lifespan=null, ExpirationTime maxidle=null) |
An optimized for speed version of GetAll More... | |
async Task< PingResult > | Ping () |
ping operation More... | |
async Task | AddListener (IClientListener listener, bool includeState=false) |
Add a listener for events to this cache More... | |
async Task | RemoveListener (IClientListener listener) |
Remove the listener from the cache More... | |
Public Member Functions inherited from Infinispan.Hotrod.Core.CacheBase | |
CacheBase (InfinispanDG ispnCluster, string name) | |
Additional Inherited Members | |
Public Attributes inherited from Infinispan.Hotrod.Core.CacheBase | |
readonly string | Name |
bool | ForceReturnValue |
MediaType | KeyMediaType |
MediaType | ValueMediaType |
readonly byte[] | NameAsBytes |
bool | UseCacheDefaultLifespan |
bool | UseCacheDefaultMaxIdle |
readonly Codec30 | codec |
Properties inherited from Infinispan.Hotrod.Core.CacheBase | |
InfinispanDG | Cluster [get] |
Int32 | Flags [get] |
async Task Infinispan.Hotrod.Core.Cache< K, V >.AddListener | ( | IClientListener | listener, |
bool | includeState = false |
||
) |
Add a listener for events to this cache
listener | the listener |
includeState | wether or not to return the initial cache state |
async Task< Boolean > Infinispan.Hotrod.Core.Cache< K, V >.ContainsKey | ( | K | key | ) |
Check if an entry with the given key is present
key | key of the entry |
async Task< V > Infinispan.Hotrod.Core.Cache< K, V >.Get | ( | K | key | ) |
Get an entry from the cache
key | key of the entry |
async Task< IDictionary< K, V > > Infinispan.Hotrod.Core.Cache< K, V >.GetAll | ( | ISet< K > | keys | ) |
Get all the entries matching the keys in the set
keys | the key set |
IPartResult< IDictionary< K, V > > Infinispan.Hotrod.Core.Cache< K, V >.GetAllPart | ( | ISet< K > | keys | ) |
An optimized for speed version of GetAll
This splits the given getall is several getall operation each of which contains keys of a specific owner. Then all the operations are sent to the relative owner. Answers are collected and returned in a single result. This operation is not atomic and could "partially" fail. TODO Allow user to await for the result
keys | the key set |
async Task< ValueWithMetadata< V > > Infinispan.Hotrod.Core.Cache< K, V >.GetWithMetadata | ( | K | key | ) |
Get an entry from the cache with its metadata
key | key of the entry |
async Task< ValueWithVersion< V > > Infinispan.Hotrod.Core.Cache< K, V >.GetWithVersion | ( | K | key | ) |
Get an entry from the cache with its version
key | key of the entry |
async Task< PingResult > Infinispan.Hotrod.Core.Cache< K, V >.Ping | ( | ) |
ping operation
async Task< V > Infinispan.Hotrod.Core.Cache< K, V >.Put | ( | K | key, |
V | value, | ||
ExpirationTime | lifespan = null , |
||
ExpirationTime | maxidle = null |
||
) |
Put/replace an entry in the cache
key | key of the entry |
value | value of the entry |
lifespan | lifespan |
maxidle | maximum idle time |
async Task Infinispan.Hotrod.Core.Cache< K, V >.PutAll | ( | Dictionary< K, V > | map, |
ExpirationTime | lifespan = null , |
||
ExpirationTime | maxidle = null |
||
) |
Put in the cache all the entries in the map
map | the map of entries to put in the cache |
lifespan | the lifespan for all the entries |
maxidle | the maxidle for all the entries |
IPartResult Infinispan.Hotrod.Core.Cache< K, V >.PutAllPart | ( | IDictionary< K, V > | map, |
ExpirationTime | lifespan = null , |
||
ExpirationTime | maxidle = null |
||
) |
An optimized for speed version of GetAll
This splits the given putall is several putall operation each of which contains keys of a specific owner. Then all the operations are sent to the relative owner. Answers are collected and returned in a single result. This operation is not atomic and could "partially" fail. TODO Allow user to await for the result
map | the map of entries to put in the cache |
lifespan | the lifespan for all the entries |
maxidle | the maxidle for all the entries |
async Task< V > Infinispan.Hotrod.Core.Cache< K, V >.PutIfAbsent | ( | K | key, |
V | value, | ||
ExpirationTime | lifespan = null , |
||
ExpirationTime | maxidle = null |
||
) |
Put an entry in the cache if absent, does nothing otherwise
key | key of the entry |
value | value of the entry |
lifespan | lifespan |
maxidle | maximum idle time |
async Task< QueryResponse > Infinispan.Hotrod.Core.Cache< K, V >.Query | ( | QueryRequest | query | ) |
Run a query on the cache
query | the query request |
async Task< List< Object > > Infinispan.Hotrod.Core.Cache< K, V >.Query | ( | String | query | ) |
A simplified method to run query
This method returns the result set as a list of cache objects if the query has no select projection, otherwise return a list of tuples
query | the query string |
async Task<(V PrevValue, Boolean Removed)> Infinispan.Hotrod.Core.Cache< K, V >.Remove | ( | K | key | ) |
Remove an entry from the cache
key | entry's key |
async Task Infinispan.Hotrod.Core.Cache< K, V >.RemoveListener | ( | IClientListener | listener | ) |
Remove the listener from the cache
listener | the listener |
async Task<(V V, Boolean Removed)> Infinispan.Hotrod.Core.Cache< K, V >.RemoveWithVersion | ( | K | key, |
Int64 | version | ||
) |
Remove an entry with the given version
key | entry key |
version | entry version |
async Task<(V PrevValue, Boolean Replaced)> Infinispan.Hotrod.Core.Cache< K, V >.Replace | ( | K | key, |
V | value, | ||
ExpirationTime | lifespan = null , |
||
ExpirationTime | maxidle = null |
||
) |
Replace an entry value
key | entry key |
value | new value |
lifespan | lifespan for the entry |
maxidle | max idle time |
async Task< Boolean > Infinispan.Hotrod.Core.Cache< K, V >.ReplaceWithVersion | ( | K | key, |
V | value, | ||
Int64 | version, | ||
ExpirationTime | lifeSpan = null , |
||
ExpirationTime | maxIdle = null |
||
) |
Replace the value of an entry with the given version
key | entry key |
value | new value |
version | entry version |
lifespan | lifespan for the entry |
maxidle | max idle time |
async Task< Int32 > Infinispan.Hotrod.Core.Cache< K, V >.Size | ( | ) |
Return the number of entries in a cache
async Task< ServerStatistics > Infinispan.Hotrod.Core.Cache< K, V >.Stats | ( | ) |
Acquire some cache/cluster statistics