Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 589b881

Browse files
committed
Cherry picked commits from @andyberryman PR 208
Reference: #208
1 parent 547a37c commit 589b881

5 files changed

Lines changed: 53 additions & 1 deletion

File tree

src/ServiceStack.Redis/Generic/RedisClientSortedSet.Generic.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,19 @@ public long PopulateWithIntersectOf(params IRedisSortedSet<T>[] setIds)
187187
return client.StoreIntersectFromSortedSets(this, setIds);
188188
}
189189

190+
public long PopulateWithIntersectOf(IRedisSortedSet<T>[] setIds, string[] args)
191+
{
192+
return client.StoreIntersectFromSortedSets(this, setIds, args);
193+
}
194+
190195
public long PopulateWithUnionOf(params IRedisSortedSet<T>[] setIds)
191196
{
192197
return client.StoreUnionFromSortedSets(this, setIds);
193198
}
199+
200+
public long PopulateWithUnionOf(IRedisSortedSet<T>[] setIds, string[] args)
201+
{
202+
return client.StoreUnionFromSortedSets(this, setIds, args);
203+
}
194204
}
195205
}

src/ServiceStack.Redis/Generic/RedisTypedClient_SortedSet.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,19 @@ public long StoreIntersectFromSortedSets(IRedisSortedSet<T> intoSetId, params IR
271271
return client.StoreIntersectFromSortedSets(intoSetId.Id, setIds.Map(x => x.Id).ToArray());
272272
}
273273

274+
public long StoreIntersectFromSortedSets(IRedisSortedSet<T> intoSetId, IRedisSortedSet<T>[] setIds, string[] args)
275+
{
276+
return client.StoreIntersectFromSortedSets(intoSetId.Id, setIds.Map(x => x.Id).ToArray(), args);
277+
}
278+
274279
public long StoreUnionFromSortedSets(IRedisSortedSet<T> intoSetId, params IRedisSortedSet<T>[] setIds)
275280
{
276281
return client.StoreUnionFromSortedSets(intoSetId.Id, setIds.Map(x => x.Id).ToArray());
277282
}
283+
284+
public long StoreUnionFromSortedSets(IRedisSortedSet<T> intoSetId, IRedisSortedSet<T>[] setIds, string[] args)
285+
{
286+
return client.StoreUnionFromSortedSets(intoSetId.Id, setIds.Map(x => x.Id).ToArray(), args);
287+
}
278288
}
279289
}

src/ServiceStack.Redis/RedisClient_SortedSet.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,11 +413,21 @@ public long StoreIntersectFromSortedSets(string intoSetId, params string[] setId
413413
return base.ZInterStore(intoSetId, setIds);
414414
}
415415

416+
public long StoreIntersectFromSortedSets(string intoSetId, string[] setIds, string[] args)
417+
{
418+
return base.ZInterStore(intoSetId, setIds, args);
419+
}
420+
416421
public long StoreUnionFromSortedSets(string intoSetId, params string[] setIds)
417422
{
418423
return base.ZUnionStore(intoSetId, setIds);
419424
}
420425

426+
public long StoreUnionFromSortedSets(string intoSetId, string[] setIds, string[] args)
427+
{
428+
return base.ZUnionStore(intoSetId, setIds, args);
429+
}
430+
421431
private static string GetSearchStart(string start)
422432
{
423433
return start == null

src/ServiceStack.Redis/RedisNativeClient.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,17 @@ public long ZUnionStore(string intoSetId, params string[] setIds)
17591759
return SendExpectLong(cmdWithArgs);
17601760
}
17611761

1762+
public long ZUnionStore(string intoSetId, string[] setIds, string[] args)
1763+
{
1764+
var totalArgs = new List<string>(setIds);
1765+
totalArgs.Insert(0, setIds.Length.ToString());
1766+
totalArgs.Insert(0, intoSetId);
1767+
totalArgs.AddRange(args);
1768+
1769+
var cmdWithArgs = MergeCommandWithArgs(Commands.ZUnionStore, totalArgs.ToArray());
1770+
return SendExpectLong(cmdWithArgs);
1771+
}
1772+
17621773
public long ZInterStore(string intoSetId, params string[] setIds)
17631774
{
17641775
var setIdsList = new List<string>(setIds);
@@ -1769,6 +1780,17 @@ public long ZInterStore(string intoSetId, params string[] setIds)
17691780
return SendExpectLong(cmdWithArgs);
17701781
}
17711782

1783+
public long ZInterStore(string intoSetId, string[] setIds, string[] args)
1784+
{
1785+
var totalArgs = new List<string>(setIds);
1786+
totalArgs.Insert(0, setIds.Length.ToString());
1787+
totalArgs.Insert(0, intoSetId);
1788+
totalArgs.AddRange(args);
1789+
1790+
var cmdWithArgs = MergeCommandWithArgs(Commands.ZInterStore, totalArgs.ToArray());
1791+
return SendExpectLong(cmdWithArgs);
1792+
}
1793+
17721794
public byte[][] ZRangeByLex(string setId, string min, string max, int? skip=null, int? take=null)
17731795
{
17741796
if (setId == null)

src/ServiceStack.Redis/RedisSentinelWorker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private void SentinelMessageReceived(string channel, string message)
6666
Log.Debug("Received '{0}' on channel '{1}' from Sentinel".Fmt(channel, message));
6767

6868
// {+|-}sdown is the event for server coming up or down
69-
if (channel.ToLower().Contains("sdown"))
69+
if ((channel == "+failover-end") || channel.ToLower().Contains("sdown"))
7070
{
7171
Log.Info("Sentinel detected server down/up with message:{0}".Fmt(message));
7272

0 commit comments

Comments
 (0)