Package org.apache.gravitino.client
Class GravitinoClientConfiguration
java.lang.Object
org.apache.gravitino.client.GravitinoClientConfiguration
Configuration class for Gravitino Java client
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAn optional http connection timeout in milliseconds.static final longA default value for http connection timeout in milliseconds.static final StringAn optional max total HTTP connections.static final intA default value for max total HTTP connections in the connection pool.static final StringAn optional max HTTP connections per route.static final intA default value for max HTTP connections per route.static final StringAn optional http socket timeout in milliseconds.static final intA default value for http socket timeout in milliseconds.static final StringThe configuration key prefix for the Gravitino client config.static final StringThe value of messages used to indicate that the configuration should be a positive number. -
Method Summary
Modifier and TypeMethodDescriptionstatic GravitinoClientConfigurationbuildFromProperties(Map<String, String> properties) Build GravitinoClientConfiguration from properties.longExtract connection timeout from the properties mapintExtract max total connections from the properties mapintExtract max connections per route from the properties mapintExtract socket timeout from the properties map
-
Field Details
-
POSITIVE_NUMBER_ERROR_MSG
The value of messages used to indicate that the configuration should be a positive number.- See Also:
-
GRAVITINO_CLIENT_CONFIG_PREFIX
The configuration key prefix for the Gravitino client config.- See Also:
-
CLIENT_CONNECTION_TIMEOUT_MS_DEFAULT
public static final long CLIENT_CONNECTION_TIMEOUT_MS_DEFAULTA default value for http connection timeout in milliseconds.- See Also:
-
CLIENT_SOCKET_TIMEOUT_MS_DEFAULT
public static final int CLIENT_SOCKET_TIMEOUT_MS_DEFAULTA default value for http socket timeout in milliseconds.- See Also:
-
CLIENT_CONNECTION_TIMEOUT_MS
An optional http connection timeout in milliseconds.- See Also:
-
CLIENT_SOCKET_TIMEOUT_MS
An optional http socket timeout in milliseconds.- See Also:
-
CLIENT_MAX_CONNECTIONS_DEFAULT
public static final int CLIENT_MAX_CONNECTIONS_DEFAULTA default value for max total HTTP connections in the connection pool. This is the same as the default value of Apache HttpClient 5.x- See Also:
-
CLIENT_MAX_CONNECTIONS
An optional max total HTTP connections.- See Also:
-
CLIENT_MAX_CONNECTIONS_PER_ROUTE_DEFAULT
public static final int CLIENT_MAX_CONNECTIONS_PER_ROUTE_DEFAULTA default value for max HTTP connections per route. This is the same as the default value of Apache HttpClient 5.x- See Also:
-
CLIENT_MAX_CONNECTIONS_PER_ROUTE
An optional max HTTP connections per route.- See Also:
-
-
Method Details
-
buildFromProperties
Build GravitinoClientConfiguration from properties.- Parameters:
properties- The properties object containing configuration key-value pairs.- Returns:
- GravitinoClientConfiguration instance
-
getClientConnectionTimeoutMs
public long getClientConnectionTimeoutMs()Extract connection timeout from the properties map- Returns:
- connection timeout
-
getClientSocketTimeoutMs
public int getClientSocketTimeoutMs()Extract socket timeout from the properties map- Returns:
- socket timeout
-
getClientMaxConnections
public int getClientMaxConnections()Extract max total connections from the properties map- Returns:
- max total connections in the HTTP connection pool
-
getClientMaxConnectionsPerRoute
public int getClientMaxConnectionsPerRoute()Extract max connections per route from the properties map- Returns:
- max connections per route in the HTTP connection pool
-