2828import io .questdb .client .std .NumericException ;
2929import io .questdb .client .std .ObjList ;
3030
31+ import java .util .Collections ;
32+ import java .util .HashMap ;
3133import java .util .HashSet ;
3234import java .util .Map ;
3335
@@ -51,16 +53,20 @@ public final class ConfigView {
5153 * Keys that live in the legacy http/tcp/udp vocabulary. On a {@code ws}/
5254 * {@code wss} string they reject with a hint pointing at the right place.
5355 */
54- private static final Map <String , String > RELOCATED_HINTS = Map .of (
55- "retry_timeout" , "(use reconnect_max_duration_millis on ws/wss)" ,
56- "protocol_version" , "(QWP negotiates the protocol version during the WebSocket upgrade)" ,
57- "init_buf_size" , "(applies to legacy http/tcp/udp transports only)" ,
58- "max_buf_size" , "(applies to legacy http/tcp/udp transports only)" ,
59- "request_timeout" , "(applies to legacy http/tcp/udp transports only)" ,
60- "request_min_throughput" , "(applies to legacy http/tcp/udp transports only)" ,
61- "max_datagram_size" , "(applies to legacy http/tcp/udp transports only)" ,
62- "multicast_ttl" , "(applies to legacy http/tcp/udp transports only)"
63- );
56+ private static final Map <String , String > RELOCATED_HINTS ;
57+
58+ static {
59+ Map <String , String > hints = new HashMap <>();
60+ hints .put ("retry_timeout" , "(use reconnect_max_duration_millis on ws/wss)" );
61+ hints .put ("protocol_version" , "(QWP negotiates the protocol version during the WebSocket upgrade)" );
62+ hints .put ("init_buf_size" , "(applies to legacy http/tcp/udp transports only)" );
63+ hints .put ("max_buf_size" , "(applies to legacy http/tcp/udp transports only)" );
64+ hints .put ("request_timeout" , "(applies to legacy http/tcp/udp transports only)" );
65+ hints .put ("request_min_throughput" , "(applies to legacy http/tcp/udp transports only)" );
66+ hints .put ("max_datagram_size" , "(applies to legacy http/tcp/udp transports only)" );
67+ hints .put ("multicast_ttl" , "(applies to legacy http/tcp/udp transports only)" );
68+ RELOCATED_HINTS = Collections .unmodifiableMap (hints );
69+ }
6470
6571 private final ObjList <String > normKeys = new ObjList <>();
6672 private final ObjList <String > normValues = new ObjList <>();
0 commit comments