|
23 | 23 | import org.springframework.data.redis.core.types.RedisClientInfo;
|
24 | 24 |
|
25 | 25 | /**
|
| 26 | + * Redis Server commands executed in cluster environment using reactive infrastructure. |
| 27 | + * |
26 | 28 | * @author Mark Paluch
|
| 29 | + * @author Christoph Strobl |
27 | 30 | * @since 2.0
|
28 | 31 | */
|
29 | 32 | public interface ReactiveClusterServerCommands extends ReactiveServerCommands {
|
30 | 33 |
|
31 | 34 | /**
|
| 35 | + * Start an {@literal Append Only File} rewrite process on the specific server. |
| 36 | + * |
32 | 37 | * @param node must not be {@literal null}.
|
| 38 | + * @return {@link Mono} indicating command completion. |
| 39 | + * @throws IllegalArgumentException when {@code node} is {@literal null}. |
33 | 40 | * @see RedisServerCommands#bgReWriteAof()
|
34 | 41 | */
|
35 | 42 | Mono<String> bgReWriteAof(RedisClusterNode node);
|
36 | 43 |
|
37 | 44 | /**
|
| 45 | + * Start background saving of db on server. |
| 46 | + * |
38 | 47 | * @param node must not be {@literal null}.
|
| 48 | + * @return {@link Mono} indicating command received by server. Operation success needs to be checked via |
| 49 | + * {@link #lastSave(RedisClusterNode)}. |
| 50 | + * @throws IllegalArgumentException when {@code node} is {@literal null}. |
39 | 51 | * @see RedisServerCommands#bgSave()
|
40 | 52 | */
|
41 | 53 | Mono<String> bgSave(RedisClusterNode node);
|
42 | 54 |
|
43 | 55 | /**
|
| 56 | + * Get time unix timestamp of last successful {@link #bgSave()} operation in seconds. |
| 57 | + * |
44 | 58 | * @param node must not be {@literal null}.
|
45 |
| - * @return |
| 59 | + * @return @return {@link Mono} wrapping unix timestamp. |
| 60 | + * @throws IllegalArgumentException when {@code node} is {@literal null}. |
46 | 61 | * @see RedisServerCommands#lastSave()
|
47 | 62 | */
|
48 | 63 | Mono<Long> lastSave(RedisClusterNode node);
|
49 | 64 |
|
50 | 65 | /**
|
| 66 | + * Synchronous save current db snapshot on server. |
| 67 | + * |
51 | 68 | * @param node must not be {@literal null}.
|
| 69 | + * @return {@link Mono} indicating command completion. |
| 70 | + * @throws IllegalArgumentException when {@code node} is {@literal null}. |
52 | 71 | * @see RedisServerCommands#save()
|
53 | 72 | */
|
54 | 73 | Mono<String> save(RedisClusterNode node);
|
55 | 74 |
|
56 | 75 | /**
|
| 76 | + * Get the total number of available keys in currently selected database. |
| 77 | + * |
57 | 78 | * @param node must not be {@literal null}.
|
58 |
| - * @return |
| 79 | + * @return {@link Mono} wrapping number of keys. |
| 80 | + * @throws IllegalArgumentException when {@code node} is {@literal null}. |
59 | 81 | * @see RedisServerCommands#dbSize()
|
60 | 82 | */
|
61 | 83 | Mono<Long> dbSize(RedisClusterNode node);
|
62 | 84 |
|
63 | 85 | /**
|
64 |
| - * @param node must not be {@literal null}. |
| 86 | + * Delete all keys of the currently selected database. |
| 87 | + * |
| 88 | + * @param node must not be {@literal null}. {@link Mono} indicating command completion. |
| 89 | + * @throws IllegalArgumentException when {@code node} is {@literal null}. |
65 | 90 | * @see RedisServerCommands#flushDb()
|
66 | 91 | */
|
67 | 92 | Mono<String> flushDb(RedisClusterNode node);
|
68 | 93 |
|
69 | 94 | /**
|
| 95 | + * Delete all <b>all keys</b> from <b>all databases</b>. |
| 96 | + * |
70 | 97 | * @param node must not be {@literal null}.
|
| 98 | + * @return {@link Mono} indicating command completion. |
| 99 | + * @throws IllegalArgumentException when {@code node} is {@literal null}. |
71 | 100 | * @see RedisServerCommands#flushAll()
|
72 | 101 | */
|
73 | 102 | Mono<String> flushAll(RedisClusterNode node);
|
74 | 103 |
|
75 | 104 | /**
|
| 105 | + * Load {@literal default} server information like |
| 106 | + * <ul> |
| 107 | + * <li>memory</li> |
| 108 | + * <li>cpu utilization</li> |
| 109 | + * <li>replication</li> |
| 110 | + * </ul> |
| 111 | + * <p> |
| 112 | + * |
76 | 113 | * @param node must not be {@literal null}.
|
77 |
| - * @return |
| 114 | + * @return {@link Mono} wrapping server information. |
| 115 | + * @throws IllegalArgumentException when {@code node} is {@literal null}. |
78 | 116 | * @see RedisServerCommands#info()
|
79 | 117 | */
|
80 | 118 | Mono<Properties> info(RedisClusterNode node);
|
81 | 119 |
|
82 | 120 | /**
|
| 121 | + * Load server information for given {@code selection}. |
| 122 | + * |
83 | 123 | * @param node must not be {@literal null}.
|
84 |
| - * @param section |
85 |
| - * @return |
| 124 | + * @param section must not be {@literal null} nor {@literal empty}. |
| 125 | + * @return {@link Mono} wrapping server information of given {@code section}. |
| 126 | + * @throws IllegalArgumentException when {@code node} is {@literal null}. |
| 127 | + * @throws IllegalArgumentException when section is {@literal null} or {@literal empty}. |
86 | 128 | * @see RedisServerCommands#info(String)
|
87 | 129 | */
|
88 | 130 | Mono<Properties> info(RedisClusterNode node, String section);
|
89 | 131 |
|
90 | 132 | /**
|
| 133 | + * Load configuration parameters for given {@code pattern} from server. |
| 134 | + * |
91 | 135 | * @param node must not be {@literal null}.
|
92 |
| - * @param pattern |
93 |
| - * @return |
| 136 | + * @param pattern must not be {@literal null}. |
| 137 | + * @return {@link Mono} wrapping configuration parameters matching given {@code pattern}. |
| 138 | + * @throws IllegalArgumentException when {@code node} is {@literal null}. |
| 139 | + * @throws IllegalArgumentException when {@code pattern} is {@literal null} or {@literal empty}. |
94 | 140 | * @see RedisServerCommands#getConfig(String)
|
95 | 141 | */
|
96 | 142 | Mono<Properties> getConfig(RedisClusterNode node, String pattern);
|
97 | 143 |
|
98 | 144 | /**
|
| 145 | + * Set server configuration for {@code param} to {@code value}. |
| 146 | + * |
99 | 147 | * @param node must not be {@literal null}.
|
100 |
| - * @param param |
101 |
| - * @param value |
| 148 | + * @param param must not be {@literal null} nor {@literal empty}. |
| 149 | + * @param value must not be {@literal null} nor {@literal empty}. |
| 150 | + * @throws IllegalArgumentException when {@code node} is {@literal null}. |
| 151 | + * @throws IllegalArgumentException when {@code pattern} / {@code value} is {@literal null} or {@literal empty}. |
102 | 152 | * @see RedisServerCommands#setConfig(String, String)
|
103 | 153 | */
|
104 | 154 | Mono<String> setConfig(RedisClusterNode node, String param, String value);
|
105 | 155 |
|
106 | 156 | /**
|
| 157 | + * Reset statistic counters on server. <br> |
| 158 | + * Counters can be retrieved using {@link #info()}. |
| 159 | + * |
107 | 160 | * @param node must not be {@literal null}.
|
| 161 | + * @return {@link Mono} indicating command completion. |
| 162 | + * @throws IllegalArgumentException when {@code node} is {@literal null}. |
108 | 163 | * @see RedisServerCommands#resetConfigStats()
|
109 | 164 | */
|
110 | 165 | Mono<String> resetConfigStats(RedisClusterNode node);
|
111 | 166 |
|
112 | 167 | /**
|
| 168 | + * Request server timestamp using {@code TIME} command. |
| 169 | + * |
113 | 170 | * @param node must not be {@literal null}.
|
114 |
| - * @return |
| 171 | + * @return {@link Mono} wrapping current server time in milliseconds. |
| 172 | + * @throws IllegalArgumentException when {@code node} is {@literal null}. |
115 | 173 | * @see RedisServerCommands#time()
|
116 | 174 | */
|
117 | 175 | Mono<Long> time(RedisClusterNode node);
|
118 | 176 |
|
119 | 177 | /**
|
| 178 | + * Request information and statistics about connected clients. |
| 179 | + * |
120 | 180 | * @param node must not be {@literal null}.
|
121 |
| - * @return |
| 181 | + * @return {@link Flux} emitting {@link RedisClientInfo} objects. |
| 182 | + * @throws IllegalArgumentException when {@code node} is {@literal null}. |
122 | 183 | * @see RedisServerCommands#getClientList()
|
123 | 184 | */
|
124 | 185 | Flux<RedisClientInfo> getClientList(RedisClusterNode node);
|
|
0 commit comments