if (serverType.isThriftGFXD()) { locatorType = serverType.getCorrespondingLocatorType(); if (!serverTypes.contains(locatorType)) { allTypes.add(locatorType);
@SuppressWarnings("unchecked") @Override public Object process(Object arg, Set<DistributedMember> members, GfxdConfigMessage<?> msg) { try { final Collection<String> serverGroups; final Collection<String> intersectGroups; final String excludedServers; if (arg instanceof Object[]) { Object[] args = (Object[])arg; // new case of serverGroups+excludedServers serverGroups = (Collection<String>)args[0]; intersectGroups = (Collection<String>)args[1]; excludedServers = (String)args[2]; } else { // old case of CSV excludedServers serverGroups = Collections.singletonList(ServerType.DRDA .getServerGroupName()); intersectGroups = null; excludedServers = arg != null ? arg.toString() : null; } return GemFireXDUtils.getPreferredServer(serverGroups, intersectGroups, excludedServers, false); } catch (SQLException ex) { throw GemFireXDRuntimeException.newRuntimeException( "failed in GET_PREFERREDSERVER", ex); } } },
if (service != null) { for (NetworkInterface ni : service.getAllNetworkServers()) { if (!ni.getServerType().isDRDA()) { continue;
/** * {@inheritDoc} */ @Override public boolean execute(Object o) { final HostAddress hostAddr = (HostAddress)o; if (this.keepLocators) { if (hostAddr.getServerType().isThriftLocator()) { this.outServers.add(hostAddr); } } if (this.keepServers) { if (hostAddr.getServerType().isThriftGFXD()) { this.outServers.add(hostAddr); } } return true; } }
serverType = ServerType.findByGroupName(groups[0]); if (ServerType.DRDA.equals(serverType)) { isAdded = addMemberServer(m, bp.getHost() + '[' + bp.getPort() + ']', this.drdaServerMap, true);
if (netImpl.getServerType().isThrift()) { serverType += (" (" + netImpl.getServerType().getProtocolString() + ')');
this.socketParams.setServerType(ServerType.getServerType(true, binaryProtocol, useSSL));
if (service != null) { for (NetworkInterface ni : service.getAllNetworkServers()) { if (ni.getServerType().isThrift()) { thriftServers.add(ni.asString());
/** * {@inheritDoc} */ @Override public boolean execute(Object o) { final HostAddress hostAddr = (HostAddress)o; if (this.keepLocators) { if (hostAddr.getServerType().isThriftLocator()) { this.outServers.add(hostAddr); } } if (this.keepServers) { if (hostAddr.getServerType().isThriftGFXD()) { this.outServers.add(hostAddr); } } return true; } }
serverType = ServerType.findByGroupName(groups[0]); if (ServerType.DRDA.equals(serverType)) { isAdded = addMemberServer(m, bp.getHost() + '[' + bp.getPort() + ']', this.drdaServerMap, true);
if (netImpl.getServerType().isThrift()) { serverType += (" (" + netImpl.getServerType().getProtocolString() + ')');
useSSL = false; socketParams.setServerType(ServerType.getServerType(isServer, useBinaryProtocol, useSSL));
if (service != null) { for (NetworkInterface ni : service.getAllNetworkServers()) { if (ni.getServerType().isThrift()) { thriftServers.add(ni.asString());
@SuppressWarnings("unchecked") @Override public Object process(Object arg, Set<DistributedMember> members, GfxdConfigMessage<?> msg) { try { final Collection<String> serverGroups; final Collection<String> intersectGroups; final String excludedServers; if (arg instanceof Object[]) { Object[] args = (Object[])arg; // new case of serverGroups+excludedServers serverGroups = (Collection<String>)args[0]; intersectGroups = (Collection<String>)args[1]; excludedServers = (String)args[2]; } else { // old case of CSV excludedServers serverGroups = Collections.singletonList(ServerType.DRDA .getServerGroupName()); intersectGroups = null; excludedServers = arg != null ? arg.toString() : null; } return GemFireXDUtils.getPreferredServer(serverGroups, intersectGroups, excludedServers, false); } catch (SQLException ex) { throw GemFireXDRuntimeException.newRuntimeException( "failed in GET_PREFERREDSERVER", ex); } } },
if (serverType.isThriftGFXD()) { locatorType = serverType.getCorrespondingLocatorType(); if (!serverTypes.contains(locatorType)) { allTypes.add(locatorType);
useSSL = false; socketParams.setServerType(ServerType.getServerType(isServer, useBinaryProtocol, useSSL));
if (service != null) { for (NetworkInterface ni : service.getAllNetworkServers()) { if (!ni.getServerType().isDRDA()) { continue;
for (NetworkInterface ni : ifaces) { serverType = ni.getServerType(); if (!serverType.isThrift()) { continue;
/** * Get the preferred server to which the next connection should be made. A set * of servers to be excluded from consideration can be passed as a * comma-separated string (e.g. to ignore the failed server during failover). * No server groups are provided here since JDBC clients do not know about * those currently. */ public static void GET_PREFSERVER(String excludedServers, String[] prefServerName, int[] prefServerPort) throws SQLException { prefServerName[0] = null; prefServerPort[0] = -1; // add the special group for DRDA servers ServerLocation server = GemFireXDUtils.getPreferredServer(Collections .singletonList(ServerType.DRDA.getServerGroupName()), null, excludedServers, true); if (server != null) { prefServerName[0] = server.getHostName(); prefServerPort[0] = server.getPort(); } }
if (service != null) { for (NetworkInterface ni : service.getAllNetworkServers()) { if (!ni.getServerType().isDRDA()) { continue;