Skip to main content

RedisServerEvents

Assembly: ServiceStack.Server.dll
View Source
Declaration
public class RedisServerEvents : object, IServerEvents

Properties

Local

View Source
Declaration
public MemoryServerEvents Local { get; }

Timeout

View Source
Declaration
public TimeSpan Timeout { get; set; }

HouseKeepingInterval

View Source
Declaration
public TimeSpan HouseKeepingInterval { get; set; }

OnSubscribeAsync

View Source
Declaration
public Func<IEventSubscription, Task> OnSubscribeAsync { get; set; }

OnUnsubscribeAsync

View Source
Declaration
public Func<IEventSubscription, Task> OnUnsubscribeAsync { get; set; }

OnUpdateAsync

View Source
Declaration
public Func<IEventSubscription, Task> OnUpdateAsync { get; set; }

NotifyChannelOfSubscriptions

View Source
Declaration
public bool NotifyChannelOfSubscriptions { get; set; }

WaitBeforeNextRestart

View Source
Declaration
public TimeSpan? WaitBeforeNextRestart { get; set; }

RedisPubSub

View Source
Declaration
public IRedisPubSubServer RedisPubSub { get; set; }

Fields

Topic

View Source
Declaration
public static string Topic

clientsManager

View Source
Declaration
public readonly IRedisClientsManager clientsManager

Methods

UnRegisterExpiredSubscriptions()

View Source
Declaration
public void UnRegisterExpiredSubscriptions()

UnRegisterSubIds(IRedisClient, List<String>)

View Source
Declaration
public void UnRegisterSubIds(IRedisClient redis, List<string> expiredSubIds)
Parameters
TypeName
ServiceStack.Redis.IRedisClientredis
List<System.String>expiredSubIds

NotifyAll(String, Object)

View Source
Declaration
public void NotifyAll(string selector, object message)
Parameters
TypeName
System.Stringselector
System.Objectmessage

NotifyAllAsync(String, Object, CancellationToken)

View Source
Declaration
public Task NotifyAllAsync(string selector, object message, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.Stringselector
System.Objectmessage
CancellationTokentoken

NotifyAllJsonAsync(String, String, CancellationToken)

View Source
Declaration
public Task NotifyAllJsonAsync(string selector, string json, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.Stringselector
System.Stringjson
CancellationTokentoken

NotifyChannels(String[], String, IDictionary<String, String>)

View Source
Declaration
public void NotifyChannels(string[] channels, string selector, IDictionary<string, string> meta)
Parameters
TypeName
System.String[]channels
System.Stringselector
IDictionary<System.String,System.String>meta

NotifyChannelsAsync(String[], String, IDictionary<String, String>, CancellationToken)

View Source
Declaration
public Task NotifyChannelsAsync(string[] channels, string selector, IDictionary<string, string> meta, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.String[]channels
System.Stringselector
IDictionary<System.String,System.String>meta
CancellationTokentoken

NotifyChannel(String, String, Object)

View Source
Declaration
public void NotifyChannel(string channel, string selector, object message)
Parameters
TypeName
System.Stringchannel
System.Stringselector
System.Objectmessage

NotifyChannelAsync(String, String, Object, CancellationToken)

View Source
Declaration
public Task NotifyChannelAsync(string channel, string selector, object message, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.Stringchannel
System.Stringselector
System.Objectmessage
CancellationTokentoken

NotifyChannelJsonAsync(String, String, String, CancellationToken)

View Source
Declaration
public Task NotifyChannelJsonAsync(string channel, string selector, string json, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.Stringchannel
System.Stringselector
System.Stringjson
CancellationTokentoken

NotifySubscription(String, String, Object, String)

View Source
Declaration
public void NotifySubscription(string subscriptionId, string selector, object message, string channel = null)
Parameters
TypeName
System.StringsubscriptionId
System.Stringselector
System.Objectmessage
System.Stringchannel

NotifySubscriptionAsync(String, String, Object, String, CancellationToken)

View Source
Declaration
public Task NotifySubscriptionAsync(string subscriptionId, string selector, object message, string channel = null, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.StringsubscriptionId
System.Stringselector
System.Objectmessage
System.Stringchannel
CancellationTokentoken

NotifySubscriptionJsonAsync(String, String, String, String, CancellationToken)

View Source
Declaration
public Task NotifySubscriptionJsonAsync(string subscriptionId, string selector, string json, string channel = null, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.StringsubscriptionId
System.Stringselector
System.Stringjson
System.Stringchannel
CancellationTokentoken

NotifyUserId(String, String, Object, String)

View Source
Declaration
public void NotifyUserId(string userId, string selector, object message, string channel = null)
Parameters
TypeName
System.StringuserId
System.Stringselector
System.Objectmessage
System.Stringchannel

NotifyUserIdAsync(String, String, Object, String, CancellationToken)

View Source
Declaration
public Task NotifyUserIdAsync(string userId, string selector, object message, string channel = null, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.StringuserId
System.Stringselector
System.Objectmessage
System.Stringchannel
CancellationTokentoken

NotifyUserIdJsonAsync(String, String, String, String, CancellationToken)

View Source
Declaration
public Task NotifyUserIdJsonAsync(string userId, string selector, string json, string channel = null, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.StringuserId
System.Stringselector
System.Stringjson
System.Stringchannel
CancellationTokentoken

NotifyUserName(String, String, Object, String)

View Source
Declaration
public void NotifyUserName(string userName, string selector, object message, string channel = null)
Parameters
TypeName
System.StringuserName
System.Stringselector
System.Objectmessage
System.Stringchannel

NotifyUserNameAsync(String, String, Object, String, CancellationToken)

View Source
Declaration
public Task NotifyUserNameAsync(string userName, string selector, object message, string channel = null, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.StringuserName
System.Stringselector
System.Objectmessage
System.Stringchannel
CancellationTokentoken

NotifyUserNameJsonAsync(String, String, String, String, CancellationToken)

View Source
Declaration
public Task NotifyUserNameJsonAsync(string userName, string selector, string json, string channel = null, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.StringuserName
System.Stringselector
System.Stringjson
System.Stringchannel
CancellationTokentoken

NotifySession(String, String, Object, String)

View Source
Declaration
public void NotifySession(string sessionId, string selector, object message, string channel = null)
Parameters
TypeName
System.StringsessionId
System.Stringselector
System.Objectmessage
System.Stringchannel

NotifySessionAsync(String, String, Object, String, CancellationToken)

View Source
Declaration
public Task NotifySessionAsync(string sessionId, string selector, object message, string channel = null, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.StringsessionId
System.Stringselector
System.Objectmessage
System.Stringchannel
CancellationTokentoken

NotifySessionJsonAsync(String, String, String, String, CancellationToken)

View Source
Declaration
public Task NotifySessionJsonAsync(string sessionId, string selector, string json, string channel = null, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.StringsessionId
System.Stringselector
System.Stringjson
System.Stringchannel
CancellationTokentoken

GetSubscriptionInfo(String)

View Source
Declaration
public SubscriptionInfo GetSubscriptionInfo(string id)
Returns

ServiceStack.SubscriptionInfo

Parameters
TypeName
System.Stringid

GetSubscriptionInfosByUserId(String)

View Source
Declaration
public List<SubscriptionInfo> GetSubscriptionInfosByUserId(string userId)
Returns

List<ServiceStack.SubscriptionInfo>

Parameters
TypeName
System.StringuserId

RegisterAsync(IEventSubscription, Dictionary<String, String>, CancellationToken)

View Source
Declaration
public async Task RegisterAsync(IEventSubscription sub, Dictionary<string, string> connectArgs = null, CancellationToken token = null)
Returns

Task

Parameters
TypeName
ServiceStack.IEventSubscriptionsub
Dictionary<System.String,System.String>connectArgs
CancellationTokentoken

UnRegister(String)

View Source
Declaration
public void UnRegister(string subscriptionId)
Parameters
TypeName
System.StringsubscriptionId

UnRegisterAsync(String, CancellationToken)

View Source
Declaration
public Task UnRegisterAsync(string subscriptionId, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.StringsubscriptionId
CancellationTokentoken

GetNextSequence(String)

View Source
Declaration
public long GetNextSequence(string sequenceId)
Returns

System.Int64

Parameters
TypeName
System.StringsequenceId

RemoveExpiredSubscriptions()

View Source
Declaration
public int RemoveExpiredSubscriptions()
Returns

System.Int32

RemoveExpiredSubscriptionsAsync(CancellationToken)

View Source
Declaration
public Task<int> RemoveExpiredSubscriptionsAsync(CancellationToken token = null)
Returns

Task<System.Int32>

Parameters
TypeName
CancellationTokentoken

SubscribeToChannels(String, String[])

View Source
Declaration
public void SubscribeToChannels(string subscriptionId, string[] channels)
Parameters
TypeName
System.StringsubscriptionId
System.String[]channels

SubscribeToChannelsAsync(String, String[], CancellationToken)

View Source
Declaration
public Task SubscribeToChannelsAsync(string subscriptionId, string[] channels, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.StringsubscriptionId
System.String[]channels
CancellationTokentoken

UnsubscribeFromChannels(String, String[])

View Source
Declaration
public void UnsubscribeFromChannels(string subscriptionId, string[] channels)
Parameters
TypeName
System.StringsubscriptionId
System.String[]channels

UnsubscribeFromChannelsAsync(String, String[], CancellationToken)

View Source
Declaration
public Task UnsubscribeFromChannelsAsync(string subscriptionId, string[] channels, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.StringsubscriptionId
System.String[]channels
CancellationTokentoken

QueueAsyncTask(Func<Task>)

View Source
Declaration
public void QueueAsyncTask(Func<Task> task)
Parameters
TypeName
Func<Task>task

GetMemoryServerEvents()

View Source
Declaration
public MemoryServerEvents GetMemoryServerEvents()
Returns

ServiceStack.MemoryServerEvents

GetSubscriptionsDetails(String[])

View Source
Declaration
public List<Dictionary<string, string>> GetSubscriptionsDetails(params string[] channels)
Returns

List<Dictionary<System.String,System.String>>

Parameters
TypeName
System.String[]channels

GetAllSubscriptionsDetails()

View Source
Declaration
public List<Dictionary<string, string>> GetAllSubscriptionsDetails()
Returns

List<Dictionary<System.String,System.String>>

GetAllSubscriptionInfos()

View Source
Declaration
public List<SubscriptionInfo> GetAllSubscriptionInfos()
Returns

List<ServiceStack.SubscriptionInfo>

PulseAsync(String, CancellationToken)

View Source
Declaration
public Task<bool> PulseAsync(string subscriptionId, CancellationToken token = null)
Returns

Task<System.Boolean>

Parameters
TypeName
System.StringsubscriptionId
CancellationTokentoken

Reset()

View Source
Declaration
public void Reset()

Start()

View Source
Declaration
public void Start()

Stop()

View Source
Declaration
public void Stop()

StopAsync()

View Source
Declaration
public async Task StopAsync()
Returns

Task

GetStats()

View Source
Declaration
public Dictionary<string, string> GetStats()
Returns

Dictionary<System.String,System.String>

NotifyRedisAsync(String, String, Object, String, CancellationToken)

View Source
Declaration
protected Task NotifyRedisAsync(string key, string selector, object message, string channel = null, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.Stringkey
System.Stringselector
System.Objectmessage
System.Stringchannel
CancellationTokentoken

NotifyRedisRawAsync(String, String, String, String, CancellationToken)

View Source
Declaration
protected Task NotifyRedisRawAsync(string key, string selector, string json, string channel = null, CancellationToken token = null)
Returns

Task

Parameters
TypeName
System.Stringkey
System.Stringselector
System.Stringjson
System.Stringchannel
CancellationTokentoken

NotifyRedisRaw(String, String, String, String)

View Source
Declaration
protected void NotifyRedisRaw(string key, string selector, string json, string channel = null)
Parameters
TypeName
System.Stringkey
System.Stringselector
System.Stringjson
System.Stringchannel

NotifyRedis(String, String, Object, String)

View Source
Declaration
protected void NotifyRedis(string key, string selector, object message, string channel = null)
Parameters
TypeName
System.Stringkey
System.Stringselector
System.Objectmessage
System.Stringchannel

HandleMessage(String, String)

View Source
Declaration
public void HandleMessage(string channel, string message)
Parameters
TypeName
System.Stringchannel
System.Stringmessage

OnMessage(String)

View Source
Declaration
protected void OnMessage(string message)
Parameters
TypeName
System.Stringmessage

Dispose()

View Source
Declaration
public void Dispose()

Implements