Class InternalUtils
- java.lang.Object
-
- com.snowflake.kafka.connector.internal.InternalUtils
-
public class InternalUtils extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceInternalUtils.backoffFunctionInterfaces to define the lambda function to be used by backoffAndRetry
-
Field Summary
Fields Modifier and Type Field Description static int[]backoffSec
-
Constructor Summary
Constructors Constructor Description InternalUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ObjectbackoffAndRetry(SnowflakeTelemetryService telemetry, SnowflakeInternalOperations operation, InternalUtils.backoffFunction runnable)Backoff logicprotected static PropertiesgenerateProxyParametersIfRequired(Map<String,String> conf)Helper method to decide whether to add any properties related to proxy server.
-
-
-
Method Detail
-
generateProxyParametersIfRequired
protected static Properties generateProxyParametersIfRequired(Map<String,String> conf)
Helper method to decide whether to add any properties related to proxy server. These property is passed on to snowflake JDBC while calling put API, which requires proxyProperties- Parameters:
conf-- Returns:
- proxy parameters if needed
-
backoffAndRetry
public static Object backoffAndRetry(SnowflakeTelemetryService telemetry, SnowflakeInternalOperations operation, InternalUtils.backoffFunction runnable) throws Exception
Backoff logic- Parameters:
telemetry- telemetry serviceoperation- Internal Operation Type which corresponds to the lambda function runnablerunnable- the lambda function itself- Returns:
- the object that the function returns
- Throws:
Exception- if the runnable function throws exception
-
-