@Override public ServerLocation findBestServer(ServerLocation currentServer, Set excludedServers) { if (currentServer != null && source.isBalanced()) { return currentServer; } final Set origExcludedServers = excludedServers; excludedServers = new HashSet(excludedServers); Set denyListedServers = denyList.getBadServers(); excludedServers.addAll(denyListedServers); ServerLocation server = source.findReplacementServer(currentServer, excludedServers); if (server == null) { // Nothing worked! Let's try without the denylist. if (excludedServers.size() > origExcludedServers.size()) { // We had some servers denylisted so lets give this another whirl. server = source.findReplacementServer(currentServer, origExcludedServers); } } if (server == null && logger.isDebugEnabled()) { logger.debug("Source was unable to findForReplacement any servers"); } return server; }
return null; servers = source.findServersForQueue(excludedServers, count, proxyId, findDurable); } catch (GemFireSecurityException e) {
@Override public List<InetSocketAddress> getOnlineLocators() { return this.source.getOnlineLocators(); }
ServerLocation server = source.findServer(excludedServers); if (server == null) {
static List constructAndGetFunctionTasks(final PoolImpl pool, final Function function, Object args, MemberMappedArgument memberMappedArg, byte hasResult, ResultCollector rc, boolean isFnSerializationReqd, UserAttributes attributes) { final List<SingleHopOperationCallable> tasks = new ArrayList<SingleHopOperationCallable>(); List<ServerLocation> servers = pool.getConnectionSource().getAllServers(); for (ServerLocation server : servers) { final AbstractOp op = new ExecuteFunctionOpImpl(function, args, memberMappedArg, hasResult, rc, isFnSerializationReqd, (byte) 0, null/* onGroups does not use single-hop for now */, false, false); SingleHopOperationCallable task = new SingleHopOperationCallable(server, pool, op, attributes); tasks.add(task); } return tasks; }
this.source.stop();
backgroundProcessor = LoggingExecutors.newScheduledThreadPool(timerName, BACKGROUND_TASK_POOL_SIZE, BACKGROUND_TASK_POOL_KEEP_ALIVE, threadMonitoring); source.start(this); connectionFactory.start(backgroundProcessor); endpointManager.addListener(new InstantiatorRecoveryListener(backgroundProcessor, this));
doReturn(serverLocation).when(connectionSource).findServer(any(Set.class));
static List constructAndGetFunctionTasks(final PoolImpl pool, final String functionId, Object args, MemberMappedArgument memberMappedArg, byte hasResult, ResultCollector rc, boolean isFnSerializationReqd, boolean isHA, boolean optimizeForWrite, UserAttributes properties) { final List<SingleHopOperationCallable> tasks = new ArrayList<SingleHopOperationCallable>(); List<ServerLocation> servers = pool.getConnectionSource().getAllServers(); for (ServerLocation server : servers) { final AbstractOp op = new ExecuteFunctionOpImpl(functionId, args, memberMappedArg, hasResult, rc, isFnSerializationReqd, isHA, optimizeForWrite, (byte) 0, null/* onGroups does not use single-hop for now */, false, false); SingleHopOperationCallable task = new SingleHopOperationCallable(server, pool, op, properties); tasks.add(task); } return tasks; }
+ op.getMessage() + " to all servers using pool: " + pool); servers = pool.getConnectionSource().getAllServers(); Iterator i = servers.iterator(); while (i.hasNext()) {
+ op.getMessage() + " to all servers using pool: " + pool); servers = pool.getConnectionSource().getAllServers(); Iterator i = servers.iterator(); while (i.hasNext()) {