Package com.yugabyte.ysql
Class LoadBalanceProperties
java.lang.Object
com.yugabyte.ysql.LoadBalanceProperties
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default value should ideally match the interval at which the server-list is updated at cluster side for yb_servers() function.static final intstatic final StringThe value can either be true or false.static final StringThe driver marks a server as failed with a timestamp, when it cannot connect to it.static final Stringstatic final Stringstatic final intstatic final intstatic final intstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionstatic LoadBalancePropertiesgetLoadBalanceProperties(String url, Properties properties) boolean
-
Field Details
-
LOAD_BALANCE_PROPERTY_KEY
- See Also:
-
TOPOLOGY_AWARE_PROPERTY_KEY
- See Also:
-
REFRESH_INTERVAL_KEY
- See Also:
-
EXPLICIT_FALLBACK_ONLY_KEY
The value can either be true or false. Default is false. true means stick to explicitly given placements for fallback, and do not fall back to entire cluster nodes. false means fall back to entire cluster nodes when nodes in explicit placements are unavailable.- See Also:
-
FAILED_HOST_RECONNECT_DELAY_SECS_KEY
The driver marks a server as failed with a timestamp, when it cannot connect to it. Later, whenever it refreshes the server list via yb_servers(), if it sees the failed server in the response, it marks the server as UP only if the time specified via this property has elapsed since the time it was last marked as a failed host.- See Also:
-
DEFAULT_FAILED_HOST_TTL_SECONDS
public static final int DEFAULT_FAILED_HOST_TTL_SECONDSThe default value should ideally match the interval at which the server-list is updated at cluster side for yb_servers() function. Here, kept it 5 seconds which is not too high (30s) and not too low (1s).- See Also:
-
LOCATIONS_DELIMITER
- See Also:
-
PREFERENCE_DELIMITER
- See Also:
-
MAX_PREFERENCE_VALUE
public static final int MAX_PREFERENCE_VALUE- See Also:
-
DEFAULT_REFRESH_INTERVAL
public static final int DEFAULT_REFRESH_INTERVAL- See Also:
-
MAX_REFRESH_INTERVAL
public static final int MAX_REFRESH_INTERVAL- See Also:
-
MAX_FAILED_HOST_RECONNECT_DELAY_SECS
public static final int MAX_FAILED_HOST_RECONNECT_DELAY_SECS- See Also:
-
-
Method Details
-
getLoadBalanceProperties
-
processURLAndProperties
-
getOriginalURL
-
getOriginalProperties
-
isLoadBalanceEnabled
public boolean isLoadBalanceEnabled() -
getPlacements
-
getStrippedURL
-
getAppropriateLoadBalancer
-