|
44 | 44 | import com.arangodb.internal.util.ArangoSerializerImpl;
|
45 | 45 | import com.arangodb.internal.util.DefaultArangoSerialization;
|
46 | 46 | import com.arangodb.internal.velocystream.VstCommunicationSync;
|
| 47 | +import com.arangodb.internal.velocystream.VstConnectionFactorySync; |
47 | 48 | import com.arangodb.model.DBCreateOptions;
|
48 | 49 | import com.arangodb.model.LogOptions;
|
49 | 50 | import com.arangodb.model.UserCreateOptions;
|
@@ -775,12 +776,22 @@ public synchronized ArangoDBAsync build() {
|
775 | 776 |
|
776 | 777 | final int max = maxConnections != null ? Math.max(1, maxConnections)
|
777 | 778 | : ArangoDefaults.MAX_CONNECTIONS_VST_DEFAULT;
|
778 |
| - final ConnectionFactory connectionFactory = new VstConnectionFactoryAsync(host, timeout, connectionTtl, |
| 779 | + final ConnectionFactory syncConnectionFactory = new VstConnectionFactorySync(host, timeout, connectionTtl, |
779 | 780 | keepAliveInterval, useSsl, sslContext);
|
780 |
| - final HostResolver hostResolver = createHostResolver(createHostList(max, connectionFactory), max, |
781 |
| - connectionFactory); |
782 |
| - final HostHandler hostHandler = createHostHandler(hostResolver); |
783 |
| - return new ArangoDBAsyncImpl(asyncBuilder(hostHandler), util, syncBuilder(hostHandler), hostResolver, |
| 781 | + final ConnectionFactory asyncConnectionFactory = new VstConnectionFactoryAsync(host, timeout, connectionTtl, |
| 782 | + keepAliveInterval, useSsl, sslContext); |
| 783 | + final HostResolver syncHostResolver = createHostResolver(createHostList(max, syncConnectionFactory), max, |
| 784 | + syncConnectionFactory); |
| 785 | + final HostResolver asyncHostResolver = createHostResolver(createHostList(max, asyncConnectionFactory), max, |
| 786 | + asyncConnectionFactory); |
| 787 | + final HostHandler syncHostHandler = createHostHandler(syncHostResolver); |
| 788 | + final HostHandler asyncHostHandler = createHostHandler(asyncHostResolver); |
| 789 | + return new ArangoDBAsyncImpl( |
| 790 | + asyncBuilder(asyncHostHandler), |
| 791 | + util, |
| 792 | + syncBuilder(syncHostHandler), |
| 793 | + asyncHostResolver, |
| 794 | + syncHostResolver, |
784 | 795 | new ArangoContext());
|
785 | 796 | }
|
786 | 797 |
|
|
0 commit comments