public class InjectedSocketFactory extends StandardSocketFactory
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
InjectedSocketFactory.InjectedInputStream |
(package private) class |
InjectedSocketFactory.SocketWrapper |
| Modifier and Type | Field and Description |
|---|---|
private HostInfo |
hi |
(package private) static java.util.Set<java.lang.String> |
IMMEDIATELY_DOWNED_HOSTS_PORT |
static byte[] |
injectedBuffer |
protected static int |
injectedBufferPos |
private PropertySet |
propSet |
host, loginTimeoutCheckTimestamp, loginTimeoutCountdown, port, rawSocket, socketTimeoutBackup, sslSocket| Constructor and Description |
|---|
InjectedSocketFactory() |
| Modifier and Type | Method and Description |
|---|---|
<T extends java.io.Closeable> |
connect(java.lang.String host_name,
int port_number,
PropertySet pset,
int loginTimeout)
Creates a new socket or channel using the given properties.
|
static void |
dontDownHost(java.lang.String hostname) |
static void |
downHost(java.lang.String hostPortPair) |
static void |
flushAllStaticData() |
afterHandshake, beforeHandshake, configureSocket, createSocket, getRealTimeout, performTlsHandshake, performTlsHandshake, resetLoginTimeCountdownclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisLocallyConnected, isLocallyConnectedstatic final java.util.Set<java.lang.String> IMMEDIATELY_DOWNED_HOSTS_PORT
private HostInfo hi
private PropertySet propSet
public static byte[] injectedBuffer
protected static int injectedBufferPos
public static void flushAllStaticData()
public static void downHost(java.lang.String hostPortPair)
public static void dontDownHost(java.lang.String hostname)
public <T extends java.io.Closeable> T connect(java.lang.String host_name,
int port_number,
PropertySet pset,
int loginTimeout)
throws java.io.IOException
SocketFactorycom.mysql.cj.protocol.StandardSocketFactory Implementing classes
are responsible for handling synchronization of this method (if needed).connect in interface SocketFactoryconnect in class StandardSocketFactoryT - result typehost_name - the hostname passed in the URL. It will be a single
hostname, as the driver parses multi-hosts (for failover) and
calls this method for each host connection attempt.port_number - the port number to connect to (if required).pset - properties passed to the driver via the URL and/or properties
instance.loginTimeout - login timeout in millisecondsjava.io.IOException - if an I/O error occurs