JBoss Data Grid HotRod C# Client  7.2.0
Public Member Functions | List of all members
Infinispan.HotRod.RemoteCacheManager Class Reference

Factory for IRemoteCache instances. More...

Public Member Functions

 RemoteCacheManager (bool start=true)
 Construct an instance with default configuration and marshaller. More...
 
 RemoteCacheManager (Configuration configuration, bool start=true)
 Construct an instance with specific configuration. More...
 
 RemoteCacheManager (Configuration configuration, IMarshaller marshaller, bool start=true, IMarshaller argMarshaller=null)
 Construct an instance with specific configuration and serializer. More...
 
 RemoteCacheManager (IMarshaller marshaller, bool start=true, IMarshaller argMarshaller=null)
 Construct an instance with default configuration and specific serializer. More...
 
void Start ()
 Starts the manager. More...
 
void Stop ()
 Stops the manager. More...
 
bool IsStarted ()
 Can be used to check if the manager is started or not. More...
 
IRemoteCache< K, V > GetCache< K, V > (IMarshaller m=null)
 Retrieves the default cache from the remote server. More...
 
IRemoteCache< K, V > GetCache< K, V > (String cacheName, IMarshaller m=null)
 Retrieves a named cache from the remote server. If the cache has been previously created with the same name, the running cache instance is returned. Otherwise, this method attempts to create the cache first. More...
 
IRemoteCache< K, V > GetCache< K, V > (bool forceReturnValue, IMarshaller m=null)
 Retrieves the default cache from the remote server. More...
 
IRemoteCache< K, V > GetCache< K, V > (String cacheName, bool forceReturnValue, IMarshaller m=null)
 Retrieves a named cache from the remote server. If the cache has been previously created with the same name, the running cache instance is returned. Otherwise, this method attempts to create the cache first. More...
 
bool SwitchToCluster (string clusterName)
 Perform a cluster switch to the cluster with name clusterName More...
 
bool SwitchToDefaultCluster ()
 Perform a cluster switch to the default cluster (the one defined by ConfigurationBuilder.addServer() method) More...
 

Detailed Description

Factory for IRemoteCache instances.

Lifecycle: In order to be able to use an IRemoteCache, the RemoteCacheManager must be started first: beside other things, this instantiates connections to Hot Rod server(s). Starting the RemoteCacheManager can be done either at creation by passing start==true to constructor or by using a constructor that does that for you (see C-tor documentation); or after construction by calling Start().

This is an "expensive" object, as it manages a set of persistent TCP connections to the Hot Rod servers. It is recommended to only have one instance of this per process, and to cache it between calls to the server (i.e. remoteCache operations).

Stop() needs to be called explicitly in order to release all the resources (e.g. threads, TCP connections).

Constructor & Destructor Documentation

Infinispan.HotRod.RemoteCacheManager.RemoteCacheManager ( bool  start = true)
inline

Construct an instance with default configuration and marshaller.

Parameters
start
Infinispan.HotRod.RemoteCacheManager.RemoteCacheManager ( Configuration  configuration,
bool  start = true 
)
inline

Construct an instance with specific configuration.

Parameters
configuration
start
Infinispan.HotRod.RemoteCacheManager.RemoteCacheManager ( Configuration  configuration,
IMarshaller  marshaller,
bool  start = true,
IMarshaller  argMarshaller = null 
)
inline

Construct an instance with specific configuration and serializer.

Parameters
configuration
marshaller
argMarshaller
start
Infinispan.HotRod.RemoteCacheManager.RemoteCacheManager ( IMarshaller  marshaller,
bool  start = true,
IMarshaller  argMarshaller = null 
)
inline

Construct an instance with default configuration and specific serializer.

Parameters
marshaller
argMarshaller
start

Member Function Documentation

IRemoteCache<K, V> Infinispan.HotRod.RemoteCacheManager.GetCache< K, V > ( IMarshaller  m = null)
inline

Retrieves the default cache from the remote server.

Parameters
mthe marshaller policy for this cache
Returns
a remote cache instance which can be used to send requests to the default cache
IRemoteCache<K, V> Infinispan.HotRod.RemoteCacheManager.GetCache< K, V > ( String  cacheName,
IMarshaller  m = null 
)
inline

Retrieves a named cache from the remote server. If the cache has been previously created with the same name, the running cache instance is returned. Otherwise, this method attempts to create the cache first.

Parameters
cacheNamethe name of the cache
mthe marshaller policy for this cache
Returns
a remote cache instance which can be used to send requests to the named cache
IRemoteCache<K, V> Infinispan.HotRod.RemoteCacheManager.GetCache< K, V > ( bool  forceReturnValue,
IMarshaller  m = null 
)
inline

Retrieves the default cache from the remote server.

Parameters
forceReturnValueindicates if the force return value flag should be enabled or not
mthe marshaller policy for this cache
Returns
a remote cache instance which can be used to send requests to the default cache
IRemoteCache<K, V> Infinispan.HotRod.RemoteCacheManager.GetCache< K, V > ( String  cacheName,
bool  forceReturnValue,
IMarshaller  m = null 
)
inline

Retrieves a named cache from the remote server. If the cache has been previously created with the same name, the running cache instance is returned. Otherwise, this method attempts to create the cache first.

Parameters
cacheNamethe name of the cache
forceReturnValueindicates if the force return value flag should be enabled or not
mthe marshaller policy for this cache
Returns
a remote cache instance which can be used to send requests to the named cache
bool Infinispan.HotRod.RemoteCacheManager.IsStarted ( )
inline

Can be used to check if the manager is started or not.

Returns
true if the cache manager is started and false otherwise
void Infinispan.HotRod.RemoteCacheManager.Start ( )
inline

Starts the manager.

void Infinispan.HotRod.RemoteCacheManager.Stop ( )
inline

Stops the manager.

bool Infinispan.HotRod.RemoteCacheManager.SwitchToCluster ( string  clusterName)
inline

Perform a cluster switch to the cluster with name clusterName

Parameters
clusterName
Returns
true if the switch successed, false otherwise
bool Infinispan.HotRod.RemoteCacheManager.SwitchToDefaultCluster ( )
inline

Perform a cluster switch to the default cluster (the one defined by ConfigurationBuilder.addServer() method)

Returns
true if the switch successed, false otherwise

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