"at least one locator or server is required");
}
internalPool = true;
PoolFactory poolFactory = PoolManager.createFactory();
if (!CollectionUtils.isEmpty(locators)) {
for (InetSocketAddress connection : locators) {
poolFactory.addLocator(connection.getHostName(),
connection.getPort());
}
}
if (!CollectionUtils.isEmpty(servers)) {
for (InetSocketAddress connection : servers) {
poolFactory.addServer(connection.getHostName(),
connection.getPort());
}
}
poolFactory.setFreeConnectionTimeout(freeConnectionTimeout);
poolFactory.setIdleTimeout(idleTimeout);
poolFactory.setLoadConditioningInterval(loadConditioningInterval);
poolFactory.setMaxConnections(maxConnections);
poolFactory.setMinConnections(minConnections);
poolFactory.setMultiuserAuthentication(multiUserAuthentication);
poolFactory.setPingInterval(pingInterval);
poolFactory.setPRSingleHopEnabled(prSingleHopEnabled);
poolFactory.setReadTimeout(readTimeout);
poolFactory.setRetryAttempts(retryAttempts);
poolFactory.setServerGroup(serverGroup);
poolFactory.setSocketBufferSize(socketBufferSize);
poolFactory.setStatisticInterval(statisticInterval);
poolFactory.setSubscriptionEnabled(subscriptionEnabled);
poolFactory.setSubscriptionAckInterval(subscriptionAckInterval);
poolFactory
.setSubscriptionMessageTrackingTimeout(subscriptionMessageTrackingTimeout);
poolFactory.setSubscriptionRedundancy(subscriptionRedundancy);
poolFactory.setThreadLocalConnections(threadLocalConnections);
pool = poolFactory.create(name);
}
}