|
29 | 29 |
|
30 | 30 | import javax.net.ssl.SSLContext;
|
31 | 31 |
|
| 32 | +import org.slf4j.Logger; |
| 33 | +import org.slf4j.LoggerFactory; |
| 34 | + |
32 | 35 | import com.arangodb.ArangoDB;
|
33 | 36 | import com.arangodb.ArangoDBException;
|
34 | 37 | import com.arangodb.entity.LoadBalancingStrategy;
|
|
57 | 60 | *
|
58 | 61 | */
|
59 | 62 | public abstract class InternalArangoDBBuilder {
|
| 63 | + |
| 64 | + private static final Logger LOGGER = LoggerFactory.getLogger(InternalArangoDBBuilder.class); |
60 | 65 |
|
61 | 66 | private static final String PROPERTY_KEY_HOSTS = "arangodb.hosts";
|
62 | 67 | private static final String PROPERTY_KEY_HOST = "arangodb.host";
|
@@ -187,13 +192,16 @@ protected void setSerializer(final ArangoSerialization serializer) {
|
187 | 192 | this.customSerializer = serializer;
|
188 | 193 | }
|
189 | 194 |
|
190 |
| - protected HostResolver createHostResolver( |
191 |
| - final Collection<Host> hosts, |
192 |
| - final int maxConnections, |
193 |
| - final ConnectionFactory connectionFactory) { |
194 |
| - return Boolean.TRUE == acquireHostList |
195 |
| - ? new ExtendedHostResolver(new ArrayList<Host>(hosts), maxConnections, connectionFactory) |
196 |
| - : new SimpleHostResolver(new ArrayList<Host>(hosts)); |
| 195 | + protected HostResolver createHostResolver(final Collection<Host> hosts, final int maxConnections,final ConnectionFactory connectionFactory) { |
| 196 | + |
| 197 | + if(acquireHostList) { |
| 198 | + LOGGER.info("acquireHostList -> Use ExtendedHostResolver"); |
| 199 | + return new ExtendedHostResolver(new ArrayList<Host>(hosts), maxConnections, connectionFactory); |
| 200 | + } else { |
| 201 | + LOGGER.info("Use SimpleHostResolver"); |
| 202 | + return new SimpleHostResolver(new ArrayList<Host>(hosts)); |
| 203 | + } |
| 204 | + |
197 | 205 | }
|
198 | 206 |
|
199 | 207 | protected HostHandler createHostHandler(final HostResolver hostResolver) {
|
|
0 commit comments