Skip to content

Commit

Permalink
feature: support hlen protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
funky-eyes committed Apr 18, 2024
1 parent 601d604 commit 327aad7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public void handle(RemotingContext ctx, HLenRequest request) {
client.execute(AeroSpikeClientFactory.eventLoops.next(), new ExecuteListener() {
@Override
public void onSuccess(Key key, Object obj) {
logger.info("hlen response:{}", request);
request.setResponse(obj.toString());
write(ctx, request);
logger.info("hlen response:{}", obj);
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/icu/funkye/redispike/ServerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public static void init() throws ParseException {
public void TestPippline() {
List<String> keys = new ArrayList<>();
String key = String.valueOf(ThreadLocalRandom.current().nextInt(RandomValue));
for (int i = 0; i < 3; i++) {
keys.add(String.valueOf(ThreadLocalRandom.current().nextInt(RandomValue)));
}
try (Jedis jedis = JedisPooledFactory.getJedisInstance()) {
for (int i = 0; i < 3; i++) {
keys.add(String.valueOf(ThreadLocalRandom.current().nextInt(RandomValue)));
}
try (Pipeline pipeline = jedis.pipelined()) {
for (String value : keys) {
pipeline.hset(key, value, "b");
Expand Down

0 comments on commit 327aad7

Please sign in to comment.