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
b11829f6
Commit
b11829f6
authored
Sep 26, 2016
by
Hrishikesh Pathak
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into SEClusterConfigBugFix
parents
7d74d187
32807af6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
619 additions
and
600 deletions
+619
-600
ConfigurationOptions.cs
...xchange.Redis/StackExchange/Redis/ConfigurationOptions.cs
+13
-2
ConnectionMultiplexer.cs
...change.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
+1
-1
RedisResult.cs
StackExchange.Redis/StackExchange/Redis/RedisResult.cs
+8
-0
RedisSubscriber.cs
StackExchange.Redis/StackExchange/Redis/RedisSubscriber.cs
+1
-1
RedisValue.cs
StackExchange.Redis/StackExchange/Redis/RedisValue.cs
+596
-596
No files found.
StackExchange.Redis/StackExchange/Redis/ConfigurationOptions.cs
View file @
b11829f6
...
@@ -366,9 +366,20 @@ public void SetDefaultPorts()
...
@@ -366,9 +366,20 @@ public void SetDefaultPorts()
}
}
/// <summary>
/// <summary>
/// Returns the effective configuration string for this configuration
/// Returns the effective configuration string for this configuration
, including Redis credentials.
/// </summary>
/// </summary>
public
override
string
ToString
()
public
override
string
ToString
()
{
// include password to allow generation of configuration strings
// used for connecting multiplexer
return
ToString
(
includePassword
:
true
);
}
/// <summary>
/// Returns the effective configuration string for this configuration
/// with the option to include or exclude the password from the string.
/// </summary>
public
string
ToString
(
bool
includePassword
)
{
{
var
sb
=
new
StringBuilder
();
var
sb
=
new
StringBuilder
();
foreach
(
var
endpoint
in
endpoints
)
foreach
(
var
endpoint
in
endpoints
)
...
@@ -382,7 +393,7 @@ public override string ToString()
...
@@ -382,7 +393,7 @@ public override string ToString()
Append
(
sb
,
OptionKeys
.
AllowAdmin
,
allowAdmin
);
Append
(
sb
,
OptionKeys
.
AllowAdmin
,
allowAdmin
);
Append
(
sb
,
OptionKeys
.
Version
,
defaultVersion
);
Append
(
sb
,
OptionKeys
.
Version
,
defaultVersion
);
Append
(
sb
,
OptionKeys
.
ConnectTimeout
,
connectTimeout
);
Append
(
sb
,
OptionKeys
.
ConnectTimeout
,
connectTimeout
);
Append
(
sb
,
OptionKeys
.
Password
,
password
);
Append
(
sb
,
OptionKeys
.
Password
,
includePassword
?
password
:
"*****"
);
Append
(
sb
,
OptionKeys
.
TieBreaker
,
tieBreaker
);
Append
(
sb
,
OptionKeys
.
TieBreaker
,
tieBreaker
);
Append
(
sb
,
OptionKeys
.
WriteBuffer
,
writeBuffer
);
Append
(
sb
,
OptionKeys
.
WriteBuffer
,
writeBuffer
);
Append
(
sb
,
OptionKeys
.
Ssl
,
ssl
);
Append
(
sb
,
OptionKeys
.
Ssl
,
ssl
);
...
...
StackExchange.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
View file @
b11829f6
...
@@ -1197,7 +1197,7 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
...
@@ -1197,7 +1197,7 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
Trace
(
"Starting reconfiguration..."
);
Trace
(
"Starting reconfiguration..."
);
Trace
(
blame
!=
null
,
"Blaming: "
+
Format
.
ToString
(
blame
));
Trace
(
blame
!=
null
,
"Blaming: "
+
Format
.
ToString
(
blame
));
LogLocked
(
log
,
Configuration
);
LogLocked
(
log
,
configuration
.
ToString
(
includePassword
:
false
)
);
LogLocked
(
log
,
""
);
LogLocked
(
log
,
""
);
...
...
StackExchange.Redis/StackExchange/Redis/RedisResult.cs
View file @
b11829f6
...
@@ -7,6 +7,14 @@ namespace StackExchange.Redis
...
@@ -7,6 +7,14 @@ namespace StackExchange.Redis
/// </summary>
/// </summary>
public
abstract
class
RedisResult
public
abstract
class
RedisResult
{
{
/// <summary>
/// Create a new RedisResult.
/// </summary>
/// <returns></returns>
public
static
RedisResult
Create
(
RedisValue
value
)
{
return
new
SingleRedisResult
(
value
);
}
// internally, this is very similar to RawResult, except it is designed to be usable
// internally, this is very similar to RawResult, except it is designed to be usable
// outside of the IO-processing pipeline: the buffers are standalone, etc
// outside of the IO-processing pipeline: the buffers are standalone, etc
...
...
StackExchange.Redis/StackExchange/Redis/RedisSubscriber.cs
View file @
b11829f6
...
@@ -185,7 +185,7 @@ public bool Remove(Action<RedisChannel, RedisValue> value)
...
@@ -185,7 +185,7 @@ public bool Remove(Action<RedisChannel, RedisValue> value)
public
Task
SubscribeToServer
(
ConnectionMultiplexer
multiplexer
,
RedisChannel
channel
,
CommandFlags
flags
,
object
asyncState
,
bool
internalCall
)
public
Task
SubscribeToServer
(
ConnectionMultiplexer
multiplexer
,
RedisChannel
channel
,
CommandFlags
flags
,
object
asyncState
,
bool
internalCall
)
{
{
var
cmd
=
channel
.
IsPatternBased
?
RedisCommand
.
PSUBSCRIBE
:
RedisCommand
.
SUBSCRIBE
;
var
cmd
=
channel
.
IsPatternBased
?
RedisCommand
.
PSUBSCRIBE
:
RedisCommand
.
SUBSCRIBE
;
var
selected
=
multiplexer
.
SelectServer
(-
1
,
cmd
,
CommandFlags
.
DemandMaster
,
default
(
RedisKey
));
var
selected
=
multiplexer
.
SelectServer
(-
1
,
cmd
,
flags
,
default
(
RedisKey
));
if
(
selected
==
null
||
Interlocked
.
CompareExchange
(
ref
owner
,
selected
,
null
)
!=
null
)
return
null
;
if
(
selected
==
null
||
Interlocked
.
CompareExchange
(
ref
owner
,
selected
,
null
)
!=
null
)
return
null
;
...
...
StackExchange.Redis/StackExchange/Redis/RedisValue.cs
View file @
b11829f6
using
System
;
using
System
;
#if CORE_CLR
#if CORE_CLR
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Reflection
;
using
System.Reflection
;
...
...
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