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
Type | Name |
---|---|
ServiceStack.Redis.IRedisClient | redis |
List<System.String> | expiredSubIds |
NotifyAll(String, Object)
View Source
Declaration
public void NotifyAll(string selector, object message)
Parameters
Type | Name |
---|---|
System.String | selector |
System.Object | message |
NotifyAllAsync(String, Object, CancellationToken)
View Source
Declaration
public Task NotifyAllAsync(string selector, object message, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
System.String | selector |
System.Object | message |
CancellationToken | token |
NotifyAllJsonAsync(String, String, CancellationToken)
View Source
Declaration
public Task NotifyAllJsonAsync(string selector, string json, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
System.String | selector |
System.String | json |
CancellationToken | token |
NotifyChannels(String[], String, IDictionary<String, String>)
View Source
Declaration
public void NotifyChannels(string[] channels, string selector, IDictionary<string, string> meta)
Parameters
Type | Name |
---|---|
System.String[] | channels |
System.String | selector |
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
Type | Name |
---|---|
System.String[] | channels |
System.String | selector |
IDictionary<System.String,System.String> | meta |
CancellationToken | token |
NotifyChannel(String, String, Object)
View Source
Declaration
public void NotifyChannel(string channel, string selector, object message)
Parameters
Type | Name |
---|---|
System.String | channel |
System.String | selector |
System.Object | message |
NotifyChannelAsync(String, String, Object, CancellationToken)
View Source
Declaration
public Task NotifyChannelAsync(string channel, string selector, object message, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
System.String | channel |
System.String | selector |
System.Object | message |
CancellationToken | token |
NotifyChannelJsonAsync(String, String, String, CancellationToken)
View Source
Declaration
public Task NotifyChannelJsonAsync(string channel, string selector, string json, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
System.String | channel |
System.String | selector |
System.String | json |
CancellationToken | token |
NotifySubscription(String, String, Object, String)
View Source
Declaration
public void NotifySubscription(string subscriptionId, string selector, object message, string channel = null)
Parameters
Type | Name |
---|---|
System.String | subscriptionId |
System.String | selector |
System.Object | message |
System.String | channel |
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
Type | Name |
---|---|
System.String | subscriptionId |
System.String | selector |
System.Object | message |
System.String | channel |
CancellationToken | token |
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
Type | Name |
---|---|
System.String | subscriptionId |
System.String | selector |
System.String | json |
System.String | channel |
CancellationToken | token |
NotifyUserId(String, String, Object, String)
View Source
Declaration
public void NotifyUserId(string userId, string selector, object message, string channel = null)
Parameters
Type | Name |
---|---|
System.String | userId |
System.String | selector |
System.Object | message |
System.String | channel |
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
Type | Name |
---|---|
System.String | userId |
System.String | selector |
System.Object | message |
System.String | channel |
CancellationToken | token |
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
Type | Name |
---|---|
System.String | userId |
System.String | selector |
System.String | json |
System.String | channel |
CancellationToken | token |
NotifyUserName(String, String, Object, String)
View Source
Declaration
public void NotifyUserName(string userName, string selector, object message, string channel = null)
Parameters
Type | Name |
---|---|
System.String | userName |
System.String | selector |
System.Object | message |
System.String | channel |
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
Type | Name |
---|---|
System.String | userName |
System.String | selector |
System.Object | message |
System.String | channel |
CancellationToken | token |
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
Type | Name |
---|---|
System.String | userName |
System.String | selector |
System.String | json |
System.String | channel |
CancellationToken | token |
NotifySession(String, String, Object, String)
View Source
Declaration
public void NotifySession(string sessionId, string selector, object message, string channel = null)
Parameters
Type | Name |
---|---|
System.String | sessionId |
System.String | selector |
System.Object | message |
System.String | channel |
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
Type | Name |
---|---|
System.String | sessionId |
System.String | selector |
System.Object | message |
System.String | channel |
CancellationToken | token |
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
Type | Name |
---|---|
System.String | sessionId |
System.String | selector |
System.String | json |
System.String | channel |
CancellationToken | token |
GetSubscriptionInfo(String)
View Source
Declaration
public SubscriptionInfo GetSubscriptionInfo(string id)
Returns
Parameters
Type | Name |
---|---|
System.String | id |
GetSubscriptionInfosByUserId(String)
View Source
Declaration
public List<SubscriptionInfo> GetSubscriptionInfosByUserId(string userId)
Returns
List<ServiceStack.SubscriptionInfo>
Parameters
Type | Name |
---|---|
System.String | userId |
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
Type | Name |
---|---|
ServiceStack.IEventSubscription | sub |
Dictionary<System.String,System.String> | connectArgs |
CancellationToken | token |
UnRegister(String)
View Source
Declaration
public void UnRegister(string subscriptionId)
Parameters
Type | Name |
---|---|
System.String | subscriptionId |
UnRegisterAsync(String, CancellationToken)
View Source
Declaration
public Task UnRegisterAsync(string subscriptionId, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
System.String | subscriptionId |
CancellationToken | token |
GetNextSequence(String)
View Source
Declaration
public long GetNextSequence(string sequenceId)
Returns
System.Int64
Parameters
Type | Name |
---|---|
System.String | sequenceId |
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
Type | Name |
---|---|
CancellationToken | token |
SubscribeToChannels(String, String[])
View Source
Declaration
public void SubscribeToChannels(string subscriptionId, string[] channels)
Parameters
Type | Name |
---|---|
System.String | subscriptionId |
System.String[] | channels |
SubscribeToChannelsAsync(String, String[], CancellationToken)
View Source
Declaration
public Task SubscribeToChannelsAsync(string subscriptionId, string[] channels, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
System.String | subscriptionId |
System.String[] | channels |
CancellationToken | token |
UnsubscribeFromChannels(String, String[])
View Source
Declaration
public void UnsubscribeFromChannels(string subscriptionId, string[] channels)
Parameters
Type | Name |
---|---|
System.String | subscriptionId |
System.String[] | channels |
UnsubscribeFromChannelsAsync(String, String[], CancellationToken)
View Source
Declaration
public Task UnsubscribeFromChannelsAsync(string subscriptionId, string[] channels, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
System.String | subscriptionId |
System.String[] | channels |
CancellationToken | token |
QueueAsyncTask(Func<Task>)
View Source
Declaration
public void QueueAsyncTask(Func<Task> task)
Parameters
Type | Name |
---|---|
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
Type | Name |
---|---|
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
Type | Name |
---|---|
System.String | subscriptionId |
CancellationToken | token |
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
Type | Name |
---|---|
System.String | key |
System.String | selector |
System.Object | message |
System.String | channel |
CancellationToken | token |
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
Type | Name |
---|---|
System.String | key |
System.String | selector |
System.String | json |
System.String | channel |
CancellationToken | token |
NotifyRedisRaw(String, String, String, String)
View Source
Declaration
protected void NotifyRedisRaw(string key, string selector, string json, string channel = null)
Parameters
Type | Name |
---|---|
System.String | key |
System.String | selector |
System.String | json |
System.String | channel |
NotifyRedis(String, String, Object, String)
View Source
Declaration
protected void NotifyRedis(string key, string selector, object message, string channel = null)
Parameters
Type | Name |
---|---|
System.String | key |
System.String | selector |
System.Object | message |
System.String | channel |
HandleMessage(String, String)
View Source
Declaration
public void HandleMessage(string channel, string message)
Parameters
Type | Name |
---|---|
System.String | channel |
System.String | message |
OnMessage(String)
View Source
Declaration
protected void OnMessage(string message)
Parameters
Type | Name |
---|---|
System.String | message |
Dispose()
View Source
Declaration
public void Dispose()
Implements
- ServiceStack.IServerEvents
IDisposable