Commit 84ee29d
R-J Lim
Iteration on key-prefixing POC
- Demonstrated automatic key-prefixing for all subclasses of
UnifiedJedis: JedisCluster, JedisPooled, and JedisSentineled
- Key-prefixing is possible as long as the underlying CommandObjects can
be customized.
- CommandObjects cannot use commandArguments in its constructor since
in the specific case of key-prefixing, commandArguments depends on the
child constructor running first. So we lose caching of argument-less
CommandObjects.
- Based on this POC, the minimum changes required to jedis would be:
- public constructors that allow UnifiedJedis and its subclasses to
take a custom CommandObjects.
- Consistent use of supplied CommandObjects throughout code (e.g. in
Pipeline, Transaction, etc).
- Removal of caching of argument-less CommandObjects in the
constructor of CommandObjects.
- Applications can then supply CommandObjects with custom behavior as
necessary. Sample classes that implement the behavior of prefixed keys,
etc are provided but these can be supplied by the application as long
as required constructors are available.1 parent a0efc76 commit 84ee29d
File tree
15 files changed
+233
-126
lines changed- src
- main/java/redis/clients/jedis
- test/java/redis/clients/jedis
15 files changed
+233
-126
lines changedLines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | 66 | | |
69 | | - | |
| 67 | + | |
70 | 68 | | |
71 | 69 | | |
72 | | - | |
73 | | - | |
74 | 70 | | |
75 | | - | |
| 71 | + | |
76 | 72 | | |
77 | 73 | | |
78 | | - | |
79 | | - | |
80 | 74 | | |
81 | | - | |
| 75 | + | |
82 | 76 | | |
83 | 77 | | |
84 | 78 | | |
| |||
2818 | 2812 | | |
2819 | 2813 | | |
2820 | 2814 | | |
2821 | | - | |
2822 | | - | |
2823 | 2815 | | |
2824 | | - | |
| 2816 | + | |
2825 | 2817 | | |
2826 | 2818 | | |
2827 | 2819 | | |
| |||
2832 | 2824 | | |
2833 | 2825 | | |
2834 | 2826 | | |
2835 | | - | |
2836 | | - | |
2837 | 2827 | | |
2838 | | - | |
| 2828 | + | |
2839 | 2829 | | |
2840 | 2830 | | |
2841 | 2831 | | |
| |||
2863 | 2853 | | |
2864 | 2854 | | |
2865 | 2855 | | |
2866 | | - | |
2867 | | - | |
2868 | | - | |
2869 | 2856 | | |
2870 | | - | |
| 2857 | + | |
2871 | 2858 | | |
2872 | 2859 | | |
2873 | 2860 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
225 | 230 | | |
226 | 231 | | |
227 | 232 | | |
| |||
Lines changed: 0 additions & 61 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
394 | 395 | | |
395 | 396 | | |
396 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
397 | 403 | | |
398 | 404 | | |
399 | 405 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4859 | 4859 | | |
4860 | 4860 | | |
4861 | 4861 | | |
4862 | | - | |
| 4862 | + | |
4863 | 4863 | | |
4864 | 4864 | | |
4865 | 4865 | | |
| |||
0 commit comments