C# Class BB.Caching.Redis.ConnectionGroup

A group of connections for Redis. Used to group a master-slave setup so that we can treat the master as the single write connection (/ read connection) and the slave(s) as the read connection(s).
Afficher le fichier Open project: JesseBuesking/BB.Caching Class Usage Examples

Méthodes publiques

Méthode Description
AddReadConnection ( string connection, bool establishConnection = true ) : void

Adds a read connection.

AddWriteConnection ( string connection, bool establishConnection = true ) : void

Adds a write connection.

ConnectionGroup ( string name, bool analytics = false ) : System

Initializes a new instance of the ConnectionGroup class.

GetReadMultiplexer ( ) : StackExchange.Redis.ConnectionMultiplexer

Retrieves a connection from the read pool on a round-robin basis.

GetWriteMultiplexer ( ) : StackExchange.Redis.ConnectionMultiplexer

Retrieves the available write connections.

ToString ( ) : string

Returns a string that represents the current object.

Private Methods

Méthode Description
UpdateReadPool ( ) : void

Updates the read pool with connections.

Method Details

AddReadConnection() public méthode

Adds a read connection.
public AddReadConnection ( string connection, bool establishConnection = true ) : void
connection string /// The connection. ///
establishConnection bool /// Talks with the redis instance defined in the connection string to establish a connection. ///
Résultat void

AddWriteConnection() public méthode

Adds a write connection.
public AddWriteConnection ( string connection, bool establishConnection = true ) : void
connection string /// The connection. ///
establishConnection bool /// Talks with the redis instance defined in the connection string to establish a connection. ///
Résultat void

ConnectionGroup() public méthode

Initializes a new instance of the ConnectionGroup class.
public ConnectionGroup ( string name, bool analytics = false ) : System
name string /// The name. ///
analytics bool /// True if this connection group is used for bitwise analytics. ///
Résultat System

GetReadMultiplexer() public méthode

Retrieves a connection from the read pool on a round-robin basis.
public GetReadMultiplexer ( ) : StackExchange.Redis.ConnectionMultiplexer
Résultat StackExchange.Redis.ConnectionMultiplexer

GetWriteMultiplexer() public méthode

Retrieves the available write connections.
public GetWriteMultiplexer ( ) : StackExchange.Redis.ConnectionMultiplexer
Résultat StackExchange.Redis.ConnectionMultiplexer

ToString() public méthode

Returns a string that represents the current object.
public ToString ( ) : string
Résultat string