-
-
Notifications
You must be signed in to change notification settings - Fork 177
/
IRedisClient.cs
136 lines (114 loc) · 4.81 KB
/
IRedisClient.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
// Copyright (c) Ugo Lattanzi. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information.
namespace StackExchange.Redis.Extensions.Core.Abstractions;
/// <summary>
/// Allows a client to access to an instance of Redis database.
/// </summary>
public interface IRedisClient
{
/// <summary>
/// Gets an instance of the Redis database for the database 0.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db0 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 1.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db1 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 2.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db2 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 3.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db3 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 4.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db4 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 5.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db5 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 6.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db6 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 7.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db7 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 8.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db8 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 9.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db9 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 10.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db10 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 11.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db11 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 12.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db12 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 13.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db13 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 14.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db14 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 15.
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase Db15 { get; }
/// <summary>
/// Gets an instance of the Redis database for the database 16.
/// </summary>
/// <returns>An instance of <see cref="ISerializer"/>.</returns>
IRedisDatabase Db16 { get; }
/// <summary>
/// Gets an instance of the configured serializer.
/// </summary>
/// <returns>An instance of <see cref="ISerializer"/>.</returns>
ISerializer Serializer { get; }
/// <summary>
/// Returns an instance a Redis databse for the specific database;
/// </summary>
/// <param name="dbNumber">The databse number.</param>
/// <param name="keyPrefix">The key prefix.</param>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase GetDb(int dbNumber, string? keyPrefix = null);
/// <summary>
/// Returns an instance a Redis database for the default database present into the configuration file;
/// </summary>
/// <returns>An instance of <see cref="IRedisDatabase"/>.</returns>
IRedisDatabase GetDefaultDatabase();
/// <summary>
/// Returns an instance <see cref="ConnectionPoolManager"/> that handles the connection pooling.
/// </summary>
IRedisConnectionPoolManager ConnectionPoolManager { get; }
}