/** * Parse ODBC endpoint. * * @param odbcCfg ODBC configuration. * @return ODBC host and port range. * @throws IgniteCheckedException If failed. */ @SuppressWarnings("deprecation") private HostAndPortRange parseOdbcEndpoint(OdbcConfiguration odbcCfg) throws IgniteCheckedException { HostAndPortRange res; if (F.isEmpty(odbcCfg.getEndpointAddress())) { res = new HostAndPortRange(OdbcConfiguration.DFLT_TCP_HOST, OdbcConfiguration.DFLT_TCP_PORT_FROM, OdbcConfiguration.DFLT_TCP_PORT_TO ); } else { res = HostAndPortRange.parse(odbcCfg.getEndpointAddress(), OdbcConfiguration.DFLT_TCP_PORT_FROM, OdbcConfiguration.DFLT_TCP_PORT_TO, "Failed to parse ODBC endpoint address" ); } return res; }
/** * Creates ODBC server configuration by copying all properties from given configuration. * * @param cfg ODBC server configuration. */ public OdbcConfiguration(OdbcConfiguration cfg) { assert cfg != null; endpointAddr = cfg.getEndpointAddress(); maxOpenCursors = cfg.getMaxOpenCursors(); sockRcvBufSize = cfg.getSocketReceiveBufferSize(); sockSndBufSize = cfg.getSocketSendBufferSize(); threadPoolSize = cfg.getThreadPoolSize(); }
/** * Parse ODBC endpoint. * * @param odbcCfg ODBC configuration. * @return ODBC host and port range. * @throws IgniteCheckedException If failed. */ @SuppressWarnings("deprecation") private HostAndPortRange parseOdbcEndpoint(OdbcConfiguration odbcCfg) throws IgniteCheckedException { HostAndPortRange res; if (F.isEmpty(odbcCfg.getEndpointAddress())) { res = new HostAndPortRange(OdbcConfiguration.DFLT_TCP_HOST, OdbcConfiguration.DFLT_TCP_PORT_FROM, OdbcConfiguration.DFLT_TCP_PORT_TO ); } else { res = HostAndPortRange.parse(odbcCfg.getEndpointAddress(), OdbcConfiguration.DFLT_TCP_PORT_FROM, OdbcConfiguration.DFLT_TCP_PORT_TO, "Failed to parse ODBC endpoint address" ); } return res; }
/** * Creates ODBC server configuration by copying all properties from given configuration. * * @param cfg ODBC server configuration. */ public OdbcConfiguration(OdbcConfiguration cfg) { assert cfg != null; endpointAddr = cfg.getEndpointAddress(); maxOpenCursors = cfg.getMaxOpenCursors(); sockRcvBufSize = cfg.getSocketReceiveBufferSize(); sockSndBufSize = cfg.getSocketSendBufferSize(); threadPoolSize = cfg.getThreadPoolSize(); }