public static class ConnectionSpec.RefImpl extends java.lang.Object implements ConnectionSpec
ConnectionSpec.
This implementation is a read/write implementation providing no default values of any kind. It can be used as is and initialized as required, or (as it is intended) it will provide support for various connection profiles (e.g. server connectors), etc.
ConnectionSpec.RefImpl| Modifier and Type | Field and Description |
|---|---|
(package private) int |
connectionFlagBitmask
Connection.Flag bitmask
|
(package private) java.util.Map<Connection.Property,java.lang.Object> |
connectionProperties
|
private int |
heartbeat
heartbeat period in milliseconds
|
(package private) java.util.Map<Connection.Socket.Flag,java.lang.Boolean> |
socketFlags
|
(package private) java.util.Map<Connection.Socket.Property,java.lang.Integer> |
socketProperties
|
| Constructor and Description |
|---|
RefImpl() |
java.util.Map<Connection.Socket.Flag,java.lang.Boolean> socketFlags
java.util.Map<Connection.Socket.Property,java.lang.Integer> socketProperties
int connectionFlagBitmask
java.util.Map<Connection.Property,java.lang.Object> connectionProperties
private int heartbeat
public final java.net.InetAddress getAddress()
getAddress in interface ConnectionSpecpublic final byte[] getCredentials()
getCredentials in interface ConnectionSpecCommand#AUTHpublic final int getDatabase()
getDatabase in interface ConnectionSpecCommand#SELECTpublic final int getPort()
getPort in interface ConnectionSpecpublic final Connection.Modality getModality()
getModality in interface ConnectionSpecConnection.Modality of this protocol handler.public final int getMaxConnectWait()
getMaxConnectWait in interface ConnectionSpecpublic final int getReconnectCnt()
getReconnectCnt in interface ConnectionSpecpublic final boolean getSocketFlag(Connection.Socket.Flag flag)
ConnectionSpecSocketFlag for the ConnectionSpecgetSocketFlag in interface ConnectionSpecSocketFlagpublic final java.lang.Integer getSocketProperty(Connection.Socket.Property property)
ConnectionSpecConnection.Socket.Property for the ConnectionSpecgetSocketProperty in interface ConnectionSpecSocketFlagpublic final java.lang.Object getConnectionProperty(Connection.Property prop)
getConnectionProperty in interface ConnectionSpecpublic final ConnectionSpec setAddress(java.net.InetAddress address)
setAddress in interface ConnectionSpecConnectionSpecpublic final ConnectionSpec setPort(int port)
setPort in interface ConnectionSpecConnectionSpecpublic final ConnectionSpec setCredentials(byte[] credentials)
ConnectionSpecsetCredentials in interface ConnectionSpecConnectionSpecConnectionSpec.setCredentials(String)public final ConnectionSpec setCredentials(java.lang.String credentials)
ConnectionSpecsetCredentials in interface ConnectionSpecConnectionSpecConnectionSpec.setCredentials(byte[])public final ConnectionSpec setDatabase(int database)
setDatabase in interface ConnectionSpecConnectionSpecpublic final ConnectionSpec setReconnectCnt(int reconnectCnt)
setReconnectCnt in interface ConnectionSpecConnectionSpecpublic final ConnectionSpec setConnectionProperty(Connection.Property prop, java.lang.Object value)
setConnectionProperty in interface ConnectionSpecpublic final ConnectionSpec setModality(Connection.Modality modality)
setModality in interface ConnectionSpecConnectionSpecpublic final ConnectionSpec setMaxConnectWait(int cnt)
setMaxConnectWait in interface ConnectionSpecConnectionSpecpublic final ConnectionSpec setSocketFlag(Connection.Socket.Flag flag, java.lang.Boolean value)
ConnectionSpecConnection.Socket.Flag for the ConnectionSpecsetSocketFlag in interface ConnectionSpecConnectionSpec thispublic final ConnectionSpec setSocketProperty(Connection.Socket.Property property, java.lang.Integer value)
ConnectionSpecSocketProperty for the ConnectionSpecsetSocketProperty in interface ConnectionSpecMap.put(Object, Object) semantics.public final boolean getConnectionFlag(Connection.Flag flag)
getConnectionFlag in interface ConnectionSpecConnection.FlagSocketFlagpublic final ConnectionSpec setConnectionFlag(Connection.Flag flag, java.lang.Boolean value)
ConnectionSpecConnection.FlagsetConnectionFlag in interface ConnectionSpecConnectionSpecpublic final int getHeartbeat()
getHeartbeat in interface ConnectionSpecpublic final ConnectionSpec setHeartbeat(int seconds)
setHeartbeat in interface ConnectionSpecseconds - heartbeat periodConnectionSpec