public class ConnectionManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ConnectionManager.UnsupportedConnectionFactoryException |
static class |
ConnectionManager.UnsupportedConnectionStrategyException |
Constructor and Description |
---|
ConnectionManager() |
Modifier and Type | Method and Description |
---|---|
static Connection |
getConnection(ClusterMetaData cluster,
ServerMetaData server,
Request req) |
static Connection |
getConnection(java.net.URI uri) |
static void |
registerFactory(java.lang.String scheme,
ConnectionFactory factory) |
static void |
registerStrategy(java.lang.String scheme,
ConnectionStrategy factory) |
static void |
setFactory(ConnectionFactory factory)
Deprecated.
Use register("default", factory);
|
static ConnectionFactory |
unregisterFactory(java.lang.String scheme) |
static ConnectionStrategy |
unregisterStrategy(java.lang.String scheme) |
public static Connection getConnection(ClusterMetaData cluster, ServerMetaData server, Request req) throws java.io.IOException
java.io.IOException
public static Connection getConnection(java.net.URI uri) throws java.io.IOException
java.io.IOException
public static void registerFactory(java.lang.String scheme, ConnectionFactory factory)
public static ConnectionFactory unregisterFactory(java.lang.String scheme)
public static void registerStrategy(java.lang.String scheme, ConnectionStrategy factory)
public static ConnectionStrategy unregisterStrategy(java.lang.String scheme)
@Deprecated public static void setFactory(ConnectionFactory factory) throws java.io.IOException
factory
- ConnectionFactoryjava.io.IOException
- On error