C# 클래스 BB.Caching.Redis.PubSub.PubSubSingleton

A singleton to hold open a pub sub instance.
파일 보기 프로젝트 열기: JesseBuesking/BB.Caching

Private Properties

프로퍼티 타입 설명
GetConnection StackExchange.Redis.ConnectionMultiplexer
PubSubSingleton System

공개 메소드들

메소드 설명
Init ( StackExchange.Redis.ConnectionMultiplexer connection ) : void

Configures the singleton.

Publish ( string channel, string value ) : long

Publishes a message to a channel.

Publish ( string channel, string key, string value ) : long

Publishes a message to a channel for a specific key.

PublishAsync ( string channel, string value ) : Task

Publishes a message to a channel.

PublishAsync ( string channel, string key, string value ) : Task

Publishes a message to a channel for a specific key.

Subscribe ( string channel, Action subscriptionCallback ) : void

Creates a subscription to a channel.

Subscribe ( string channel, string key, Action subscriptionCallback ) : void

Creates a subscription to a channel for a specific key.

SubscribeAsync ( string channel, Action subscriptionCallback ) : Task

Creates a subscription to a channel.

SubscribeAsync ( string channel, string key, Action subscriptionCallback ) : Task

Creates a subscription to a channel for a specific key.

비공개 메소드들

메소드 설명
GetConnection ( ) : StackExchange.Redis.ConnectionMultiplexer

Gets a connection, automatically re-establishing all active subscriptions if the connection was re-created.

PubSubSingleton ( ) : System

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

메소드 상세

Init() 공개 메소드

Configures the singleton.
public Init ( StackExchange.Redis.ConnectionMultiplexer connection ) : void
connection StackExchange.Redis.ConnectionMultiplexer /// The connection. ///
리턴 void

Publish() 공개 메소드

Publishes a message to a channel.
public Publish ( string channel, string value ) : long
channel string The channel to publish to.
value string The value of the message.
리턴 long

Publish() 공개 메소드

Publishes a message to a channel for a specific key.
public Publish ( string channel, string key, string value ) : long
channel string /// The channel to publish to. ///
key string /// The key to target. ///
value string /// The value of the message. ///
리턴 long

PublishAsync() 공개 메소드

Publishes a message to a channel.
public PublishAsync ( string channel, string value ) : Task
channel string /// The channel to publish to. ///
value string /// The value of the message. ///
리턴 Task

PublishAsync() 공개 메소드

Publishes a message to a channel for a specific key.
public PublishAsync ( string channel, string key, string value ) : Task
channel string /// The channel to publish to. ///
key string /// The key to target. ///
value string /// The value of the message. ///
리턴 Task

Subscribe() 공개 메소드

Creates a subscription to a channel.
public Subscribe ( string channel, Action subscriptionCallback ) : void
channel string /// The channel of the subscription. ///
subscriptionCallback Action /// The callback method. ///
리턴 void

Subscribe() 공개 메소드

Creates a subscription to a channel for a specific key.
public Subscribe ( string channel, string key, Action subscriptionCallback ) : void
channel string /// The channel of the subscription. ///
key string /// The key to target. ///
subscriptionCallback Action /// The callback method. ///
리턴 void

SubscribeAsync() 공개 메소드

Creates a subscription to a channel.
public SubscribeAsync ( string channel, Action subscriptionCallback ) : Task
channel string /// The channel of the subscription. ///
subscriptionCallback Action /// The callback method. ///
리턴 Task

SubscribeAsync() 공개 메소드

Creates a subscription to a channel for a specific key.
public SubscribeAsync ( string channel, string key, Action subscriptionCallback ) : Task
channel string /// The channel of the subscription. ///
key string /// The key to target. ///
subscriptionCallback Action /// The callback method. ///
리턴 Task