Class CacheManager
Provides the methods for cache management.
Inheritance
Namespace:
Assembly: Alachisoft.NCache.Web.dll
Syntax
public class CacheManager
GetCacheClients(String)
Get information about all clients connected to the specified cache.
Declaration
public static Dictionary<ServerNode, List<CacheClient>> GetCacheClients(string cacheName)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Name of the cache |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<Alachisoft.NCache.Runtime.CacheManagement.ServerNode, System.Collections.Generic.List<Alachisoft.NCache.Runtime.CacheManagement.CacheClient>> | Dictionary of ServerNode and CacheClient with detailed information of all client connected to each server node of the cache. |
GetCacheClients(String, String)
Get information about all clients connected to the specified cache with specified node connected.
Declaration
public static Dictionary<ServerNode, List<CacheClient>> GetCacheClients(string cacheName, string initialNodeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Name of the cache |
System.String | initialNodeName | Name of any server node the specified cache, from which the cache information will be collected |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<Alachisoft.NCache.Runtime.CacheManagement.ServerNode, System.Collections.Generic.List<Alachisoft.NCache.Runtime.CacheManagement.CacheClient>> | Dictionary of ServerNode and CacheClient with detailed information of all client connected to each server node of the cache. |
GetCacheClients(String, String, Int32)
Get information about all clients connected to the specified cache of specified context, with specified node connected.
Declaration
public static Dictionary<ServerNode, List<CacheClient>> GetCacheClients(string cacheName, string initialNodeName, int port)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Name of the cache |
System.String | initialNodeName | Name of any server node the specified cache, from which the cache information will be collected |
System.Int32 | port | Port where cache service will listen |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<Alachisoft.NCache.Runtime.CacheManagement.ServerNode, System.Collections.Generic.List<Alachisoft.NCache.Runtime.CacheManagement.CacheClient>> | Dictionary of ServerNode and CacheClient with detailed information of all client connected to each server node of the cache. |
GetCacheHealth(String)
Get health Information of the specified cache.
Declaration
public static CacheHealth GetCacheHealth(string cacheName)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Name of the cache |
Returns
Type | Description |
---|---|
Alachisoft.NCache.Runtime.CacheManagement.CacheHealth | Instance of the |
GetCacheHealth(String, String)
Get health Information of the specified cache with specified node connected.
Declaration
public static CacheHealth GetCacheHealth(string cacheName, string initialNodeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Name of the cache |
System.String | initialNodeName | Name of any server node the specified cache, from which the cache information will be collected |
Returns
Type | Description |
---|---|
Alachisoft.NCache.Runtime.CacheManagement.CacheHealth | Instance of the |
GetCacheHealth(String, String, Int32)
Get health Information of the specified cache of specified context, with specified node connected.
Declaration
public static CacheHealth GetCacheHealth(string cacheName, string initialNodeName, int port)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Name of the cache |
System.String | initialNodeName | Name of any server node the specified cache, from which the cache information will be collected |
System.Int32 | port | Port where cache service will listen |
Returns
Type | Description |
---|---|
Alachisoft.NCache.Runtime.CacheManagement.CacheHealth | Instance of the |
StartCache(String, String)
Starts an out-proc cache. The end result is the same as that of starting the cache using NCache Manager. It starts the cache on the specified cache server. If the Cache Server could not be contacted then it throws a ManagementException exception. It tries to get the Security Parameters from the Client.ncconf.
Declaration
public static void StartCache(string cacheId, string serverName)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheId | The identifier for the Cache item to start. |
System.String | serverName | The name of the server on which cache needs to be started. |
StartCache(String, String, SecurityParams, SecurityParams)
Starts an out-proc cache. The end result is the same as that of starting the cache using NCache Manager. It starts the cache on the specified cache server. If the Cache Server could not be contacted then it throws a ManagementException exception.
Declaration
public static void StartCache(string cacheId, string serverName, SecurityParams primaryUserCredentials, SecurityParams secondaryUserCredentials)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheId | The identifier for the Cache item to start. |
System.String | serverName | The name of the server on which cache needs to be started. |
Alachisoft.NCache.Web.Security.SecurityParams | primaryUserCredentials | Primary user id and password information used for user's authorization for the operation if security is enabled at Cache Server. |
Alachisoft.NCache.Web.Security.SecurityParams | secondaryUserCredentials | Secondary user id and password information used for user's authorization for the operation if security is enabled at Cache Server. These credentals are use incase primary credentials are not athorized. |
StopCache(String)
Stops an out-proc cache. The end result is the same as that of stoping the cache using NCache Manager. It stops the cache only on the same server where the client application is running. If the Cache Server could not be contacted then it throws a ManagementException exception. It tries to get the Security Parameters from the Client.ncconf.
Declaration
public static void StopCache(string cacheId)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheId | The identifier for the Cache item to stop. |
StopCache(String, SecurityParams, SecurityParams)
Stops an out-proc cache. The end result is the same as that of stoping the cache using NCache Manager. It stops the cache only on the same server where the client application is running. If the Cache Server could not be contacted then it throws a ManagementException exception.
Declaration
public static void StopCache(string cacheId, SecurityParams primaryUserCredentials, SecurityParams secondaryUserCredentials)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheId | The identifier for the Cache item to stop. |
Alachisoft.NCache.Web.Security.SecurityParams | primaryUserCredentials | Primary user id and password information used for user's authorization for the operation if security is enabled at Cache Server. |
Alachisoft.NCache.Web.Security.SecurityParams | secondaryUserCredentials | Secondary user id and password information used for user's authorization for the operation if security is enabled at Cache Server. These credentals are use incase primary credentials are not athorized. |
StopCache(String, SecurityParams, SecurityParams, Boolean)
Stops an out-proc cache. The end result is the same as that of stoping the cache using NCache Manager. It stops the cache only on the same server where the client application is running. If the Cache Server could not be contacted then it throws a ManagementException exception.
Declaration
public static void StopCache(string cacheId, SecurityParams primaryUserCredentials, SecurityParams secondaryUserCredentials, bool isGracefulShutdown)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheId | The identifier for the Cache item to stop. |
Alachisoft.NCache.Web.Security.SecurityParams | primaryUserCredentials | Primary user id and password information used for user's authorization for the operation if security is enabled at Cache Server. |
Alachisoft.NCache.Web.Security.SecurityParams | secondaryUserCredentials | Secondary user id and password information used for user's authorization for the operation if security is enabled at Cache Server. These credentals are use incase primary credentials are not athorized. |
System.Boolean | isGracefulShutdown |
StopCache(String, Boolean)
Stops an out-proc cache. The end result is the same as that of stoping the cache using NCache Manager. It stops the cache only on the same server where the client application is running. If the Cache Server could not be contacted then it throws a ManagementException exception. It tries to get the Security Parameters from the Client.ncconf.
Declaration
public static void StopCache(string cacheId, bool isGracefulShutdown)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheId | The identifier for the Cache item to stop. |
System.Boolean | isGracefulShutdown |
StopCache(String, String)
Stops an out-proc cache. The end result is the same as that of stoping the cache using NCache Manager. It stops the cache on the specified cache server. If the Cache Server could not be contacted then it throws a ManagementException exception. It tries to get the Security Parameters from the Client.ncconf.
Declaration
public static void StopCache(string cacheId, string serverName)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheId | The identifier for the Cache item to stop. |
System.String | serverName | The name of the server where cache needs to be stopped. |
StopCache(String, String, SecurityParams, SecurityParams)
Stops an out-proc cache. The end result is the same as that of stoping the cache using NCache Manager. It stops the cache on the specified cache server. If the Cache Server could not be contacted then it throws a ManagementException exception.
Declaration
public static void StopCache(string cacheId, string serverName, SecurityParams primaryUserCredentials, SecurityParams secondaryUserCredentials)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheId | The identifier for the Cache item to stop. |
System.String | serverName | The name of the server where cache needs to be stopped. |
Alachisoft.NCache.Web.Security.SecurityParams | primaryUserCredentials | Primary User id and password information used for user's authorization for the operation if security is enabled at Cache Server. |
Alachisoft.NCache.Web.Security.SecurityParams | secondaryUserCredentials | Secondary User id and password information used for user's authorization for the operation if security is enabled at Cache Server. These credentials are used incase primar user credentials are not athorized. |
StopCache(String, String, SecurityParams, SecurityParams, Boolean)
Stops an out-proc cache. The end result is the same as that of stoping the cache using NCache Manager. It stops the cache on the specified cache server. If the Cache Server could not be contacted then it throws a ManagementException exception.
Declaration
public static void StopCache(string cacheId, string serverName, SecurityParams primaryUserCredentials, SecurityParams secondaryUserCredentials, bool isGracefulShutdown)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheId | The identifier for the Cache item to stop. |
System.String | serverName | The name of the server where cache needs to be stopped. |
Alachisoft.NCache.Web.Security.SecurityParams | primaryUserCredentials | Primary User id and password information used for user's authorization for the operation if security is enabled at Cache Server. |
Alachisoft.NCache.Web.Security.SecurityParams | secondaryUserCredentials | Secondary User id and password information used for user's authorization for the operation if security is enabled at Cache Server. These credentials are used incase primar user credentials are not athorized. |
System.Boolean | isGracefulShutdown |
StopCache(String, String, Boolean)
Stops an out-proc cache. The end result is the same as that of stoping the cache using NCache Manager. It stops the cache on the specified cache server. If the Cache Server could not be contacted then it throws a ManagementException exception. It tries to get the Security Parameters from the Client.ncconf.
Declaration
public static void StopCache(string cacheId, string serverName, bool isGracefulShutdown)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheId | The identifier for the Cache item to stop. |
System.String | serverName | The name of the server where cache needs to be stopped. |
System.Boolean | isGracefulShutdown |
VerifySecurityParams(SecurityParams, SecurityParams)
Declaration
public static SecurityParams VerifySecurityParams(SecurityParams primaryCredentials, SecurityParams secondaryCredentials)
Parameters
Type | Name | Description |
---|---|---|
Alachisoft.NCache.Web.Security.SecurityParams | primaryCredentials | |
Alachisoft.NCache.Web.Security.SecurityParams | secondaryCredentials |
Returns
Type | Description |
---|---|
Alachisoft.NCache.Web.Security.SecurityParams |