From c2531d9ec122701c7419cd8a84d74af8d6a25023 Mon Sep 17 00:00:00 2001 From: Julien Viet Date: Tue, 10 Dec 2024 15:40:29 +0100 Subject: [PATCH] Add a no arg constructor for request grouping --- .../java/io/vertx/redis/client/RequestGrouping.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/io/vertx/redis/client/RequestGrouping.java b/src/main/java/io/vertx/redis/client/RequestGrouping.java index e43801be..5b7d6c59 100644 --- a/src/main/java/io/vertx/redis/client/RequestGrouping.java +++ b/src/main/java/io/vertx/redis/client/RequestGrouping.java @@ -1,7 +1,9 @@ package io.vertx.redis.client; import io.vertx.codegen.annotations.DataObject; +import io.vertx.codegen.annotations.GenIgnore; +import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Objects; @@ -14,9 +16,15 @@ */ @DataObject public class RequestGrouping { + private final Collection> keyed; private final List unkeyed; + public RequestGrouping() { + this.keyed = new ArrayList<>(); + this.unkeyed = new ArrayList<>(); + } + public RequestGrouping(Collection> keyed, List unkeyed) { this.keyed = Objects.requireNonNull(keyed); this.unkeyed = Objects.requireNonNull(unkeyed); @@ -29,6 +37,7 @@ public RequestGrouping(Collection> keyed, List unkeyed) { * Does not include any request that doesn't specify a key; use {@link #getUnkeyed()} * to get those. */ + @GenIgnore public Collection> getKeyed() { return keyed; } @@ -37,6 +46,7 @@ public Collection> getKeyed() { * Returns a collection of requests that do not specify a key and would therefore * be executed on random node. */ + @GenIgnore public List getUnkeyed() { return unkeyed; }