Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
c9ee9ab9
Commit
c9ee9ab9
authored
Mar 12, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: ISubscriber
parent
0ccd0c23
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
ISubscriber.cs
...hange.Redis/StackExchange/Redis/Interfaces/ISubscriber.cs
+26
-0
No files found.
StackExchange.Redis/StackExchange/Redis/Interfaces/ISubscriber.cs
View file @
c9ee9ab9
...
@@ -12,12 +12,16 @@ public interface ISubscriber : IRedis
...
@@ -12,12 +12,16 @@ public interface ISubscriber : IRedis
/// <summary>
/// <summary>
/// Inidicate exactly which redis server we are talking to
/// Inidicate exactly which redis server we are talking to
/// </summary>
/// </summary>
/// <param name="channel">The channel to identify the server endpoint by.</param>
/// <param name="flags">The command flags to use.</param>
[
IgnoreNamePrefix
]
[
IgnoreNamePrefix
]
EndPoint
IdentifyEndpoint
(
RedisChannel
channel
,
CommandFlags
flags
=
CommandFlags
.
None
);
EndPoint
IdentifyEndpoint
(
RedisChannel
channel
,
CommandFlags
flags
=
CommandFlags
.
None
);
/// <summary>
/// <summary>
/// Inidicate exactly which redis server we are talking to
/// Inidicate exactly which redis server we are talking to
/// </summary>
/// </summary>
/// <param name="channel">The channel to identify the server endpoint by.</param>
/// <param name="flags">The command flags to use.</param>
[
IgnoreNamePrefix
]
[
IgnoreNamePrefix
]
Task
<
EndPoint
>
IdentifyEndpointAsync
(
RedisChannel
channel
,
CommandFlags
flags
=
CommandFlags
.
None
);
Task
<
EndPoint
>
IdentifyEndpointAsync
(
RedisChannel
channel
,
CommandFlags
flags
=
CommandFlags
.
None
);
...
@@ -27,11 +31,15 @@ public interface ISubscriber : IRedis
...
@@ -27,11 +31,15 @@ public interface ISubscriber : IRedis
/// resolve the server responsible for that subscription - otherwise the
/// resolve the server responsible for that subscription - otherwise the
/// server is chosen aribtraily from the masters.
/// server is chosen aribtraily from the masters.
/// </summary>
/// </summary>
/// <param name="channel">The channel to identify the server endpoint by.</param>
bool
IsConnected
(
RedisChannel
channel
=
default
(
RedisChannel
));
bool
IsConnected
(
RedisChannel
channel
=
default
(
RedisChannel
));
/// <summary>
/// <summary>
/// Posts a message to the given channel.
/// Posts a message to the given channel.
/// </summary>
/// </summary>
/// <param name="channel">The channel to publish to.</param>
/// <param name="message">The message to publish.</param>
/// <param name="flags">The command flags to use.</param>
/// <returns>the number of clients that received the message.</returns>
/// <returns>the number of clients that received the message.</returns>
/// <remarks>https://redis.io/commands/publish</remarks>
/// <remarks>https://redis.io/commands/publish</remarks>
long
Publish
(
RedisChannel
channel
,
RedisValue
message
,
CommandFlags
flags
=
CommandFlags
.
None
);
long
Publish
(
RedisChannel
channel
,
RedisValue
message
,
CommandFlags
flags
=
CommandFlags
.
None
);
...
@@ -39,6 +47,9 @@ public interface ISubscriber : IRedis
...
@@ -39,6 +47,9 @@ public interface ISubscriber : IRedis
/// <summary>
/// <summary>
/// Posts a message to the given channel.
/// Posts a message to the given channel.
/// </summary>
/// </summary>
/// <param name="channel">The channel to publish to.</param>
/// <param name="message">The message to publish.</param>
/// <param name="flags">The command flags to use.</param>
/// <returns>the number of clients that received the message.</returns>
/// <returns>the number of clients that received the message.</returns>
/// <remarks>https://redis.io/commands/publish</remarks>
/// <remarks>https://redis.io/commands/publish</remarks>
Task
<
long
>
PublishAsync
(
RedisChannel
channel
,
RedisValue
message
,
CommandFlags
flags
=
CommandFlags
.
None
);
Task
<
long
>
PublishAsync
(
RedisChannel
channel
,
RedisValue
message
,
CommandFlags
flags
=
CommandFlags
.
None
);
...
@@ -46,6 +57,9 @@ public interface ISubscriber : IRedis
...
@@ -46,6 +57,9 @@ public interface ISubscriber : IRedis
/// <summary>
/// <summary>
/// Subscribe to perform some operation when a change to the preferred/active node is broadcast.
/// Subscribe to perform some operation when a change to the preferred/active node is broadcast.
/// </summary>
/// </summary>
/// <param name="channel">The channel to subscribe to.</param>
/// <param name="handler">The handler to invoke when a message is received on <paramref name="channel"/>.</param>
/// <param name="flags">The command flags to use.</param>
/// <remarks>https://redis.io/commands/subscribe</remarks>
/// <remarks>https://redis.io/commands/subscribe</remarks>
/// <remarks>https://redis.io/commands/psubscribe</remarks>
/// <remarks>https://redis.io/commands/psubscribe</remarks>
void
Subscribe
(
RedisChannel
channel
,
Action
<
RedisChannel
,
RedisValue
>
handler
,
CommandFlags
flags
=
CommandFlags
.
None
);
void
Subscribe
(
RedisChannel
channel
,
Action
<
RedisChannel
,
RedisValue
>
handler
,
CommandFlags
flags
=
CommandFlags
.
None
);
...
@@ -53,6 +67,9 @@ public interface ISubscriber : IRedis
...
@@ -53,6 +67,9 @@ public interface ISubscriber : IRedis
/// <summary>
/// <summary>
/// Subscribe to perform some operation when a change to the preferred/active node is broadcast.
/// Subscribe to perform some operation when a change to the preferred/active node is broadcast.
/// </summary>
/// </summary>
/// <param name="channel">The channel to subscribe to.</param>
/// <param name="handler">The handler to invoke when a message is received on <paramref name="channel"/>.</param>
/// <param name="flags">The command flags to use.</param>
/// <remarks>https://redis.io/commands/subscribe</remarks>
/// <remarks>https://redis.io/commands/subscribe</remarks>
/// <remarks>https://redis.io/commands/psubscribe</remarks>
/// <remarks>https://redis.io/commands/psubscribe</remarks>
Task
SubscribeAsync
(
RedisChannel
channel
,
Action
<
RedisChannel
,
RedisValue
>
handler
,
CommandFlags
flags
=
CommandFlags
.
None
);
Task
SubscribeAsync
(
RedisChannel
channel
,
Action
<
RedisChannel
,
RedisValue
>
handler
,
CommandFlags
flags
=
CommandFlags
.
None
);
...
@@ -61,6 +78,7 @@ public interface ISubscriber : IRedis
...
@@ -61,6 +78,7 @@ public interface ISubscriber : IRedis
/// Inidicate to which redis server we are actively subscribed for a given channel; returns null if
/// Inidicate to which redis server we are actively subscribed for a given channel; returns null if
/// the channel is not actively subscribed
/// the channel is not actively subscribed
/// </summary>
/// </summary>
/// <param name="channel">The channel to check which server endpoint was subscribed on.</param>
[
IgnoreNamePrefix
]
[
IgnoreNamePrefix
]
EndPoint
SubscribedEndpoint
(
RedisChannel
channel
);
EndPoint
SubscribedEndpoint
(
RedisChannel
channel
);
...
@@ -69,6 +87,9 @@ public interface ISubscriber : IRedis
...
@@ -69,6 +87,9 @@ public interface ISubscriber : IRedis
/// of the subscribers; if a handler is specified, the subscription is only cancelled if this handler is the
/// of the subscribers; if a handler is specified, the subscription is only cancelled if this handler is the
/// last handler remaining against the channel
/// last handler remaining against the channel
/// </summary>
/// </summary>
/// <param name="channel">The channel that was subscribed to.</param>
/// <param name="handler">The handler to no longer invoke when a message is received on <paramref name="channel"/>.</param>
/// <param name="flags">The command flags to use.</param>
/// <remarks>https://redis.io/commands/unsubscribe</remarks>
/// <remarks>https://redis.io/commands/unsubscribe</remarks>
/// <remarks>https://redis.io/commands/punsubscribe</remarks>
/// <remarks>https://redis.io/commands/punsubscribe</remarks>
void
Unsubscribe
(
RedisChannel
channel
,
Action
<
RedisChannel
,
RedisValue
>
handler
=
null
,
CommandFlags
flags
=
CommandFlags
.
None
);
void
Unsubscribe
(
RedisChannel
channel
,
Action
<
RedisChannel
,
RedisValue
>
handler
=
null
,
CommandFlags
flags
=
CommandFlags
.
None
);
...
@@ -76,6 +97,7 @@ public interface ISubscriber : IRedis
...
@@ -76,6 +97,7 @@ public interface ISubscriber : IRedis
/// <summary>
/// <summary>
/// Unsubscribe all subscriptions on this instance
/// Unsubscribe all subscriptions on this instance
/// </summary>
/// </summary>
/// <param name="flags">The command flags to use.</param>
/// <remarks>https://redis.io/commands/unsubscribe</remarks>
/// <remarks>https://redis.io/commands/unsubscribe</remarks>
/// <remarks>https://redis.io/commands/punsubscribe</remarks>
/// <remarks>https://redis.io/commands/punsubscribe</remarks>
void
UnsubscribeAll
(
CommandFlags
flags
=
CommandFlags
.
None
);
void
UnsubscribeAll
(
CommandFlags
flags
=
CommandFlags
.
None
);
...
@@ -83,6 +105,7 @@ public interface ISubscriber : IRedis
...
@@ -83,6 +105,7 @@ public interface ISubscriber : IRedis
/// <summary>
/// <summary>
/// Unsubscribe all subscriptions on this instance
/// Unsubscribe all subscriptions on this instance
/// </summary>
/// </summary>
/// <param name="flags">The command flags to use.</param>
/// <remarks>https://redis.io/commands/unsubscribe</remarks>
/// <remarks>https://redis.io/commands/unsubscribe</remarks>
/// <remarks>https://redis.io/commands/punsubscribe</remarks>
/// <remarks>https://redis.io/commands/punsubscribe</remarks>
Task
UnsubscribeAllAsync
(
CommandFlags
flags
=
CommandFlags
.
None
);
Task
UnsubscribeAllAsync
(
CommandFlags
flags
=
CommandFlags
.
None
);
...
@@ -92,6 +115,9 @@ public interface ISubscriber : IRedis
...
@@ -92,6 +115,9 @@ public interface ISubscriber : IRedis
/// of the subscribers; if a handler is specified, the subscription is only cancelled if this handler is the
/// of the subscribers; if a handler is specified, the subscription is only cancelled if this handler is the
/// last handler remaining against the channel
/// last handler remaining against the channel
/// </summary>
/// </summary>
/// <param name="channel">The channel that was subscribed to.</param>
/// <param name="handler">The handler to no longer invoke when a message is received on <paramref name="channel"/>.</param>
/// <param name="flags">The command flags to use.</param>
/// <remarks>https://redis.io/commands/unsubscribe</remarks>
/// <remarks>https://redis.io/commands/unsubscribe</remarks>
/// <remarks>https://redis.io/commands/punsubscribe</remarks>
/// <remarks>https://redis.io/commands/punsubscribe</remarks>
Task
UnsubscribeAsync
(
RedisChannel
channel
,
Action
<
RedisChannel
,
RedisValue
>
handler
=
null
,
CommandFlags
flags
=
CommandFlags
.
None
);
Task
UnsubscribeAsync
(
RedisChannel
channel
,
Action
<
RedisChannel
,
RedisValue
>
handler
=
null
,
CommandFlags
flags
=
CommandFlags
.
None
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment