ShardedConnectionPool
Provides a redis connection pool that can be sharded
Assembly: ServiceStack.Redis.dll
View Source
Declaration
public class ShardedConnectionPool : PooledRedisClientManager, IRedisClientsManagerAsync, IRedisClientsManager, IRedisFailover, IHandleClientDispose, IHasRedisResolver, IHasStats, IRedisClientCacheManager, IDisposable
Inherited Properties
AssertAccessOnlyOnSameThread
View Source
Declaration
public bool AssertAccessOnlyOnSameThread { get; set; }
Config
View Source
Declaration
protected RedisClientManagerConfig Config { get; set; }
ConnectionFilter
View Source
Declaration
public Action<IRedisNativeClient> ConnectionFilter { get; set; }
ConnectTimeout
View Source
Declaration
public int? ConnectTimeout { get; set; }
Db
View Source
Declaration
public long? Db { get; }
IdleTimeOutSecs
View Source
Declaration
public int? IdleTimeOutSecs { get; set; }
NamespacePrefix
Gets or sets object key prefix.
View Source
Declaration
public string NamespacePrefix { get; set; }
OnFailover
View Source
Declaration
public List<Action<IRedisClientsManager>> OnFailover { get; }
PoolTimeout
View Source
Declaration
public int? PoolTimeout { get; set; }
RedisResolver
View Source
Declaration
public IRedisResolver RedisResolver { get; set; }
SocketReceiveTimeout
View Source
Declaration
public int? SocketReceiveTimeout { get; set; }
SocketSendTimeout
View Source
Declaration
public int? SocketSendTimeout { get; set; }
Stats
View Source
Declaration
public Dictionary<string, long> Stats { get; }
Fields
name
logical name
View Source
Declaration
public readonly string name
weight
An arbitrary weight relative to other nodes
View Source
Declaration
public readonly int weight
Methods
GetHashCode()
View Source
Declaration
public override int GetHashCode()
Returns
System.Int32
Inherited Methods
Dispose()
View Source
Declaration
public void Dispose()
Dispose(RedisClient)
View Source
Declaration
protected void Dispose(RedisClient redisClient)
Parameters
Type | Name |
---|---|
ServiceStack.Redis.RedisClient | redisClient |
Dispose(Boolean)
View Source
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name |
---|---|
System.Boolean | disposing |
DisposeClient(RedisNativeClient)
View Source
Declaration
public void DisposeClient(RedisNativeClient client)
Parameters
Type | Name |
---|---|
ServiceStack.Redis.RedisNativeClient | client |
DisposeReadOnlyClient(RedisNativeClient)
Disposes the read only client.
View Source
Declaration
public void DisposeReadOnlyClient(RedisNativeClient client)
Parameters
Type | Name | Description |
---|---|---|
ServiceStack.Redis.RedisNativeClient | client | The client. |
|
DisposeWriteClient(RedisNativeClient)
Disposes the write client.
View Source
Declaration
public void DisposeWriteClient(RedisNativeClient client)
Parameters
Type | Name | Description |
---|---|---|
ServiceStack.Redis.RedisNativeClient | client | The client. |
|
FailoverTo(IEnumerable<String>, IEnumerable<String>)
View Source
Declaration
public void FailoverTo(IEnumerable<string> readWriteHosts, IEnumerable<string> readOnlyHosts)
Parameters
Type | Name |
---|---|
System.Collections.Generic.IEnumerable<System.String> | readWriteHosts |
System.Collections.Generic.IEnumerable<System.String> | readOnlyHosts |
FailoverTo(String[])
View Source
Declaration
public void FailoverTo(params string[] readWriteHosts)
Parameters
Type | Name |
---|---|
System.String[] | readWriteHosts |
Finalize()
View Source
Declaration
protected void Finalize()
GetCacheClient()
View Source
Declaration
public ICacheClient GetCacheClient()
Returns
ServiceStack.Caching.ICacheClient
GetClient()
Returns a Read/Write client (The default) using the hosts defined in ReadWriteHosts
View Source
Declaration
public IRedisClient GetClient()
Returns
ServiceStack.Redis.IRedisClient
GetClientPoolActiveStates()
View Source
Declaration
public int[] GetClientPoolActiveStates()
Returns
System.Int32[]
GetDisposableClient<T>()
View Source
Declaration
public PooledRedisClientManager.DisposablePooledClient<T> GetDisposableClient<T>()
where T : RedisNativeClient
Returns
ServiceStack.Redis.PooledRedisClientManager.DisposablePooledClient<T>
Type Parameters
T
GetReadOnlyCacheClient()
View Source
Declaration
public ICacheClient GetReadOnlyCacheClient()
Returns
ServiceStack.Caching.ICacheClient
GetReadOnlyClient()
Returns a ReadOnly client using the hosts defined in ReadOnlyHosts.
View Source
Declaration
public virtual IRedisClient GetReadOnlyClient()
Returns
ServiceStack.Redis.IRedisClient
GetReadOnlyClientPoolActiveStates()
View Source
Declaration
public int[] GetReadOnlyClientPoolActiveStates()
Returns
System.Int32[]
GetStats()
View Source
Declaration
public Dictionary<string, string> GetStats()
Returns
System.Collections.Generic.Dictionary<System.String,System.String>
OnStart()
View Source
Declaration
protected virtual void OnStart()
Start()
View Source
Declaration
public void Start()