Infinispan.Hotrod.Core 0.0.3
.NET Core client for Infinispan Hotrod Protocol
Public Member Functions | List of all members
Infinispan.Hotrod.Core.Cache< K, V > Class Template Reference
Inheritance diagram for Infinispan.Hotrod.Core.Cache< K, V >:
Infinispan.Hotrod.Core.CacheBase

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< ServerStatisticsStats ()
 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< PingResultPing ()
 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]
 

Member Function Documentation

◆ AddListener()

async Task Infinispan.Hotrod.Core.Cache< K, V >.AddListener ( IClientListener  listener,
bool  includeState = false 
)

Add a listener for events to this cache

Parameters
listenerthe listener
includeStatewether or not to return the initial cache state
Returns

◆ ContainsKey()

async Task< Boolean > Infinispan.Hotrod.Core.Cache< K, V >.ContainsKey ( key)

Check if an entry with the given key is present

Parameters
keykey of the entry
Returns
true if an entry with the given exists

◆ Get()

async Task< V > Infinispan.Hotrod.Core.Cache< K, V >.Get ( key)

Get an entry from the cache

Parameters
keykey of the entry
Returns
the value of the entry or null (async)

◆ GetAll()

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

Parameters
keysthe key set
Returns
a map with the found entries

◆ GetAllPart()

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

Parameters
keysthe key set
Returns
a map with the found entries

◆ GetWithMetadata()

async Task< ValueWithMetadata< V > > Infinispan.Hotrod.Core.Cache< K, V >.GetWithMetadata ( key)

Get an entry from the cache with its metadata

Parameters
keykey of the entry
Returns
the value with metadata of the entry or null (async)

◆ GetWithVersion()

async Task< ValueWithVersion< V > > Infinispan.Hotrod.Core.Cache< K, V >.GetWithVersion ( key)

Get an entry from the cache with its version

Parameters
keykey of the entry
Returns
the value with version of the entry or null (async)

◆ Ping()

async Task< PingResult > Infinispan.Hotrod.Core.Cache< K, V >.Ping ( )

ping operation

Returns
a ping result

◆ Put()

async Task< V > Infinispan.Hotrod.Core.Cache< K, V >.Put ( key,
value,
ExpirationTime  lifespan = null,
ExpirationTime  maxidle = null 
)

Put/replace an entry in the cache

Parameters
keykey of the entry
valuevalue of the entry
lifespanlifespan
maxidlemaximum idle time
Returns

◆ PutAll()

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

Parameters
mapthe map of entries to put in the cache
lifespanthe lifespan for all the entries
maxidlethe maxidle for all the entries
Returns

◆ PutAllPart()

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

Parameters
mapthe map of entries to put in the cache
lifespanthe lifespan for all the entries
maxidlethe maxidle for all the entries
Returns

◆ PutIfAbsent()

async Task< V > Infinispan.Hotrod.Core.Cache< K, V >.PutIfAbsent ( key,
value,
ExpirationTime  lifespan = null,
ExpirationTime  maxidle = null 
)

Put an entry in the cache if absent, does nothing otherwise

Parameters
keykey of the entry
valuevalue of the entry
lifespanlifespan
maxidlemaximum idle time
Returns

◆ Query() [1/2]

async Task< QueryResponse > Infinispan.Hotrod.Core.Cache< K, V >.Query ( QueryRequest  query)

Run a query on the cache

Parameters
querythe query request
Returns
the query result

◆ Query() [2/2]

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

Parameters
querythe query string
Returns
the resultSet

◆ Remove()

async Task<(V PrevValue, Boolean Removed)> Infinispan.Hotrod.Core.Cache< K, V >.Remove ( key)

Remove an entry from the cache

Parameters
keyentry's key
Returns
true if the entry has been removed

◆ RemoveListener()

async Task Infinispan.Hotrod.Core.Cache< K, V >.RemoveListener ( IClientListener  listener)

Remove the listener from the cache

Parameters
listenerthe listener
Returns

◆ RemoveWithVersion()

async Task<(V V, Boolean Removed)> Infinispan.Hotrod.Core.Cache< K, V >.RemoveWithVersion ( key,
Int64  version 
)

Remove an entry with the given version

Parameters
keyentry key
versionentry version
Returns
if replaced (the previous value, true) otherwise (null,false)

◆ Replace()

async Task<(V PrevValue, Boolean Replaced)> Infinispan.Hotrod.Core.Cache< K, V >.Replace ( key,
value,
ExpirationTime  lifespan = null,
ExpirationTime  maxidle = null 
)

Replace an entry value

Parameters
keyentry key
valuenew value
lifespanlifespan for the entry
maxidlemax idle time
Returns
if replaced (the previous value, true) otherwise (null,false)

◆ ReplaceWithVersion()

async Task< Boolean > Infinispan.Hotrod.Core.Cache< K, V >.ReplaceWithVersion ( key,
value,
Int64  version,
ExpirationTime  lifeSpan = null,
ExpirationTime  maxIdle = null 
)

Replace the value of an entry with the given version

Parameters
keyentry key
valuenew value
versionentry version
lifespanlifespan for the entry
maxidlemax idle time
Returns
if replaced true otherwise false

◆ Size()

async Task< Int32 > Infinispan.Hotrod.Core.Cache< K, V >.Size ( )

Return the number of entries in a cache

Returns
number of entries

◆ Stats()

async Task< ServerStatistics > Infinispan.Hotrod.Core.Cache< K, V >.Stats ( )

Acquire some cache/cluster statistics

Returns
some statistics

The documentation for this class was generated from the following file: