C# Class ServiceStack.Redis.RedisManagerPool

Provides thread-safe pooling of redis client connections.
Inheritance: IRedisClientsManager, IRedisFailover, IHandleClientDispose, IHasRedisResolver
Exibir arquivo Open project: ServiceStack/ServiceStack.Redis Class Usage Examples

Public Properties

Property Type Description
RecheckPoolAfterMs int

Protected Properties

Property Type Description
RedisClientCounter int
poolIndex int

Public Methods

Method Description
Dispose ( ) : void
DisposeClient ( RedisNativeClient client ) : void
DisposeWriteClient ( RedisNativeClient client ) : void

Disposes the write client.

FailoverTo ( ) : void
FailoverTo ( IEnumerable readWriteHosts, IEnumerable readOnlyHosts ) : void
GetCacheClient ( ) : ICacheClient
GetClient ( ) : IRedisClient

Returns a Read/Write client (The default) using the hosts defined in ReadWriteHosts

GetClientPoolActiveStates ( ) : int[]
GetReadOnlyCacheClient ( ) : ICacheClient
GetReadOnlyClient ( ) : IRedisClient
GetStats ( ) : string>.Dictionary
RedisManagerPool ( ) : System
RedisManagerPool ( IEnumerable hosts ) : System
RedisManagerPool ( IEnumerable hosts, RedisPoolConfig config ) : System
RedisManagerPool ( string host ) : System
RedisManagerPool ( string host, RedisPoolConfig config ) : System

Protected Methods

Method Description
Dispose ( RedisClient redisClient ) : void
Dispose ( bool disposing ) : void

Private Methods

Method Description
AssertValidPool ( ) : void
GetInActiveClient ( RedisClient &inactiveClient ) : int

Called within a lock

InitNewClient ( RedisClient client ) : RedisClient

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( RedisClient redisClient ) : void
redisClient RedisClient
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

DisposeClient() public method

public DisposeClient ( RedisNativeClient client ) : void
client RedisNativeClient
return void

DisposeWriteClient() public method

Disposes the write client.
public DisposeWriteClient ( RedisNativeClient client ) : void
client RedisNativeClient The client.
return void

FailoverTo() public method

public FailoverTo ( ) : void
return void

FailoverTo() public method

public FailoverTo ( IEnumerable readWriteHosts, IEnumerable readOnlyHosts ) : void
readWriteHosts IEnumerable
readOnlyHosts IEnumerable
return void

GetCacheClient() public method

public GetCacheClient ( ) : ICacheClient
return ICacheClient

GetClient() public method

Returns a Read/Write client (The default) using the hosts defined in ReadWriteHosts
public GetClient ( ) : IRedisClient
return IRedisClient

GetClientPoolActiveStates() public method

public GetClientPoolActiveStates ( ) : int[]
return int[]

GetReadOnlyCacheClient() public method

public GetReadOnlyCacheClient ( ) : ICacheClient
return ICacheClient

GetReadOnlyClient() public method

public GetReadOnlyClient ( ) : IRedisClient
return IRedisClient

GetStats() public method

public GetStats ( ) : string>.Dictionary
return string>.Dictionary

RedisManagerPool() public method

public RedisManagerPool ( ) : System
return System

RedisManagerPool() public method

public RedisManagerPool ( IEnumerable hosts ) : System
hosts IEnumerable
return System

RedisManagerPool() public method

public RedisManagerPool ( IEnumerable hosts, RedisPoolConfig config ) : System
hosts IEnumerable
config RedisPoolConfig
return System

RedisManagerPool() public method

public RedisManagerPool ( string host ) : System
host string
return System

RedisManagerPool() public method

public RedisManagerPool ( string host, RedisPoolConfig config ) : System
host string
config RedisPoolConfig
return System

Property Details

RecheckPoolAfterMs public_oe property

public int RecheckPoolAfterMs
return int

RedisClientCounter protected_oe property

protected int RedisClientCounter
return int

poolIndex protected_oe property

protected int poolIndex
return int