C# Class ServiceStack.Redis.RedisSentinel

Inheritance: IRedisSentinel
Show file Open project: ServiceStack/ServiceStack.Redis Class Usage Examples

Public Properties

Property Type Description
DefaultAddress string
DefaultMasterName string

Protected Properties

Property Type Description
Log ILog

Private Properties

Property Type Description
ConfigureHosts string[]
CreateRedisManager IRedisClientsManager
GetNextSentinel RedisSentinelWorker
GetValidSentinelWorker RedisSentinelWorker
OnSentinelError void
ShouldRetry bool

Public Methods

Method Description
Dispose ( ) : void
ForceMasterFailover ( ) : void
GetActiveSentinelHosts ( IEnumerable sentinelHosts ) : List
GetMaster ( ) : RedisEndpoint
GetRedisManager ( ) : IRedisClientsManager
GetSentinelInfo ( ) : SentinelInfo
GetSlaves ( ) : List
RedisSentinel ( IEnumerable sentinelHosts, string masterName = null ) : System
RedisSentinel ( string sentinelHost = null, string masterName = null ) : System
RefreshActiveSentinels ( ) : void
ResetClients ( ) : SentinelInfo
Start ( ) : IRedisClientsManager

Initialize Sentinel Subscription and Configure Redis ClientsManager

Private Methods

Method Description
ConfigureHosts ( IEnumerable hosts ) : string[]
CreateRedisManager ( SentinelInfo sentinelInfo ) : IRedisClientsManager
GetNextSentinel ( ) : RedisSentinelWorker
GetValidSentinelWorker ( ) : RedisSentinelWorker
OnSentinelError ( Exception ex ) : void
ShouldRetry ( ) : bool

Check if GetValidSentinel should try the next sentinel server

This will be true if the failures is less than either RedisSentinel.MaxFailures or the # of sentinels, whatever is greater

Method Details

Dispose() public method

public Dispose ( ) : void
return void

ForceMasterFailover() public method

public ForceMasterFailover ( ) : void
return void

GetActiveSentinelHosts() public method

public GetActiveSentinelHosts ( IEnumerable sentinelHosts ) : List
sentinelHosts IEnumerable
return List

GetMaster() public method

public GetMaster ( ) : RedisEndpoint
return RedisEndpoint

GetRedisManager() public method

public GetRedisManager ( ) : IRedisClientsManager
return IRedisClientsManager

GetSentinelInfo() public method

public GetSentinelInfo ( ) : SentinelInfo
return SentinelInfo

GetSlaves() public method

public GetSlaves ( ) : List
return List

RedisSentinel() public method

public RedisSentinel ( IEnumerable sentinelHosts, string masterName = null ) : System
sentinelHosts IEnumerable
masterName string
return System

RedisSentinel() public method

public RedisSentinel ( string sentinelHost = null, string masterName = null ) : System
sentinelHost string
masterName string
return System

RefreshActiveSentinels() public method

public RefreshActiveSentinels ( ) : void
return void

ResetClients() public method

public ResetClients ( ) : SentinelInfo
return SentinelInfo

Start() public method

Initialize Sentinel Subscription and Configure Redis ClientsManager
public Start ( ) : IRedisClientsManager
return IRedisClientsManager

Property Details

DefaultAddress public static property

public static string DefaultAddress
return string

DefaultMasterName public static property

public static string DefaultMasterName
return string

Log protected static property

protected static ILog Log
return ILog