29
29
30
30
import org .springframework .dao .DataAccessException ;
31
31
import org .springframework .data .redis .connection .RedisHashCommands ;
32
- import org .springframework .data .redis .connection .lettuce .LettuceResult .LettuceTxResult ;
33
32
import org .springframework .data .redis .core .Cursor ;
34
33
import org .springframework .data .redis .core .KeyBoundCursor ;
35
34
import org .springframework .data .redis .core .ScanIteration ;
@@ -64,7 +63,7 @@ public Boolean hSet(byte[] key, byte[] field, byte[] value) {
64
63
return null ;
65
64
}
66
65
if (isQueueing ()) {
67
- transaction (connection .newLettuceTxResult ( getConnection ().hset (key , field , value )));
66
+ transaction (connection .newLettuceResult ( getAsyncConnection ().hset (key , field , value )));
68
67
return null ;
69
68
}
70
69
return getConnection ().hset (key , field , value );
@@ -90,7 +89,7 @@ public Boolean hSetNX(byte[] key, byte[] field, byte[] value) {
90
89
return null ;
91
90
}
92
91
if (isQueueing ()) {
93
- transaction (connection .newLettuceTxResult ( getConnection ().hsetnx (key , field , value )));
92
+ transaction (connection .newLettuceResult ( getAsyncConnection ().hsetnx (key , field , value )));
94
93
return null ;
95
94
}
96
95
return getConnection ().hsetnx (key , field , value );
@@ -115,7 +114,7 @@ public Long hDel(byte[] key, byte[]... fields) {
115
114
return null ;
116
115
}
117
116
if (isQueueing ()) {
118
- transaction (connection .newLettuceTxResult ( getConnection ().hdel (key , fields )));
117
+ transaction (connection .newLettuceResult ( getAsyncConnection ().hdel (key , fields )));
119
118
return null ;
120
119
}
121
120
return getConnection ().hdel (key , fields );
@@ -140,7 +139,7 @@ public Boolean hExists(byte[] key, byte[] field) {
140
139
return null ;
141
140
}
142
141
if (isQueueing ()) {
143
- transaction (connection .newLettuceTxResult ( getConnection ().hexists (key , field )));
142
+ transaction (connection .newLettuceResult ( getAsyncConnection ().hexists (key , field )));
144
143
return null ;
145
144
}
146
145
return getConnection ().hexists (key , field );
@@ -165,7 +164,7 @@ public byte[] hGet(byte[] key, byte[] field) {
165
164
return null ;
166
165
}
167
166
if (isQueueing ()) {
168
- transaction (connection .newLettuceTxResult ( getConnection ().hget (key , field )));
167
+ transaction (connection .newLettuceResult ( getAsyncConnection ().hget (key , field )));
169
168
return null ;
170
169
}
171
170
return getConnection ().hget (key , field );
@@ -189,7 +188,7 @@ public Map<byte[], byte[]> hGetAll(byte[] key) {
189
188
return null ;
190
189
}
191
190
if (isQueueing ()) {
192
- transaction (connection .newLettuceTxResult ( getConnection ().hgetall (key )));
191
+ transaction (connection .newLettuceResult ( getAsyncConnection ().hgetall (key )));
193
192
return null ;
194
193
}
195
194
return getConnection ().hgetall (key );
@@ -214,7 +213,7 @@ public Long hIncrBy(byte[] key, byte[] field, long delta) {
214
213
return null ;
215
214
}
216
215
if (isQueueing ()) {
217
- transaction (connection .newLettuceTxResult ( getConnection ().hincrby (key , field , delta )));
216
+ transaction (connection .newLettuceResult ( getAsyncConnection ().hincrby (key , field , delta )));
218
217
return null ;
219
218
}
220
219
return getConnection ().hincrby (key , field , delta );
@@ -239,7 +238,7 @@ public Double hIncrBy(byte[] key, byte[] field, double delta) {
239
238
return null ;
240
239
}
241
240
if (isQueueing ()) {
242
- transaction (connection .newLettuceTxResult ( getConnection ().hincrbyfloat (key , field , delta )));
241
+ transaction (connection .newLettuceResult ( getAsyncConnection ().hincrbyfloat (key , field , delta )));
243
242
return null ;
244
243
}
245
244
return getConnection ().hincrbyfloat (key , field , delta );
@@ -263,7 +262,8 @@ public Set<byte[]> hKeys(byte[] key) {
263
262
return null ;
264
263
}
265
264
if (isQueueing ()) {
266
- transaction (connection .newLettuceTxResult (getConnection ().hkeys (key ), LettuceConverters .bytesListToBytesSet ()));
265
+ transaction (
266
+ connection .newLettuceResult (getAsyncConnection ().hkeys (key ), LettuceConverters .bytesListToBytesSet ()));
267
267
return null ;
268
268
}
269
269
return LettuceConverters .toBytesSet (getConnection ().hkeys (key ));
@@ -287,7 +287,7 @@ public Long hLen(byte[] key) {
287
287
return null ;
288
288
}
289
289
if (isQueueing ()) {
290
- transaction (connection .newLettuceTxResult ( getConnection ().hlen (key )));
290
+ transaction (connection .newLettuceResult ( getAsyncConnection ().hlen (key )));
291
291
return null ;
292
292
}
293
293
return getConnection ().hlen (key );
@@ -313,7 +313,7 @@ public List<byte[]> hMGet(byte[] key, byte[]... fields) {
313
313
return null ;
314
314
}
315
315
if (isQueueing ()) {
316
- transaction (connection .newLettuceTxResult ( getConnection ().hmget (key , fields ),
316
+ transaction (connection .newLettuceResult ( getAsyncConnection ().hmget (key , fields ),
317
317
LettuceConverters .keyValueListUnwrapper ()));
318
318
return null ;
319
319
}
@@ -339,7 +339,7 @@ public void hMSet(byte[] key, Map<byte[], byte[]> hashes) {
339
339
return ;
340
340
}
341
341
if (isQueueing ()) {
342
- transaction (connection .newLettuceTxStatusResult ( getConnection ().hmset (key , hashes )));
342
+ transaction (connection .newLettuceStatusResult ( getAsyncConnection ().hmset (key , hashes )));
343
343
return ;
344
344
}
345
345
getConnection ().hmset (key , hashes );
@@ -363,7 +363,7 @@ public List<byte[]> hVals(byte[] key) {
363
363
return null ;
364
364
}
365
365
if (isQueueing ()) {
366
- transaction (connection .newLettuceTxResult ( getConnection ().hvals (key )));
366
+ transaction (connection .newLettuceResult ( getAsyncConnection ().hvals (key )));
367
367
return null ;
368
368
}
369
369
return getConnection ().hvals (key );
@@ -434,7 +434,7 @@ public Long hStrLen(byte[] key, byte[] field) {
434
434
return null ;
435
435
}
436
436
if (isQueueing ()) {
437
- transaction (connection .newLettuceTxResult ( getConnection ().hstrlen (key , field )));
437
+ transaction (connection .newLettuceResult ( getAsyncConnection ().hstrlen (key , field )));
438
438
return null ;
439
439
}
440
440
return getConnection ().hstrlen (key , field );
@@ -455,7 +455,7 @@ private void pipeline(LettuceResult result) {
455
455
connection .pipeline (result );
456
456
}
457
457
458
- private void transaction (LettuceTxResult result ) {
458
+ private void transaction (LettuceResult result ) {
459
459
connection .transaction (result );
460
460
}
461
461
0 commit comments