C# Класс BB.Caching.SharedCache

The shared / L2 / redis cache.
Показать файл Открыть проект

Открытые методы

Метод Описание
AddRedisConnectionGroup ( ConnectionGroup connectionGroup ) : void

Adds a connectionGroup to the hash ring.

FlushDatabase ( StackExchange.Redis.ConnectionMultiplexer connection ) : void

Flushes the database that the connection belongs to.

GetAllReadConnections ( ) : StackExchange.Redis.ConnectionMultiplexer[]

Gets all read-only connections.

GetAllWriteConnections ( ) : StackExchange.Redis.ConnectionMultiplexer[]

Gets all read-write connections.

GetAnalyticsReadConnection ( ) : StackExchange.Redis.ConnectionMultiplexer

Gets a read-only connection used by analytics methods.

GetAnalyticsWriteConnection ( ) : StackExchange.Redis.ConnectionMultiplexer

Gets the read-write connection used by analytics methods.

GetRandomReadConnection ( ) : StackExchange.Redis.ConnectionMultiplexer

Gets a random read-only connection.

GetReadConnection ( RedisKey key ) : StackExchange.Redis.ConnectionMultiplexer

Gets a read-only connection.

GetReadConnections ( RedisKey keys ) : RedisKey[]>.Dictionary

Gets read-only connections for each of the keys supplied.

GetWriteConnection ( RedisKey key ) : StackExchange.Redis.ConnectionMultiplexer

Gets the read-write connection for the key supplied.

GetWriteConnection ( RedisKey keys ) : RedisKey[]>.Dictionary

Gets read-write connections for each of the keys supplied.

RemoveRedisConnectionGroup ( ConnectionGroup connectionGroup ) : void

Removes a connectionGroup to the hash ring.

SetAnalyticsConnectionGroup ( ConnectionGroup connectionGroup ) : void

Sets the connectionGroup used by the analytics methods.

Приватные методы

Метод Описание
SharedCache ( ) : System

Prevents a default instance of the SharedCache class from being created.

Описание методов

AddRedisConnectionGroup() публичный Метод

Adds a connectionGroup to the hash ring.
public AddRedisConnectionGroup ( ConnectionGroup connectionGroup ) : void
connectionGroup ConnectionGroup /// The connection group. ///
Результат void

FlushDatabase() публичный Метод

Flushes the database that the connection belongs to.
public FlushDatabase ( StackExchange.Redis.ConnectionMultiplexer connection ) : void
connection StackExchange.Redis.ConnectionMultiplexer /// The connection. ///
Результат void

GetAllReadConnections() публичный Метод

Gets all read-only connections.
public GetAllReadConnections ( ) : StackExchange.Redis.ConnectionMultiplexer[]
Результат StackExchange.Redis.ConnectionMultiplexer[]

GetAllWriteConnections() публичный Метод

Gets all read-write connections.
public GetAllWriteConnections ( ) : StackExchange.Redis.ConnectionMultiplexer[]
Результат StackExchange.Redis.ConnectionMultiplexer[]

GetAnalyticsReadConnection() публичный Метод

Gets a read-only connection used by analytics methods.
public GetAnalyticsReadConnection ( ) : StackExchange.Redis.ConnectionMultiplexer
Результат StackExchange.Redis.ConnectionMultiplexer

GetAnalyticsWriteConnection() публичный Метод

Gets the read-write connection used by analytics methods.
public GetAnalyticsWriteConnection ( ) : StackExchange.Redis.ConnectionMultiplexer
Результат StackExchange.Redis.ConnectionMultiplexer

GetRandomReadConnection() публичный Метод

Gets a random read-only connection.
public GetRandomReadConnection ( ) : StackExchange.Redis.ConnectionMultiplexer
Результат StackExchange.Redis.ConnectionMultiplexer

GetReadConnection() публичный Метод

Gets a read-only connection.
public GetReadConnection ( RedisKey key ) : StackExchange.Redis.ConnectionMultiplexer
key RedisKey /// The key. ///
Результат StackExchange.Redis.ConnectionMultiplexer

GetReadConnections() публичный Метод

Gets read-only connections for each of the keys supplied.
public GetReadConnections ( RedisKey keys ) : RedisKey[]>.Dictionary
keys RedisKey /// The keys to get read connections for. ///
Результат RedisKey[]>.Dictionary

GetWriteConnection() публичный Метод

Gets the read-write connection for the key supplied.
public GetWriteConnection ( RedisKey key ) : StackExchange.Redis.ConnectionMultiplexer
key RedisKey /// The key. ///
Результат StackExchange.Redis.ConnectionMultiplexer

GetWriteConnection() публичный Метод

Gets read-write connections for each of the keys supplied.
public GetWriteConnection ( RedisKey keys ) : RedisKey[]>.Dictionary
keys RedisKey /// The keys to get read-write connections for. ///
Результат RedisKey[]>.Dictionary

RemoveRedisConnectionGroup() публичный Метод

Removes a connectionGroup to the hash ring.
public RemoveRedisConnectionGroup ( ConnectionGroup connectionGroup ) : void
connectionGroup ConnectionGroup /// The connection group. ///
Результат void

SetAnalyticsConnectionGroup() публичный Метод

Sets the connectionGroup used by the analytics methods.
public SetAnalyticsConnectionGroup ( ConnectionGroup connectionGroup ) : void
connectionGroup ConnectionGroup /// The connection group. ///
Результат void