File tree Expand file tree Collapse file tree 8 files changed +5
-68
lines changed
main/java/org/jnosql/diana/arangodb
test/java/org/jnosql/diana/arangodb Expand file tree Collapse file tree 8 files changed +5
-68
lines changed Original file line number Diff line number Diff line change 2020interface ArangoDBBuilder {
2121
2222
23- /**
24- * @param host the host
25- * @deprecated use {@link ArangoDBBuilder#host(String, int)} instead
26- */
27- void host (String host );
28-
29- /**
30- * * @deprecated use {@link ArangoDBBuilder#host(String, int)} instead
31- *
32- * @param port the port
33- */
34- void port (int port );
35-
3623 void host (String host , int port );
3724
3825 void timeout (int timeout );
Original file line number Diff line number Diff line change @@ -22,16 +22,6 @@ public class ArangoDBBuilderAsync implements ArangoDBBuilder {
2222
2323 private final ArangoDBAsync .Builder arangoDB = new ArangoDBAsync .Builder ();
2424
25- @ Override
26- public void host (String host ) {
27- arangoDB .host (host );
28- }
29-
30- @ Override
31- public void port (int port ) {
32- arangoDB .port (port );
33- }
34-
3525 @ Override
3626 public void host (String host , int port ) {
3727 arangoDB .host (host , port );
Original file line number Diff line number Diff line change @@ -22,16 +22,6 @@ public class ArangoDBBuilderSync implements ArangoDBBuilder {
2222
2323 private final ArangoDB .Builder arangoDB = new ArangoDB .Builder ();
2424
25- @ Override
26- public void host (String host ) {
27- arangoDB .host (host );
28- }
29-
30- @ Override
31- public void port (int port ) {
32- arangoDB .port (port );
33- }
34-
3525 @ Override
3626 public void host (String host , int port ) {
3727 arangoDB .host (host , port );
Original file line number Diff line number Diff line change 2525
2626final class ArangoDBBuilders {
2727
28- private static final String HOST = "arangodb-host" ;
2928 private static final String USER = "arangodb-user" ;
3029 private static final String PASSWORD = "arangodb-password" ;
31- private static final String PORT = "arangodb-port" ;
32- private static final String CHUCK_SIZE = "arangodb-chuckSize" ;
3330 private static final String TIMEOUT = "arangodb-timeout" ;
3431 private static final String USER_SSL = "arangodb-userSsl" ;
3532 private static final String LOAD_BALANCING_STRATEGY = "arangodb.loadBalancingStrategy" ;
@@ -44,11 +41,8 @@ private ArangoDBBuilders() {
4441
4542 static void load (Settings settings , ArangoDBBuilder arangoDB ) {
4643
47- ofNullable (settings .get (HOST )).map (Object ::toString ).ifPresent (arangoDB ::host );
4844 ofNullable (settings .get (USER )).map (Object ::toString ).ifPresent (arangoDB ::user );
4945 ofNullable (settings .get (PASSWORD )).map (Object ::toString ).ifPresent (arangoDB ::password );
50- ofNullable (settings .get (PORT )).map (Object ::toString ).map (Integer ::valueOf ).ifPresent (arangoDB ::port );
51- ofNullable (settings .get (CHUCK_SIZE )).map (Object ::toString ).map (Integer ::valueOf ).ifPresent (arangoDB ::port );
5246 ofNullable (settings .get (TIMEOUT )).map (Object ::toString ).map (Integer ::valueOf ).ifPresent (arangoDB ::timeout );
5347
5448 ofNullable (settings .get (CHUNK_CONTENT_SIZE )).map (Object ::toString ).map (Integer ::valueOf )
Original file line number Diff line number Diff line change @@ -34,31 +34,6 @@ public abstract class ArangoDBConfiguration {
3434
3535 protected ArangoDBAsync .Builder builderAsync = new ArangoDBAsync .Builder ();
3636
37-
38- /**
39- * set the setHost
40- *
41- * @param host the setHost
42- * @deprecated use ArangoDBConfiguration{@link #addHost(String, int)}
43- */
44- @ Deprecated
45- public void setHost (String host ) {
46- builder .host (host );
47- builderAsync .host (host );
48- }
49-
50- /**
51- * set the setPort
52- *
53- * @param port the setPort
54- * @deprecated use ArangoDBConfiguration{@link #addHost(String, int)}
55- */
56- @ Deprecated
57- public void setPort (int port ) {
58- builder .port (port );
59- builderAsync .port (port );
60- }
61-
6237 /**
6338 * Adds a host in the arangodb builder
6439 *
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public class ArangoDBDocumentConfigurationTest {
2626 @ Test
2727 public void shouldCreateDocumentCollectionManagerFactory () {
2828 ArangoDBDocumentConfiguration configuration = new ArangoDBDocumentConfiguration ();
29- configuration .setHost ( "172.17.0.2" );
29+ configuration .addHost ( "localhost" , 8529 );
3030 DocumentCollectionManagerFactory managerFactory = configuration .get ();
3131 assertNotNull (managerFactory );
3232 }
Original file line number Diff line number Diff line change 1818
1919public final class DocumentConfigurationUtils {
2020
21- private DocumentConfigurationUtils () {}
21+ private DocumentConfigurationUtils () {
22+ }
2223
2324 public static ArangoDBDocumentCollectionManagerFactory getConfiguration () {
2425 ArangoDBDocumentConfiguration configuration = new ArangoDBDocumentConfiguration ();
25- configuration .setHost ("localhost" );
26+ configuration .addHost ("localhost" , 8529 );
2627 return configuration .get ();
2728 }
2829}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public final class ArangoDBTestUtils {
2222
2323 public static BucketManagerFactory get () {
2424 ArangoDBKeyValueConfiguration configuration = new ArangoDBKeyValueConfiguration ();
25- configuration .setHost ( "172.17.0.2" );
25+ configuration .addHost ( "localhost" , 8529 );
2626 return configuration .get ();
2727 }
2828}
You can’t perform that action at this time.
0 commit comments