Skip to content

Commit a0e8a95

Browse files
authored
Merge pull request #157 from eclipse/remove_async
Remove async
2 parents 6994c9e + d5cba46 commit a0e8a95

File tree

71 files changed

+58
-4560
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+58
-4560
lines changed

arangodb-driver/pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<description>The Eclipse JNoSQL communication layer, Diana, to AranboDB</description>
2929

3030
<properties>
31-
<arango.driver>6.0.0</arango.driver>
31+
<arango.driver>6.6.2</arango.driver>
3232
</properties>
3333
<dependencies>
3434
<dependency>
@@ -51,10 +51,5 @@
5151
<artifactId>arangodb-java-driver</artifactId>
5252
<version>${arango.driver}</version>
5353
</dependency>
54-
<dependency>
55-
<groupId>com.arangodb</groupId>
56-
<artifactId>arangodb-java-driver-async</artifactId>
57-
<version>${arango.driver}</version>
58-
</dependency>
5954
</dependencies>
6055
</project>

arangodb-driver/src/main/java/org/eclipse/jnosql/diana/arangodb/ArangoDBBuilderAsync.java

Lines changed: 0 additions & 83 deletions
This file was deleted.

arangodb-driver/src/main/java/org/eclipse/jnosql/diana/arangodb/ArangoDBConfiguration.java

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717

1818
import com.arangodb.ArangoDB;
19-
import com.arangodb.ArangoDBAsync;
2019
import com.arangodb.entity.LoadBalancingStrategy;
2120
import jakarta.nosql.Settings;
2221

@@ -25,15 +24,13 @@
2524
/**
2625
* The base to configuration both key-value and document on mongoDB.
2726
* To each configuration setted, it will change both builder
28-
* {@link ArangoDB.Builder} and {@link ArangoDBAsync.Builder}
27+
* {@link ArangoDB.Builder}
2928
*/
3029
public abstract class ArangoDBConfiguration {
3130

3231

3332
protected ArangoDB.Builder builder = new ArangoDB.Builder();
3433

35-
protected ArangoDBAsync.Builder builderAsync = new ArangoDBAsync.Builder();
36-
3734
/**
3835
* Adds a host in the arangodb builder
3936
*
@@ -44,7 +41,6 @@ public abstract class ArangoDBConfiguration {
4441
public void addHost(String host, int port) throws NullPointerException {
4542
requireNonNull(host, "host is required");
4643
builder.host(host, port);
47-
builderAsync.host(host, port);
4844
}
4945

5046
/**
@@ -56,7 +52,6 @@ public void addHost(String host, int port) throws NullPointerException {
5652
public void setLoadBalancingStrategy(LoadBalancingStrategy loadBalancingStrategy) throws NullPointerException {
5753
requireNonNull(loadBalancingStrategy, "loadBalancingStrategy is required");
5854
builder.loadBalancingStrategy(loadBalancingStrategy);
59-
builderAsync.loadBalancingStrategy(loadBalancingStrategy);
6055
}
6156

6257

@@ -67,7 +62,6 @@ public void setLoadBalancingStrategy(LoadBalancingStrategy loadBalancingStrategy
6762
*/
6863
public void setTimeout(int timeout) {
6964
builder.timeout(timeout);
70-
builderAsync.timeout(timeout);
7165
}
7266

7367
/**
@@ -77,7 +71,6 @@ public void setTimeout(int timeout) {
7771
*/
7872
public void setUser(String user) {
7973
builder.user(user);
80-
builderAsync.user(user);
8174
}
8275

8376
/**
@@ -87,7 +80,6 @@ public void setUser(String user) {
8780
*/
8881
public void setPassword(String password) {
8982
builder.password(password);
90-
builderAsync.password(password);
9183
}
9284

9385
/**
@@ -97,7 +89,6 @@ public void setPassword(String password) {
9789
*/
9890
public void setUseSSL(boolean value) {
9991
builder.useSsl(value);
100-
builderAsync.useSsl(value);
10192
}
10293

10394
/**
@@ -107,7 +98,6 @@ public void setUseSSL(boolean value) {
10798
*/
10899
public void setChuckSize(int chuckSize) {
109100
builder.chunksize(chuckSize);
110-
builderAsync.chunksize(chuckSize);
111101
}
112102

113103
/**
@@ -121,27 +111,12 @@ public void syncBuilder(ArangoDB.Builder builder) throws NullPointerException {
121111
this.builder = builder;
122112
}
123113

124-
/**
125-
* Defines a new asyncBuilder to ArangoDB
126-
*
127-
* @param builderAsync the new builderAsync
128-
* @throws NullPointerException when builderAsync is null
129-
*/
130-
public void asyncBuilder(ArangoDBAsync.Builder builderAsync) throws NullPointerException {
131-
requireNonNull(builderAsync, "asyncBuilder is required");
132-
this.builderAsync = builderAsync;
133-
}
134114

135115
protected ArangoDB getArangoDB(Settings settings) {
136116
ArangoDBBuilderSync aragonDB = new ArangoDBBuilderSync(builder);
137117
ArangoDBBuilders.load(settings, aragonDB);
138118
return aragonDB.build();
139119
}
140120

141-
protected ArangoDBAsync getArangoDBAsync(Settings settings) {
142-
ArangoDBBuilderAsync aragonDB = new ArangoDBBuilderAsync(builderAsync);
143-
ArangoDBBuilders.load(settings, aragonDB);
144-
return aragonDB.build();
145-
}
146121

147122
}

arangodb-driver/src/main/java/org/eclipse/jnosql/diana/arangodb/document/ArangoDBDocumentCollectionManagerAsync.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

arangodb-driver/src/main/java/org/eclipse/jnosql/diana/arangodb/document/ArangoDBDocumentCollectionManagerFactory.java

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,15 @@
1616

1717

1818
import com.arangodb.ArangoDB;
19-
import com.arangodb.ArangoDBAsync;
20-
import jakarta.nosql.document.DocumentCollectionManagerAsyncFactory;
2119
import jakarta.nosql.document.DocumentCollectionManagerFactory;
2220

23-
final class ArangoDBDocumentCollectionManagerFactory implements DocumentCollectionManagerFactory,
24-
DocumentCollectionManagerAsyncFactory {
21+
final class ArangoDBDocumentCollectionManagerFactory implements DocumentCollectionManagerFactory{
2522

2623

2724
private final ArangoDB arangoDB;
2825

29-
private final ArangoDBAsync arangoDBAsync;
30-
31-
ArangoDBDocumentCollectionManagerFactory(ArangoDB arangoDB, ArangoDBAsync arangoDBAsync) {
26+
ArangoDBDocumentCollectionManagerFactory(ArangoDB arangoDB) {
3227
this.arangoDB = arangoDB;
33-
this.arangoDBAsync = arangoDBAsync;
3428
}
3529

3630
@Override
@@ -39,14 +33,8 @@ public ArangoDBDocumentCollectionManager get(String database) {
3933
return new DefaultArangoDBDocumentCollectionManager(database, arangoDB);
4034
}
4135

42-
@Override
43-
public ArangoDBDocumentCollectionManagerAsync getAsync(String database) throws UnsupportedOperationException, NullPointerException {
44-
return new DefaultArangoDBDocumentCollectionManagerAsync(database, arangoDB, arangoDBAsync);
45-
}
46-
4736
@Override
4837
public void close() {
4938
arangoDB.shutdown();
50-
arangoDBAsync.shutdown();
5139
}
5240
}

arangodb-driver/src/main/java/org/eclipse/jnosql/diana/arangodb/document/ArangoDBDocumentConfiguration.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@
1616
package org.eclipse.jnosql.diana.arangodb.document;
1717

1818
import com.arangodb.ArangoDB;
19-
import com.arangodb.ArangoDBAsync;
2019
import jakarta.nosql.Settings;
2120
import jakarta.nosql.Settings.SettingsBuilder;
2221
import jakarta.nosql.document.DocumentConfiguration;
23-
import jakarta.nosql.document.DocumentConfigurationAsync;
2422
import org.eclipse.jnosql.diana.arangodb.ArangoDBConfiguration;
2523
import org.eclipse.jnosql.diana.arangodb.ArangoDBConfigurations;
2624
import org.eclipse.jnosql.diana.driver.ConfigurationReader;
@@ -31,7 +29,7 @@
3129
import static org.eclipse.jnosql.diana.arangodb.ArangoDBConfigurations.FILE_CONFIGURATION;
3230

3331
/**
34-
* The implementation of {@link DocumentConfiguration} and {@link DocumentConfigurationAsync}
32+
* The implementation of {@link DocumentConfiguration}
3533
* that returns {@link ArangoDBDocumentCollectionManagerFactory}.
3634
* It tries to read the configuration properties from diana-arangodb.properties file.
3735
*
@@ -40,7 +38,7 @@
4038
*
4139
*/
4240
public final class ArangoDBDocumentConfiguration extends ArangoDBConfiguration
43-
implements DocumentConfiguration, DocumentConfigurationAsync {
41+
implements DocumentConfiguration {
4442

4543
@Override
4644
public ArangoDBDocumentCollectionManagerFactory get() throws UnsupportedOperationException {
@@ -55,8 +53,7 @@ public ArangoDBDocumentCollectionManagerFactory get(Settings settings) throws Nu
5553
requireNonNull(settings, "settings is required");
5654

5755
ArangoDB arangoDB = getArangoDB(settings);
58-
ArangoDBAsync arangoDBAsync = getArangoDBAsync(settings);
59-
return new ArangoDBDocumentCollectionManagerFactory(arangoDB, arangoDBAsync);
56+
return new ArangoDBDocumentCollectionManagerFactory(arangoDB);
6057
}
6158

6259
}

0 commit comments

Comments
 (0)