Class DatabricksHttpClientFactory
- java.lang.Object
-
- com.databricks.jdbc.dbclient.impl.http.DatabricksHttpClientFactory
-
public class DatabricksHttpClientFactory extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseConnection(IDatabricksConnectionContext context)Permanently closes all HTTP clients for the given connection and replaces them with tombstone sentinels that reject further use.IDatabricksHttpClientgetClient(IDatabricksConnectionContext context)IDatabricksHttpClientgetClient(IDatabricksConnectionContext context, HttpClientType type)Returns an HTTP client for the given connection and type, creating one if needed.static DatabricksHttpClientFactorygetInstance()voidremoveClient(IDatabricksConnectionContext context)voidremoveClient(IDatabricksConnectionContext context, HttpClientType type)voidreset()Resets all state.
-
-
-
Method Detail
-
getInstance
public static DatabricksHttpClientFactory getInstance()
-
getClient
public IDatabricksHttpClient getClient(IDatabricksConnectionContext context)
-
getClient
public IDatabricksHttpClient getClient(IDatabricksConnectionContext context, HttpClientType type)
Returns an HTTP client for the given connection and type, creating one if needed. For closed connections, returns theClosedConnectionHttpClientsentinel — callers that attempt to use it get an immediateDatabricksHttpExceptionwith a clear message. Never returns null.
-
closeConnection
public void closeConnection(IDatabricksConnectionContext context)
Permanently closes all HTTP clients for the given connection and replaces them with tombstone sentinels that reject further use. Called fromDatabricksConnection.close().
-
removeClient
public void removeClient(IDatabricksConnectionContext context)
-
removeClient
public void removeClient(IDatabricksConnectionContext context, HttpClientType type)
-
reset
public void reset()
Resets all state. For test cleanup only.
-
-