/** * Resolves host for REST TCP server using grid configuration. * * @param cfg Grid configuration. * @return REST host. * @throws IOException If failed to resolve REST host. */ private InetAddress resolveRestTcpHost(IgniteConfiguration cfg) throws IOException { String host = cfg.getConnectorConfiguration().getHost(); if (host == null) host = cfg.getLocalHost(); return U.resolveLocalHost(host); }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); ConnectorConfiguration connCfg = new ConnectorConfiguration(); port = connCfg.getPort(); host = connCfg.getHost(); cfg.setConnectorConfiguration(connCfg); return cfg; }
jettyHost = getProperty(IGNITE_JETTY_HOST); jettyPort = intValue(IGNITE_JETTY_PORT, null); tcpHost = conCfg.getHost(); tcpPort = conCfg.getPort(); tcpSslCtxFactory = compactClass(conCfg.getSslContextFactory());
/** * Creates client connection configuration by copying all properties from * given configuration. * * @param cfg Client configuration. */ public ConnectorConfiguration(ConnectorConfiguration cfg) { assert cfg != null; msgInterceptor = cfg.getMessageInterceptor(); threadPoolSize = cfg.getThreadPoolSize(); idleTimeout = cfg.getIdleTimeout(); jettyPath = cfg.getJettyPath(); portRange = cfg.getPortRange(); secretKey = cfg.getSecretKey(); directBuf = cfg.isDirectBuffer(); host = cfg.getHost(); noDelay = cfg.isNoDelay(); port = cfg.getPort(); rcvBufSize = cfg.getReceiveBufferSize(); selectorCnt = cfg.getSelectorCount(); sndBufSize = cfg.getSendBufferSize(); sndQueueLimit = cfg.getSendQueueLimit(); sslClientAuth = cfg.isSslClientAuth(); sslCtxFactory = cfg.getSslContextFactory(); sslEnabled = cfg.isSslEnabled(); sslFactory = cfg.getSslFactory(); idleQryCurTimeout = cfg.getIdleQueryCursorTimeout(); idleQryCurCheckFreq = cfg.getIdleQueryCursorCheckFrequency(); }
/** {@inheritDoc} */ @Override public URI getDefaultURI() { try { return new URI(ignite.configuration().getConnectorConfiguration().getHost()); } catch (URISyntaxException e) { return null; } }
/** * Resolves host for REST TCP server using grid configuration. * * @param cfg Grid configuration. * @return REST host. * @throws IOException If failed to resolve REST host. */ private InetAddress resolveRestTcpHost(IgniteConfiguration cfg) throws IOException { String host = cfg.getConnectorConfiguration().getHost(); if (host == null) host = cfg.getLocalHost(); return U.resolveLocalHost(host); }
jettyHost = getProperty(IGNITE_JETTY_HOST); jettyPort = intValue(IGNITE_JETTY_PORT, null); tcpHost = conCfg.getHost(); tcpPort = conCfg.getPort(); tcpSslCtxFactory = compactClass(conCfg.getSslContextFactory());
/** * Creates client connection configuration by copying all properties from * given configuration. * * @param cfg Client configuration. */ public ConnectorConfiguration(ConnectorConfiguration cfg) { assert cfg != null; msgInterceptor = cfg.getMessageInterceptor(); threadPoolSize = cfg.getThreadPoolSize(); idleTimeout = cfg.getIdleTimeout(); jettyPath = cfg.getJettyPath(); portRange = cfg.getPortRange(); secretKey = cfg.getSecretKey(); directBuf = cfg.isDirectBuffer(); host = cfg.getHost(); noDelay = cfg.isNoDelay(); port = cfg.getPort(); rcvBufSize = cfg.getReceiveBufferSize(); selectorCnt = cfg.getSelectorCount(); sndBufSize = cfg.getSendBufferSize(); sndQueueLimit = cfg.getSendQueueLimit(); sslClientAuth = cfg.isSslClientAuth(); sslCtxFactory = cfg.getSslContextFactory(); sslEnabled = cfg.isSslEnabled(); sslFactory = cfg.getSslFactory(); idleQryCurTimeout = cfg.getIdleQueryCursorTimeout(); idleQryCurCheckFreq = cfg.getIdleQueryCursorCheckFrequency(); }