getRules() {
- return rules;
- }
- }
-}
diff --git a/core/src/main/java/com/arangodb/model/AqlQueryOptions.java b/core/src/main/java/com/arangodb/model/AqlQueryOptions.java
index e0266269b..e799fbb76 100644
--- a/core/src/main/java/com/arangodb/model/AqlQueryOptions.java
+++ b/core/src/main/java/com/arangodb/model/AqlQueryOptions.java
@@ -299,15 +299,6 @@ public Integer getMaxNumberOfPlans() {
return maxNumberOfPlans;
}
- /**
- * @deprecated for removal, use {@link Options#getMaxNumberOfPlans()} instead
- */
- @Deprecated
- @JsonIgnore
- public Integer getMaxPlans() {
- return getMaxNumberOfPlans();
- }
-
public Double getMaxRuntime() {
return maxRuntime;
}
@@ -524,7 +515,7 @@ public Boolean getAllowDirtyReads() {
* You may observe data inconsistencies (dirty reads) when reading from followers, namely
* obsolete revisions of documents because changes have not yet been replicated to the
* follower, as well as changes to documents before they are officially committed on the
- * leader. This feature is only available in the Enterprise Edition.
+ * leader.
* @return this
*/
public AqlQueryOptions allowDirtyReads(final Boolean allowDirtyReads) {
@@ -747,25 +738,6 @@ public AqlQueryOptions maxNumberOfPlans(final Integer maxNumberOfPlans) {
return this;
}
- /**
- * @deprecated for removal, use {@link AqlQueryOptions#getMaxNumberOfPlans()} instead
- */
- @Deprecated
- @JsonIgnore
- public Integer getMaxPlans() {
- return getMaxNumberOfPlans();
- }
-
- /**
- * @param maxPlans Limits the maximum number of plans that are created by the AQL query optimizer.
- * @return this
- * @deprecated for removal, use {@link AqlQueryOptions#maxNumberOfPlans(Integer)} instead
- */
- @Deprecated
- public AqlQueryOptions maxPlans(final Integer maxPlans) {
- return maxNumberOfPlans(maxPlans);
- }
-
@JsonIgnore
public Double getMaxRuntime() {
return getOptions().getMaxRuntime();
@@ -850,7 +822,7 @@ public Double getSatelliteSyncWait() {
}
/**
- * @param satelliteSyncWait This enterprise parameter allows to configure how long a DBServer will have time to
+ * @param satelliteSyncWait This parameter allows to configure how long a DBServer will have time to
* bring the
* satellite collections involved in the query into sync. The default value is 60.0
* (seconds). When the
@@ -894,8 +866,6 @@ public Boolean getSkipInaccessibleCollections() {
* collections and different users execute AQL queries on that graph. You can
* now naturally limit the
* accessible results by changing the access rights of users on collections.
- * This feature is only
- * available in the Enterprise Edition.
* @return this
* @since ArangoDB 3.2.0
*/
diff --git a/core/src/main/java/com/arangodb/model/CollectionCreateOptions.java b/core/src/main/java/com/arangodb/model/CollectionCreateOptions.java
index 143765c09..75e89cc2a 100644
--- a/core/src/main/java/com/arangodb/model/CollectionCreateOptions.java
+++ b/core/src/main/java/com/arangodb/model/CollectionCreateOptions.java
@@ -47,7 +47,7 @@ public final class CollectionCreateOptions {
private String distributeShardsLike;
private String shardingStrategy; // cluster option
- private String smartJoinAttribute; // enterprise option
+ private String smartJoinAttribute;
private CollectionSchema schema;
@@ -255,7 +255,7 @@ public String getDistributeShardsLike() {
}
/**
- * @param distributeShardsLike (The default is ""): in an enterprise cluster, this attribute binds the specifics
+ * @param distributeShardsLike (The default is ""): this attribute binds the specifics
* of sharding for the
* newly created collection to follow that of a specified existing collection. Note:
* Using this parameter
diff --git a/core/src/main/java/com/arangodb/model/CollectionPropertiesOptions.java b/core/src/main/java/com/arangodb/model/CollectionPropertiesOptions.java
index 691b4344d..66de62730 100644
--- a/core/src/main/java/com/arangodb/model/CollectionPropertiesOptions.java
+++ b/core/src/main/java/com/arangodb/model/CollectionPropertiesOptions.java
@@ -86,7 +86,7 @@ public ReplicationFactor getReplicationFactor() {
* different DB-Servers. The value 1 means that only one copy (no synchronous replication)
* is kept. A value of k means that k-1 replicas are kept. For SatelliteCollections, it
* needs to be the string "satellite", which matches the replication factor to the number
- * of DB-Servers (Enterprise Edition only).
+ * of DB-Servers.
*
* Any two copies reside on different DB-Servers. Replication between them is synchronous,
* that is, every write operation to the “leader” copy will be replicated to all “follower”
diff --git a/core/src/main/java/com/arangodb/model/EdgeCollectionDropOptions.java b/core/src/main/java/com/arangodb/model/EdgeCollectionDropOptions.java
deleted file mode 100644
index 6cc2d3a08..000000000
--- a/core/src/main/java/com/arangodb/model/EdgeCollectionDropOptions.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.arangodb.model;
-
-/**
- * @deprecated use {@link EdgeCollectionRemoveOptions} instead
- */
-@Deprecated
-public class EdgeCollectionDropOptions {
- private Boolean waitForSync;
- private Boolean dropCollections;
-
- public Boolean getWaitForSync() {
- return waitForSync;
- }
-
- /**
- * @param waitForSync Define if the request should wait until synced to disk.
- * @return this
- */
- public EdgeCollectionDropOptions waitForSync(Boolean waitForSync) {
- this.waitForSync = waitForSync;
- return this;
- }
-
- public Boolean getDropCollections() {
- return dropCollections;
- }
-
- /**
- * @param dropCollections Drop the collection as well. Collection will only be dropped if it is not used in other
- * graphs.
- * @return this
- */
- public EdgeCollectionDropOptions dropCollections(Boolean dropCollections) {
- this.dropCollections = dropCollections;
- return this;
- }
-}
diff --git a/core/src/main/java/com/arangodb/model/ExplainAqlQueryOptions.java b/core/src/main/java/com/arangodb/model/ExplainAqlQueryOptions.java
index 827670cf5..bb76c4839 100644
--- a/core/src/main/java/com/arangodb/model/ExplainAqlQueryOptions.java
+++ b/core/src/main/java/com/arangodb/model/ExplainAqlQueryOptions.java
@@ -127,7 +127,7 @@ public Boolean getAllowDirtyReads() {
* You may observe data inconsistencies (dirty reads) when reading from followers, namely
* obsolete revisions of documents because changes have not yet been replicated to the
* follower, as well as changes to documents before they are officially committed on the
- * leader. This feature is only available in the Enterprise Edition.
+ * leader.
* @return this
*/
public ExplainAqlQueryOptions allowDirtyReads(final Boolean allowDirtyReads) {
@@ -434,7 +434,7 @@ public Double getSatelliteSyncWait() {
}
/**
- * @param satelliteSyncWait This enterprise parameter allows to configure how long a DBServer will have time to
+ * @param satelliteSyncWait This parameter allows to configure how long a DBServer will have time to
* bring the
* satellite collections involved in the query into sync. The default value is 60.0
* (seconds). When the
@@ -478,8 +478,6 @@ public Boolean getSkipInaccessibleCollections() {
* collections and different users execute AQL queries on that graph. You can
* now naturally limit the
* accessible results by changing the access rights of users on collections.
- * This feature is only
- * available in the Enterprise Edition.
* @return this
* @since ArangoDB 3.2.0
*/
diff --git a/core/src/main/java/com/arangodb/model/FulltextIndexOptions.java b/core/src/main/java/com/arangodb/model/FulltextIndexOptions.java
deleted file mode 100644
index 6d34c2d65..000000000
--- a/core/src/main/java/com/arangodb/model/FulltextIndexOptions.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import com.arangodb.entity.IndexType;
-
-/**
- * @author Mark Vollmary
- * @deprecated since ArangoDB 3.10, use ArangoSearch or Inverted indexes instead.
- */
-@Deprecated
-public final class FulltextIndexOptions extends IndexOptions {
-
- private final IndexType type = IndexType.fulltext;
- private Iterable fields;
- private Integer minLength;
-
- public FulltextIndexOptions() {
- super();
- }
-
- @Override
- FulltextIndexOptions getThis() {
- return this;
- }
-
- public Iterable getFields() {
- return fields;
- }
-
- /**
- * @param fields A list of attribute paths
- * @return options
- */
- FulltextIndexOptions fields(final Iterable fields) {
- this.fields = fields;
- return this;
- }
-
- public IndexType getType() {
- return type;
- }
-
- public Integer getMinLength() {
- return minLength;
- }
-
- /**
- * @param minLength Minimum character length of words to index. Will default to a server-defined value if
- * unspecified. It
- * is thus recommended to set this value explicitly when creating the index.
- * @return options
- */
- public FulltextIndexOptions minLength(final Integer minLength) {
- this.minLength = minLength;
- return this;
- }
-
-}
diff --git a/core/src/main/java/com/arangodb/model/GraphCreateOptions.java b/core/src/main/java/com/arangodb/model/GraphCreateOptions.java
index 957a64221..ded79177e 100644
--- a/core/src/main/java/com/arangodb/model/GraphCreateOptions.java
+++ b/core/src/main/java/com/arangodb/model/GraphCreateOptions.java
@@ -85,7 +85,7 @@ public Boolean getIsSmart() {
}
/**
- * @param isSmart Define if the created graph should be smart. This only has effect in Enterprise version.
+ * @param isSmart Define if the created graph should be smart.
* @return options
*/
public GraphCreateOptions isSmart(final Boolean isSmart) {
@@ -190,7 +190,7 @@ public Collection getSatellites() {
/**
* @param satellites collection names that will be used to create SatelliteCollections
- * for a Hybrid (Disjoint) SmartGraph (Enterprise Edition only). Each array element
+ * for a Hybrid (Disjoint) SmartGraph. Each array element
* must be a valid collection name. The collection type cannot be modified later.
* @return options
* @since ArangoDB 3.9.0
diff --git a/core/src/main/java/com/arangodb/model/InvertedIndexOptions.java b/core/src/main/java/com/arangodb/model/InvertedIndexOptions.java
index 46a10eb84..3c22156c6 100644
--- a/core/src/main/java/com/arangodb/model/InvertedIndexOptions.java
+++ b/core/src/main/java/com/arangodb/model/InvertedIndexOptions.java
@@ -119,7 +119,7 @@ public Collection getOptimizeTopK() {
/**
* @param optimizeTopK An array of strings defining sort expressions that you want to optimize.
* @return options
- * @since ArangoDB 3.11, Enterprise Edition only
+ * @since ArangoDB 3.11
*/
public InvertedIndexOptions optimizeTopK(String... optimizeTopK) {
Collections.addAll(this.optimizeTopK, optimizeTopK);
@@ -373,7 +373,7 @@ public Boolean getCache() {
* are memory-mapped and it is up to the operating system to load them from disk into memory and to
* evict them from memory.
*
- * Default: `false`. (Enterprise Edition only)
+ * Default: `false`
* @return this
* @since ArangoDB 3.10.2
*/
@@ -390,7 +390,7 @@ public Boolean getPrimaryKeyCache() {
* @param primaryKeyCache If you enable this option, then the primary key columns are always cached in memory. This
* can improve the performance of queries that return many documents. Otherwise, these values
* are memory-mapped and it is up to the operating system to load them from disk into memory
- * and to evict them from memory (Enterprise Edition only). (default: false)
+ * and to evict them from memory. (default: false)
* @return this
* @since ArangoDB 3.10.2
*/
diff --git a/core/src/main/java/com/arangodb/model/OptionsBuilder.java b/core/src/main/java/com/arangodb/model/OptionsBuilder.java
index b429e273e..a9c489b0c 100644
--- a/core/src/main/java/com/arangodb/model/OptionsBuilder.java
+++ b/core/src/main/java/com/arangodb/model/OptionsBuilder.java
@@ -53,19 +53,10 @@ public static GeoIndexOptions build(final GeoIndexOptions options, final Iterabl
return options.fields(fields);
}
- @Deprecated
- public static FulltextIndexOptions build(final FulltextIndexOptions options, final Iterable fields) {
- return options.fields(fields);
- }
-
public static TtlIndexOptions build(final TtlIndexOptions options, final Iterable fields) {
return options.fields(fields);
}
- public static ZKDIndexOptions build(final ZKDIndexOptions options, final Iterable fields) {
- return options.fields(fields);
- }
-
public static AbstractMDIndexOptions> build(final AbstractMDIndexOptions> options, final Iterable fields) {
return options.fields(fields);
}
@@ -79,13 +70,6 @@ public static AqlQueryOptions build(final AqlQueryOptions options, final String
return options.query(query).bindVars(bindVars);
}
- public static AqlQueryExplainOptions build(
- final AqlQueryExplainOptions options,
- final String query,
- final Map bindVars) {
- return options.query(query).bindVars(bindVars);
- }
-
public static ExplainAqlQueryOptions build(
final ExplainAqlQueryOptions options,
final String query,
@@ -108,10 +92,6 @@ public static GraphCreateOptions build(
return options.name(name).edgeDefinitions(edCol);
}
- public static TransactionOptions build(final TransactionOptions options, final String action) {
- return options.action(action);
- }
-
public static CollectionRenameOptions build(final CollectionRenameOptions options, final String name) {
return options.name(name);
}
@@ -120,13 +100,6 @@ public static UserAccessOptions build(final UserAccessOptions options, final Per
return options.grant(grant);
}
- public static AqlFunctionCreateOptions build(
- final AqlFunctionCreateOptions options,
- final String name,
- final String code) {
- return options.name(name).code(code);
- }
-
public static VertexCollectionCreateOptions build(
final VertexCollectionCreateOptions options,
final String collection) {
diff --git a/core/src/main/java/com/arangodb/model/TransactionOptions.java b/core/src/main/java/com/arangodb/model/TransactionOptions.java
deleted file mode 100644
index a547f7732..000000000
--- a/core/src/main/java/com/arangodb/model/TransactionOptions.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import com.arangodb.internal.serde.UserData;
-
-/**
- * @author Mark Vollmary
- * @author Michele Rastelli
- */
-public final class TransactionOptions {
-
- private final TransactionCollectionOptions collections;
- private String action;
- private Object params;
- private Integer lockTimeout;
- private Boolean waitForSync;
- private Long maxTransactionSize;
-
- public TransactionOptions() {
- super();
- collections = new TransactionCollectionOptions();
- }
-
- public TransactionCollectionOptions getCollections() {
- return collections;
- }
-
- public String getAction() {
- return action;
- }
-
- /**
- * @param action the actual transaction operations to be executed, in the form of stringified JavaScript code
- * @return options
- */
- TransactionOptions action(final String action) {
- this.action = action;
- return this;
- }
-
- @UserData
- public Object getParams() {
- return params;
- }
-
- /**
- * @param params optional arguments passed to action
- * @return options
- */
- public TransactionOptions params(final Object params) {
- this.params = params;
- return this;
- }
-
- public Integer getLockTimeout() {
- return lockTimeout;
- }
-
- /**
- * @param lockTimeout a numeric value that can be used to set a timeout in seconds for
- * waiting on collection locks. This option is only meaningful when using
- * exclusive locks. If not specified, a default value of 900 seconds will be
- * used. Setting lockTimeout to 0 will make ArangoDB not time out
- * waiting for a lock.
- * @return options
- */
- public TransactionOptions lockTimeout(final Integer lockTimeout) {
- this.lockTimeout = lockTimeout;
- return this;
- }
-
- public Boolean getWaitForSync() {
- return waitForSync;
- }
-
- /**
- * @param waitForSync an optional boolean flag that, if set, will force the transaction to write all data to disk
- * before
- * returning
- * @return options
- */
- public TransactionOptions waitForSync(final Boolean waitForSync) {
- this.waitForSync = waitForSync;
- return this;
- }
-
- /**
- * @param read contains the array of collection-names to be used in the transaction (mandatory) for read
- * @return options
- */
- public TransactionOptions readCollections(final String... read) {
- collections.read(read);
- return this;
- }
-
- /**
- * @param write contains the array of collection-names to be used in the transaction (mandatory) for write
- * @return options
- */
- public TransactionOptions writeCollections(final String... write) {
- collections.write(write);
- return this;
- }
-
- /**
- * @param exclusive contains the array of collection-names to be used in the transaction (mandatory) for
- * exclusive write
- * @return options
- * @since ArangoDB 3.4.0
- */
- public TransactionOptions exclusiveCollections(final String... exclusive) {
- collections.exclusive(exclusive);
- return this;
- }
-
- /**
- * @param allowImplicit Collections that will be written to in the transaction must be declared with the write
- * attribute or it
- * will fail, whereas non-declared collections from which is solely read will be added
- * lazily. The
- * optional attribute allowImplicit can be set to false to let transactions fail in case of
- * undeclared
- * collections for reading. Collections for reading should be fully declared if possible, to
- * avoid
- * deadlocks.
- * @return options
- */
- public TransactionOptions allowImplicit(final Boolean allowImplicit) {
- collections.allowImplicit(allowImplicit);
- return this;
- }
-
- public Long getMaxTransactionSize() {
- return maxTransactionSize;
- }
-
- /**
- * @param maxTransactionSize Transaction size limit in bytes. Honored by the RocksDB storage engine only.
- * @return options
- * @since ArangoDB 3.2.0
- */
- public TransactionOptions maxTransactionSize(final Long maxTransactionSize) {
- this.maxTransactionSize = maxTransactionSize;
- return this;
- }
-
-}
diff --git a/core/src/main/java/com/arangodb/model/VertexCollectionCreateOptions.java b/core/src/main/java/com/arangodb/model/VertexCollectionCreateOptions.java
index d7ab02a70..ce526c6bf 100644
--- a/core/src/main/java/com/arangodb/model/VertexCollectionCreateOptions.java
+++ b/core/src/main/java/com/arangodb/model/VertexCollectionCreateOptions.java
@@ -58,7 +58,7 @@ public Collection getSatellites() {
/**
* @param satellites collection names that will be used to create SatelliteCollections
- * for a Hybrid (Disjoint) SmartGraph (Enterprise Edition only). Each array element
+ * for a Hybrid (Disjoint) SmartGraph. Each array element
* must be a valid collection name. The collection type cannot be modified later.
* @return options
* @since ArangoDB 3.9.0
diff --git a/core/src/main/java/com/arangodb/model/VertexCollectionDropOptions.java b/core/src/main/java/com/arangodb/model/VertexCollectionDropOptions.java
deleted file mode 100644
index aa940d3bd..000000000
--- a/core/src/main/java/com/arangodb/model/VertexCollectionDropOptions.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.arangodb.model;
-
-/**
- * @deprecated use {@link VertexCollectionRemoveOptions} instead
- */
-@Deprecated
-public class VertexCollectionDropOptions {
- private Boolean dropCollection;
-
- public Boolean getDropCollection() {
- return dropCollection;
- }
-
- /**
- * @param dropCollection Drop the collection as well. Collection will only be dropped if it is not used in other
- * graphs.
- * @return this
- */
- public VertexCollectionDropOptions dropCollection(Boolean dropCollection) {
- this.dropCollection = dropCollection;
- return this;
- }
-}
diff --git a/core/src/main/java/com/arangodb/model/ZKDIndexOptions.java b/core/src/main/java/com/arangodb/model/ZKDIndexOptions.java
deleted file mode 100644
index cb428fe08..000000000
--- a/core/src/main/java/com/arangodb/model/ZKDIndexOptions.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import com.arangodb.entity.IndexType;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * @author Michele Rastelli
- * @since ArangoDB 3.9
- * @deprecated since ArangoDB 3.12, use {@link MDIndexOptions} instead.
- */
-@Deprecated
-public final class ZKDIndexOptions extends IndexOptions {
-
- final IndexType type = IndexType.zkd;
- private Iterable fields;
- private Boolean unique;
- private FieldValueTypes fieldValueTypes;
-
- public ZKDIndexOptions() {
- super();
- }
-
- @Override
- ZKDIndexOptions getThis() {
- return this;
- }
-
- public Iterable getFields() {
- return fields;
- }
-
- /**
- * @param fields A list of attribute paths
- * @return options
- */
- ZKDIndexOptions fields(final Iterable fields) {
- this.fields = fields;
- return this;
- }
-
- public IndexType getType() {
- return type;
- }
-
- public Boolean getUnique() {
- return unique;
- }
-
- /**
- * @param unique if true, then create a unique index
- * @return options
- */
- public ZKDIndexOptions unique(final Boolean unique) {
- this.unique = unique;
- return this;
- }
-
- public FieldValueTypes getFieldValueTypes() {
- return fieldValueTypes;
- }
-
- /**
- * @param fieldValueTypes must be {@link FieldValueTypes#DOUBLE}, currently only doubles are supported as values.
- * @return options
- */
- public ZKDIndexOptions fieldValueTypes(final FieldValueTypes fieldValueTypes) {
- this.fieldValueTypes = fieldValueTypes;
- return this;
- }
-
- public enum FieldValueTypes {
- @JsonProperty("double")
- DOUBLE
- }
-
-}
diff --git a/core/src/main/java/com/arangodb/model/arangosearch/ArangoSearchCreateOptions.java b/core/src/main/java/com/arangodb/model/arangosearch/ArangoSearchCreateOptions.java
index 1361f9c9d..baf67f9e3 100644
--- a/core/src/main/java/com/arangodb/model/arangosearch/ArangoSearchCreateOptions.java
+++ b/core/src/main/java/com/arangodb/model/arangosearch/ArangoSearchCreateOptions.java
@@ -156,7 +156,7 @@ public ArangoSearchCreateOptions storedValues(final StoredValue... storedValues)
/**
* @param optimizeTopK An array of strings defining sort expressions that you want to optimize.
* @return options
- * @since ArangoDB 3.11, Enterprise Edition only
+ * @since ArangoDB 3.11
*/
public ArangoSearchCreateOptions optimizeTopK(final String... optimizeTopK) {
this.optimizeTopK = Arrays.asList(optimizeTopK);
@@ -169,7 +169,7 @@ public ArangoSearchCreateOptions optimizeTopK(final String... optimizeTopK) {
* Otherwise, these values are memory-mapped and it is up to the operating system to load
* them from disk into memory and to evict them from memory.
* @return options
- * @since ArangoDB 3.9.6, Enterprise Edition only
+ * @since ArangoDB 3.9.6
*/
public ArangoSearchCreateOptions primarySortCache(final Boolean primarySortCache) {
this.primarySortCache = primarySortCache;
@@ -182,7 +182,7 @@ public ArangoSearchCreateOptions primarySortCache(final Boolean primarySortCache
* are memory-mapped and it is up to the operating system to load them from disk into memory
* and to evict them from memory.
* @return options
- * @since ArangoDB 3.9.6, Enterprise Edition only
+ * @since ArangoDB 3.9.6
*/
public ArangoSearchCreateOptions primaryKeyCache(final Boolean primaryKeyCache) {
this.primaryKeyCache = primaryKeyCache;
@@ -218,15 +218,6 @@ public Collection getLinks() {
return links;
}
- /**
- * @deprecated for removal, use {@link #getPrimarySort()} instead
- */
- @Deprecated
- @JsonIgnore
- public Collection getPrimarySorts() {
- return getPrimarySort();
- }
-
public Collection getPrimarySort() {
return primarySorts;
}
diff --git a/core/src/main/java/com/arangodb/serde/ArangoSerde.java b/core/src/main/java/com/arangodb/serde/ArangoSerde.java
index d7a4ff8e7..5e6713b4c 100644
--- a/core/src/main/java/com/arangodb/serde/ArangoSerde.java
+++ b/core/src/main/java/com/arangodb/serde/ArangoSerde.java
@@ -1,6 +1,5 @@
package com.arangodb.serde;
-import com.arangodb.ContentType;
import com.arangodb.RequestContext;
import java.util.Objects;
@@ -12,13 +11,12 @@
* - serialization libraries for specific JVM languages (e.g. Scala, Kotlin, ...)
* - serialization libraries already in use in frameworks (e.g. JSON-B, Micronaut Serialization, ...)
* - high performance serialization libraries (e.g. supporting compile-time data binding code generation)
- * - low-level libraries without support to data binding
+ * - low-level libraries without support for data binding
*/
public interface ArangoSerde {
/**
- * Serializes the object into the target data type. For data type {@link ContentType#JSON}, the serialized JSON string
- * must be encoded into a byte array using the UTF-8 charset.
+ * Serializes the object to UTF-8 byte encoded JSON string
*
* @param value object to serialize
* @return serialized byte array
@@ -27,9 +25,8 @@ public interface ArangoSerde {
/**
* Deserializes the content and binds it to the target data type.
- * For data type {@link ContentType#JSON}, the byte array is the JSON string encoded using the UTF-8 charset.
*
- * @param content byte array to deserialize
+ * @param content UTF-8 byte encoded JSON string
* @param clazz class of target data type
* @return deserialized object
*/
@@ -37,9 +34,8 @@ public interface ArangoSerde {
/**
* Deserializes the content and binds it to the target data type.
- * For data type {@link ContentType#JSON}, the byte array is the JSON string encoded using the UTF-8 charset.
*
- * @param content byte array to deserialize
+ * @param content UTF-8 byte encoded JSON string
* @param clazz class of target data type
* @param ctx serde context, cannot be null
* @return deserialized object
diff --git a/core/src/main/java/com/arangodb/serde/ArangoSerdeProvider.java b/core/src/main/java/com/arangodb/serde/ArangoSerdeProvider.java
index 7fa1e048a..744132588 100644
--- a/core/src/main/java/com/arangodb/serde/ArangoSerdeProvider.java
+++ b/core/src/main/java/com/arangodb/serde/ArangoSerdeProvider.java
@@ -1,7 +1,6 @@
package com.arangodb.serde;
import com.arangodb.ArangoDBException;
-import com.arangodb.ContentType;
import com.arangodb.internal.serde.InternalSerdeProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -12,7 +11,7 @@
public interface ArangoSerdeProvider {
- static ArangoSerdeProvider of(ContentType contentType) {
+ static ArangoSerdeProvider load() {
Logger LOG = LoggerFactory.getLogger(ArangoSerdeProvider.class);
ServiceLoader loader = ServiceLoader.load(ArangoSerdeProvider.class);
@@ -26,17 +25,15 @@ static ArangoSerdeProvider of(ContentType contentType) {
LOG.warn("ServiceLoader failed to load ArangoSerdeProvider", e);
continue;
}
- if (contentType.equals(p.getContentType())) {
- if (serdeProvider != null) {
- throw new ArangoDBException("Found multiple serde providers! Please set explicitly the one to use.");
- }
- serdeProvider = p;
+ if (serdeProvider != null) {
+ throw new ArangoDBException("Found multiple serde providers! Please set explicitly the one to use.");
}
+ serdeProvider = p;
}
if (serdeProvider == null) {
LOG.warn("No ArangoSerdeProvider found, using InternalSerdeProvider. Please consider registering a custom " +
"ArangoSerdeProvider to avoid depending on internal classes which are not part of the public API.");
- serdeProvider = new InternalSerdeProvider(contentType);
+ serdeProvider = new InternalSerdeProvider();
}
return serdeProvider;
}
@@ -46,8 +43,4 @@ static ArangoSerdeProvider of(ContentType contentType) {
*/
ArangoSerde create();
- /**
- * @return the supported content type
- */
- ContentType getContentType();
}
diff --git a/core/src/main/java/com/arangodb/util/RawBytes.java b/core/src/main/java/com/arangodb/util/RawBytes.java
index 9d4230a59..f735504d1 100644
--- a/core/src/main/java/com/arangodb/util/RawBytes.java
+++ b/core/src/main/java/com/arangodb/util/RawBytes.java
@@ -12,9 +12,7 @@
*
* No validation is performed, the user is responsible for providing a valid byte array for the used content type.
*
- * The raw value byte array can represent either:
- * - a valid VPack
- * - a valid JSON UTF-8 encoded string
+ * The raw value byte array is the UTF-8 encoded JSON string
*
* The driver's {@link InternalSerde} supports serializing and deserializing to and from
* {@code RawBytes}.
diff --git a/dev-README.md b/dev-README.md
index 0eaaa61f0..1e789eac7 100644
--- a/dev-README.md
+++ b/dev-README.md
@@ -28,9 +28,7 @@ mvn -Dgpg.skip=true -Dmaven.javadoc.skip=true -Dmaven.test.skip verify
Reports:
- [core](core/target/site/jacoco/index.html)
- [jackson-serde-json](jackson-serde-json/target/site/jacoco/index.html)
-- [jackson-serde-vpack](jackson-serde-vpack/target/site/jacoco/index.html)
- [http-protocol](http-protocol/target/site/jacoco/index.html)
-- [vst-protocol](vst-protocol/target/site/jacoco/index.html)
## update native image reflection configuration
To generate reflection configuration run [NativeImageHelper](./driver/src/test/java/helper/NativeImageHelper.java) and
diff --git a/docker/start_db.sh b/docker/start_db.sh
index 42de82aa9..596ae8724 100755
--- a/docker/start_db.sh
+++ b/docker/start_db.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# Configuration environment variables:
-# STARTER_MODE: (single|cluster|activefailover), default single
+# STARTER_MODE: (single|cluster), default single
# DOCKER_IMAGE: ArangoDB docker image, default docker.io/arangodb/enterprise:latest
# STARTER_DOCKER_IMAGE: ArangoDB Starter docker image, default docker.io/arangodb/arangodb-starter:latest
# SSL: (true|false), default false
@@ -113,9 +113,3 @@ for a in ${COORDINATORS[*]} ; do
echo "$SCHEME://$a"
echo ""
done
-
-if [ "$STARTER_MODE" == "activefailover" ]; then
- LEADER=$("$LOCATION"/find_active_endpoint.sh)
- echo "Leader: $SCHEME://$LEADER"
- echo ""
-fi
diff --git a/driver/pom.xml b/driver/pom.xml
index aadcc4f43..e7e83a076 100644
--- a/driver/pom.xml
+++ b/driver/pom.xml
@@ -7,7 +7,7 @@
com.arangodb
arangodb-java-driver-parent
- 7.25.0
+ 8.0.0-SNAPSHOT
arangodb-java-driver
diff --git a/driver/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/native-image.properties b/driver/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/native-image.properties
index f60b51cea..2b1890523 100644
--- a/driver/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/native-image.properties
+++ b/driver/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/native-image.properties
@@ -1,5 +1,5 @@
Args=\
--H:ResourceConfigurationResources=${.}/resource-config.json,${.}/resource-config-spi.json \
+-H:ResourceConfigurationResources=${.}/resource-config-spi.json \
-H:ReflectionConfigurationResources=${.}/reflect-config.json,${.}/reflect-config-serde.json,${.}/reflect-config-spi.json,${.}/reflect-config-mp-config.json \
-H:SerializationConfigurationResources=${.}/serialization-config.json \
-H:DynamicProxyConfigurationResources=${.}/proxy-config.json
diff --git a/http-protocol/pom.xml b/http-protocol/pom.xml
index ae5cc07cc..fa4277c7e 100644
--- a/http-protocol/pom.xml
+++ b/http-protocol/pom.xml
@@ -7,7 +7,7 @@
com.arangodb
arangodb-java-driver-parent
- 7.25.0
+ 8.0.0-SNAPSHOT
http-protocol
@@ -31,4 +31,16 @@
+
+
+
+ io.vertx
+ vertx-stack-depchain
+ 5.0.8
+ pom
+ import
+
+
+
+
\ No newline at end of file
diff --git a/http-protocol/src/main/java/com/arangodb/http/HttpConnection.java b/http-protocol/src/main/java/com/arangodb/http/HttpConnection.java
index 0efce80f6..8c9680e9b 100644
--- a/http-protocol/src/main/java/com/arangodb/http/HttpConnection.java
+++ b/http-protocol/src/main/java/com/arangodb/http/HttpConnection.java
@@ -30,7 +30,6 @@
import com.arangodb.internal.config.ArangoConfig;
import com.arangodb.internal.net.Connection;
import com.arangodb.internal.net.ConnectionPool;
-import com.arangodb.internal.serde.ContentTypeFactory;
import com.arangodb.internal.util.EncodeUtils;
import io.netty.handler.ssl.ApplicationProtocolConfig;
import io.netty.handler.ssl.ClientAuth;
@@ -40,10 +39,7 @@
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import io.vertx.core.buffer.Buffer;
-import io.vertx.core.http.Http2Settings;
-import io.vertx.core.http.HttpHeaders;
-import io.vertx.core.http.HttpMethod;
-import io.vertx.core.http.HttpVersion;
+import io.vertx.core.http.*;
import io.vertx.core.net.JdkSSLEngineOptions;
import io.vertx.core.spi.tls.SslContextFactory;
import io.vertx.ext.auth.authentication.TokenCredentials;
@@ -76,7 +72,6 @@
public class HttpConnection implements Connection {
private static final Logger LOGGER = LoggerFactory.getLogger(HttpConnection.class);
private static final String CONTENT_TYPE_APPLICATION_JSON_UTF8 = "application/json; charset=utf-8";
- private static final String CONTENT_TYPE_VPACK = "application/x-velocypack";
private static final String USER_AGENT = getUserAgent();
private static final AtomicInteger THREAD_COUNT = new AtomicInteger();
private volatile String auth;
@@ -96,16 +91,8 @@ private static String getUserAgent() {
HttpConnection(final ArangoConfig config, final HttpProtocolConfig protocolConfig, final HostDescription host, final ConnectionPool pool) {
this.pool = pool;
Protocol protocol = config.getProtocol();
- ContentType contentType = ContentTypeFactory.of(protocol);
- if (contentType == ContentType.VPACK) {
- commonHeaders.add(HttpHeaders.ACCEPT.toString(), CONTENT_TYPE_VPACK);
- commonHeaders.add(HttpHeaders.CONTENT_TYPE.toString(), CONTENT_TYPE_VPACK);
- } else if (contentType == ContentType.JSON) {
- commonHeaders.add(HttpHeaders.ACCEPT.toString(), CONTENT_TYPE_APPLICATION_JSON_UTF8);
- commonHeaders.add(HttpHeaders.CONTENT_TYPE.toString(), CONTENT_TYPE_APPLICATION_JSON_UTF8);
- } else {
- throw new IllegalArgumentException("Unsupported protocol: " + protocol);
- }
+ commonHeaders.add(HttpHeaders.ACCEPT.toString(), CONTENT_TYPE_APPLICATION_JSON_UTF8);
+ commonHeaders.add(HttpHeaders.CONTENT_TYPE.toString(), CONTENT_TYPE_APPLICATION_JSON_UTF8);
compressionThreshold = config.getCompressionThreshold();
Compression compression = config.getCompression();
encoder = Encoder.of(compression, config.getCompressionLevel());
@@ -137,12 +124,10 @@ private static String getUserAgent() {
.map(ttl -> Math.toIntExact(ttl / 1000))
.orElse(0);
- HttpVersion httpVersion = protocol == Protocol.HTTP_JSON || protocol == Protocol.HTTP_VPACK ?
+ HttpVersion httpVersion = protocol == Protocol.HTTP_1_1 ?
HttpVersion.HTTP_1_1 : HttpVersion.HTTP_2;
WebClientOptions webClientOptions = new WebClientOptions()
- .setMaxPoolSize(1)
- .setHttp2MaxPoolSize(1)
.setConnectTimeout(timeout)
.setIdleTimeoutUnit(TimeUnit.MILLISECONDS)
.setIdleTimeout(timeout)
@@ -167,7 +152,7 @@ private static String getUserAgent() {
.setInitialSettings(new Http2Settings().setInitialWindowSize(config.getInitialWindowSize()));
if (compression != Compression.NONE) {
- webClientOptions.setTryUseCompression(true);
+ webClientOptions.setDecompressionSupported(true);
}
if (Boolean.TRUE.equals(config.getUseSsl())) {
@@ -177,7 +162,7 @@ private static String getUserAgent() {
.setUseAlpn(true)
.setAlpnVersions(Collections.singletonList(httpVersion))
.setVerifyHost(config.getVerifyHost())
- .setJdkSslEngineOptions(new JdkSSLEngineOptions() {
+ .setSslEngineOptions(new JdkSSLEngineOptions() {
@Override
public JdkSSLEngineOptions copy() {
return this;
@@ -204,7 +189,10 @@ public SslContextFactory sslContextFactory() {
});
}
- client = WebClient.create(vertx, webClientOptions);
+ PoolOptions poolOptions = new PoolOptions()
+ .setHttp1MaxSize(1)
+ .setHttp2MaxSize(1);
+ client = WebClient.create(vertx, webClientOptions, poolOptions);
}
private static String buildUrl(final InternalRequest request) {
diff --git a/http-protocol/src/main/java/com/arangodb/http/HttpProtocolProvider.java b/http-protocol/src/main/java/com/arangodb/http/HttpProtocolProvider.java
index a85abe9d8..7783b1d52 100644
--- a/http-protocol/src/main/java/com/arangodb/http/HttpProtocolProvider.java
+++ b/http-protocol/src/main/java/com/arangodb/http/HttpProtocolProvider.java
@@ -15,10 +15,8 @@ public class HttpProtocolProvider implements ProtocolProvider {
@Override
public boolean supportsProtocol(Protocol protocol) {
- return Protocol.HTTP_VPACK.equals(protocol) ||
- Protocol.HTTP_JSON.equals(protocol) ||
- Protocol.HTTP2_VPACK.equals(protocol) ||
- Protocol.HTTP2_JSON.equals(protocol);
+ return Protocol.HTTP_1_1.equals(protocol) ||
+ Protocol.HTTP_2.equals(protocol);
}
@Override
diff --git a/http-protocol/src/main/java/com/arangodb/http/compression/ZlibEncoder.java b/http-protocol/src/main/java/com/arangodb/http/compression/ZlibEncoder.java
index f8ad91014..ab9beb571 100644
--- a/http-protocol/src/main/java/com/arangodb/http/compression/ZlibEncoder.java
+++ b/http-protocol/src/main/java/com/arangodb/http/compression/ZlibEncoder.java
@@ -19,7 +19,9 @@ class ZlibEncoder implements Encoder {
public Buffer encode(byte[] data) {
JdkZlibEncoder encoder = new JdkZlibEncoder(wrapper, level);
ByteBuf bb = encoder.encode(data);
- Buffer out = Buffer.buffer(bb);
+ byte[] bytes = new byte[bb.readableBytes()];
+ bb.readBytes(bytes);
+ Buffer out = Buffer.buffer(bytes);
encoder.close();
return out;
}
diff --git a/http-protocol/src/main/resources/META-INF/native-image/com.arangodb/http-protocol/native-image.properties b/http-protocol/src/main/resources/META-INF/native-image/com.arangodb/http-protocol/native-image.properties
index 6323e7ae3..d16e67f3f 100644
--- a/http-protocol/src/main/resources/META-INF/native-image/com.arangodb/http-protocol/native-image.properties
+++ b/http-protocol/src/main/resources/META-INF/native-image/com.arangodb/http-protocol/native-image.properties
@@ -1,3 +1,3 @@
Args=\
--H:ResourceConfigurationResources=${.}/resource-config-spi.json \
--H:ReflectionConfigurationResources=${.}/reflect-config-spi.json,${.}/reflect-config-serde.json
+-H:ResourceConfigurationResources=${.}/resource-config.json,${.}/resource-config-spi.json \
+-H:ReflectionConfigurationResources=${.}/reflect-config-spi.json
diff --git a/http-protocol/src/main/resources/META-INF/native-image/com.arangodb/http-protocol/reflect-config-serde.json b/http-protocol/src/main/resources/META-INF/native-image/com.arangodb/http-protocol/reflect-config-serde.json
deleted file mode 100644
index c50a5e113..000000000
--- a/http-protocol/src/main/resources/META-INF/native-image/com.arangodb/http-protocol/reflect-config-serde.json
+++ /dev/null
@@ -1,146 +0,0 @@
-[
- {
- "name": "com.arangodb.internal.serde.JacksonUtils$JsonFactory",
- "queryAllDeclaredMethods": true
- },
- {
- "name": "com.arangodb.internal.serde.JacksonUtils$StreamReadConstraints",
- "queryAllDeclaredMethods": true
- },
- {
- "name": "com.arangodb.internal.serde.JacksonUtils$StreamReadConstraints$Builder",
- "queryAllDeclaredMethods": true
- },
- {
- "name": "com.arangodb.internal.serde.JacksonUtils$StreamReadConstraints$Static",
- "queryAllDeclaredMethods": true
- },
- {
- "name": "com.arangodb.internal.serde.JacksonUtils$StreamWriteConstraints",
- "queryAllDeclaredMethods": true
- },
- {
- "name": "com.arangodb.internal.serde.JacksonUtils$StreamWriteConstraints$Builder",
- "queryAllDeclaredMethods": true
- },
- {
- "name": "com.arangodb.internal.serde.JacksonUtils$StreamWriteConstraints$Static",
- "queryAllDeclaredMethods": true
- },
- {
- "name": "com.arangodb.internal.serde.JacksonUtils$Version",
- "queryAllDeclaredMethods": true
- },
- {
- "name": "com.fasterxml.jackson.core.JsonFactory",
- "queryAllPublicMethods": true,
- "methods": [
- {
- "name": "setStreamReadConstraints",
- "parameterTypes": [
- "com.fasterxml.jackson.core.StreamReadConstraints"
- ]
- },
- {
- "name": "setStreamWriteConstraints",
- "parameterTypes": [
- "com.fasterxml.jackson.core.StreamWriteConstraints"
- ]
- },
- {
- "name": "version",
- "parameterTypes": []
- }
- ]
- },
- {
- "name": "com.fasterxml.jackson.core.StreamReadConstraints",
- "queryAllPublicMethods": true,
- "methods": [
- {
- "name": "builder",
- "parameterTypes": []
- }
- ]
- },
- {
- "name": "com.fasterxml.jackson.core.StreamReadConstraints$Builder",
- "queryAllPublicMethods": true,
- "methods": [
- {
- "name": "build",
- "parameterTypes": []
- },
- {
- "name": "maxDocumentLength",
- "parameterTypes": [
- "long"
- ]
- },
- {
- "name": "maxNameLength",
- "parameterTypes": [
- "int"
- ]
- },
- {
- "name": "maxNestingDepth",
- "parameterTypes": [
- "int"
- ]
- },
- {
- "name": "maxNumberLength",
- "parameterTypes": [
- "int"
- ]
- },
- {
- "name": "maxStringLength",
- "parameterTypes": [
- "int"
- ]
- }
- ]
- },
- {
- "name": "com.fasterxml.jackson.core.StreamWriteConstraints",
- "queryAllPublicMethods": true,
- "methods": [
- {
- "name": "builder",
- "parameterTypes": []
- }
- ]
- },
- {
- "name": "com.fasterxml.jackson.core.StreamWriteConstraints$Builder",
- "queryAllPublicMethods": true,
- "methods": [
- {
- "name": "build",
- "parameterTypes": []
- },
- {
- "name": "maxNestingDepth",
- "parameterTypes": [
- "int"
- ]
- }
- ]
- },
- {
- "name": "com.fasterxml.jackson.core.Version",
- "queryAllPublicMethods": true,
- "methods": [
- {
- "name": "getMajorVersion",
- "parameterTypes": []
- },
- {
- "name": "getMinorVersion",
- "parameterTypes": []
- }
- ]
- }
-]
\ No newline at end of file
diff --git a/driver/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/resource-config.json b/http-protocol/src/main/resources/META-INF/native-image/com.arangodb/http-protocol/resource-config.json
similarity index 100%
rename from driver/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/resource-config.json
rename to http-protocol/src/main/resources/META-INF/native-image/com.arangodb/http-protocol/resource-config.json
diff --git a/jackson-serde-json/pom.xml b/jackson-serde-json/pom.xml
index 8bc75edc0..9ff2d6e9d 100644
--- a/jackson-serde-json/pom.xml
+++ b/jackson-serde-json/pom.xml
@@ -7,7 +7,7 @@
com.arangodb
arangodb-java-driver-parent
- 7.25.0
+ 8.0.0-SNAPSHOT
jackson-serde-json
diff --git a/jackson-serde-json/src/main/java/com/arangodb/serde/jackson/JacksonMapperProvider.java b/jackson-serde-json/src/main/java/com/arangodb/serde/jackson/JacksonMapperProvider.java
index 39c6065a0..2008cba72 100644
--- a/jackson-serde-json/src/main/java/com/arangodb/serde/jackson/JacksonMapperProvider.java
+++ b/jackson-serde-json/src/main/java/com/arangodb/serde/jackson/JacksonMapperProvider.java
@@ -1,7 +1,6 @@
package com.arangodb.serde.jackson;
import com.arangodb.ArangoDBException;
-import com.arangodb.ContentType;
import com.arangodb.internal.serde.JacksonUtils;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -18,16 +17,7 @@
public class JacksonMapperProvider {
private static final Logger LOG = LoggerFactory.getLogger(JacksonMapperProvider.class);
- public static ObjectMapper of(final ContentType contentType) {
- String formatName;
- if (contentType == ContentType.JSON) {
- formatName = "JSON";
- } else if (contentType == ContentType.VPACK) {
- formatName = "Velocypack";
- } else {
- throw new IllegalArgumentException("Unexpected value: " + contentType);
- }
-
+ public static ObjectMapper load() {
ServiceLoader sl = ServiceLoader.load(JsonFactory.class);
Iterator iterator = sl.iterator();
while (iterator.hasNext()) {
@@ -38,15 +28,13 @@ public static ObjectMapper of(final ContentType contentType) {
LOG.warn("ServiceLoader failed to load JsonFactory", e);
continue;
}
- if (formatName.equals(jf.getFormatName())) {
- if (contentType == ContentType.JSON) {
- JacksonUtils.tryConfigureJsonFactory(jf);
- }
+ if ("JSON".equals(jf.getFormatName())) {
+ JacksonUtils.tryConfigureJsonFactory(jf);
return new ObjectMapper(jf);
}
- LOG.debug("Required format ({}) not supported by JsonFactory: {}", formatName, jf.getClass().getName());
+ LOG.debug("JSON not supported by JsonFactory: {}", jf.getClass().getName());
}
- throw new ArangoDBException("No JsonFactory found for content type: " + contentType);
+ throw new ArangoDBException("No JsonFactory found for content type JSON");
}
}
diff --git a/jackson-serde-json/src/main/java/com/arangodb/serde/jackson/JacksonSerde.java b/jackson-serde-json/src/main/java/com/arangodb/serde/jackson/JacksonSerde.java
index 8a749121e..8059960b5 100644
--- a/jackson-serde-json/src/main/java/com/arangodb/serde/jackson/JacksonSerde.java
+++ b/jackson-serde-json/src/main/java/com/arangodb/serde/jackson/JacksonSerde.java
@@ -1,6 +1,5 @@
package com.arangodb.serde.jackson;
-import com.arangodb.ContentType;
import com.arangodb.serde.ArangoSerde;
import com.arangodb.RequestContext;
import com.arangodb.serde.jackson.internal.JacksonSerdeImpl;
@@ -17,13 +16,12 @@
public interface JacksonSerde extends ArangoSerde {
/**
- * Creates a new JacksonSerde with default settings for the specified data type.
+ * Creates a new JacksonSerde with default settings.
*
- * @param contentType serialization target data type
* @return the created JacksonSerde
*/
- static JacksonSerde of(final ContentType contentType) {
- return create(JacksonMapperProvider.of(contentType));
+ static JacksonSerde load() {
+ return create(JacksonMapperProvider.load());
}
/**
diff --git a/jackson-serde-json/src/main/java/com/arangodb/serde/jackson/json/JacksonJsonSerdeProvider.java b/jackson-serde-json/src/main/java/com/arangodb/serde/jackson/json/JacksonJsonSerdeProvider.java
index 90dfdf5c1..7a3ba8967 100644
--- a/jackson-serde-json/src/main/java/com/arangodb/serde/jackson/json/JacksonJsonSerdeProvider.java
+++ b/jackson-serde-json/src/main/java/com/arangodb/serde/jackson/json/JacksonJsonSerdeProvider.java
@@ -1,6 +1,5 @@
package com.arangodb.serde.jackson.json;
-import com.arangodb.ContentType;
import com.arangodb.serde.ArangoSerde;
import com.arangodb.serde.ArangoSerdeProvider;
import com.arangodb.serde.jackson.JacksonSerde;
@@ -8,11 +7,6 @@
public class JacksonJsonSerdeProvider implements ArangoSerdeProvider {
@Override
public ArangoSerde create() {
- return JacksonSerde.of(ContentType.JSON);
- }
-
- @Override
- public ContentType getContentType() {
- return ContentType.JSON;
+ return JacksonSerde.load();
}
}
diff --git a/jackson-serde-vpack/pom.xml b/jackson-serde-vpack/pom.xml
deleted file mode 100644
index 2d16a99c2..000000000
--- a/jackson-serde-vpack/pom.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
- 4.0.0
-
-
- com.arangodb
- arangodb-java-driver-parent
- 7.25.0
-
-
- jackson-serde-vpack
- jackson-serde-vpack
- Jackson Serde VPACK module for ArangoDB Java Driver
-
-
- com.arangodb.serde.jackson.vpack
-
-
-
-
- com.arangodb
- core
- provided
-
-
- com.arangodb
- jackson-serde-json
- compile
-
-
- com.arangodb
- jackson-dataformat-velocypack
- compile
-
-
- com.arangodb
- velocypack
- compile
-
-
-
-
diff --git a/jackson-serde-vpack/src/main/java/com/arangodb/serde/jackson/vpack/JacksonVPackSerdeProvider.java b/jackson-serde-vpack/src/main/java/com/arangodb/serde/jackson/vpack/JacksonVPackSerdeProvider.java
deleted file mode 100644
index 6e52ec179..000000000
--- a/jackson-serde-vpack/src/main/java/com/arangodb/serde/jackson/vpack/JacksonVPackSerdeProvider.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.arangodb.serde.jackson.vpack;
-
-import com.arangodb.ContentType;
-import com.arangodb.serde.ArangoSerde;
-import com.arangodb.serde.ArangoSerdeProvider;
-import com.arangodb.serde.jackson.JacksonSerde;
-
-public class JacksonVPackSerdeProvider implements ArangoSerdeProvider {
- @Override
- public ArangoSerde create() {
- return JacksonSerde.of(ContentType.VPACK);
- }
-
- @Override
- public ContentType getContentType() {
- return ContentType.VPACK;
- }
-}
diff --git a/jackson-serde-vpack/src/main/resources/META-INF/services/com.arangodb.serde.ArangoSerdeProvider b/jackson-serde-vpack/src/main/resources/META-INF/services/com.arangodb.serde.ArangoSerdeProvider
deleted file mode 100644
index 977adc7a9..000000000
--- a/jackson-serde-vpack/src/main/resources/META-INF/services/com.arangodb.serde.ArangoSerdeProvider
+++ /dev/null
@@ -1 +0,0 @@
-com.arangodb.serde.jackson.vpack.JacksonVPackSerdeProvider
diff --git a/jackson3-serde-json/pom.xml b/jackson3-serde-json/pom.xml
index 00220a531..235377f66 100644
--- a/jackson3-serde-json/pom.xml
+++ b/jackson3-serde-json/pom.xml
@@ -7,7 +7,7 @@
com.arangodb
arangodb-java-driver-parent
- 7.25.0
+ 8.0.0-SNAPSHOT
jackson3-serde-json
diff --git a/jackson3-serde-json/src/main/java/com/arangodb/serde/jackson3/json/JacksonJsonSerdeProvider.java b/jackson3-serde-json/src/main/java/com/arangodb/serde/jackson3/json/JacksonJsonSerdeProvider.java
index b4d2ea169..ab1b33014 100644
--- a/jackson3-serde-json/src/main/java/com/arangodb/serde/jackson3/json/JacksonJsonSerdeProvider.java
+++ b/jackson3-serde-json/src/main/java/com/arangodb/serde/jackson3/json/JacksonJsonSerdeProvider.java
@@ -1,6 +1,5 @@
package com.arangodb.serde.jackson3.json;
-import com.arangodb.ContentType;
import com.arangodb.serde.ArangoSerde;
import com.arangodb.serde.ArangoSerdeProvider;
import com.arangodb.serde.jackson3.JacksonSerde;
@@ -12,8 +11,4 @@ public ArangoSerde create() {
return JacksonSerde.create(new JsonMapper());
}
- @Override
- public ContentType getContentType() {
- return ContentType.JSON;
- }
}
diff --git a/jsonb-serde/pom.xml b/jsonb-serde/pom.xml
index 416ca58f9..77313fe35 100644
--- a/jsonb-serde/pom.xml
+++ b/jsonb-serde/pom.xml
@@ -7,7 +7,7 @@
com.arangodb
arangodb-java-driver-parent
- 7.25.0
+ 8.0.0-SNAPSHOT
jsonb-serde
diff --git a/jsonb-serde/src/main/java/com/arangodb/serde/jsonb/JsonbSerdeProvider.java b/jsonb-serde/src/main/java/com/arangodb/serde/jsonb/JsonbSerdeProvider.java
index 152d8f3fd..27838a50a 100644
--- a/jsonb-serde/src/main/java/com/arangodb/serde/jsonb/JsonbSerdeProvider.java
+++ b/jsonb-serde/src/main/java/com/arangodb/serde/jsonb/JsonbSerdeProvider.java
@@ -1,6 +1,5 @@
package com.arangodb.serde.jsonb;
-import com.arangodb.ContentType;
import com.arangodb.serde.ArangoSerdeProvider;
import jakarta.json.bind.JsonbConfig;
@@ -26,9 +25,4 @@ static JsonbSerde create(final JsonbConfig config) {
return new JsonbSerde(config);
}
- @Override
- public ContentType getContentType() {
- return ContentType.JSON;
- }
-
}
diff --git a/pom.xml b/pom.xml
index d3c6fba98..604b0bdc5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
com.arangodb
arangodb-java-driver-parent
- 7.25.0
+ 8.0.0-SNAPSHOT
2016
core
@@ -13,10 +13,8 @@
shaded
jackson-serde-json
jackson3-serde-json
- jackson-serde-vpack
jsonb-serde
http-protocol
- vst-protocol
pom
@@ -252,13 +250,6 @@
import
pom
-
- io.vertx
- vertx-stack-depchain
- 4.5.21
- pom
- import
-
com.google.code.findbugs
jsr305
@@ -289,11 +280,6 @@
http-protocol
${project.version}
-
- com.arangodb
- vst-protocol
- ${project.version}
-
com.arangodb
jackson-serde-json
@@ -304,21 +290,6 @@
jackson3-serde-json
${project.version}
-
- com.arangodb
- jackson-serde-vpack
- ${project.version}
-
-
- com.arangodb
- jackson-dataformat-velocypack
- 4.6.2
-
-
- com.arangodb
- velocypack
- 3.1.0
-
com.arangodb
jsonb-serde
@@ -356,13 +327,7 @@
compile
- 1.8
-
- jakarta.json:jakarta.json-api
- jakarta.json.bind:jakarta.json.bind-api
- tools.jackson.core:jackson-core
- tools.jackson.core:jackson-databind
-
+ 21
@@ -397,33 +362,6 @@
-
- io.vertx
-
-
- regex
- 5..*
-
-
-
-
- io.netty
-
-
- regex
- .*
-
-
-
-
- org.junit.jupiter
-
-
- regex
- 6..*
-
-
-
diff --git a/shaded/pom.xml b/shaded/pom.xml
index 0a3f6cee5..fb9a1ca97 100644
--- a/shaded/pom.xml
+++ b/shaded/pom.xml
@@ -7,7 +7,7 @@
com.arangodb
arangodb-java-driver-parent
- 7.25.0
+ 8.0.0-SNAPSHOT
arangodb-java-driver-shaded
@@ -30,16 +30,6 @@
http-protocol
compile
-
- com.arangodb
- vst-protocol
- compile
-
-
- com.arangodb
- jackson-dataformat-velocypack
- compile
-
org.slf4j
slf4j-api
@@ -93,10 +83,6 @@
com.fasterxml.jackson
com.arangodb.shaded.fasterxml.jackson
-
- com.arangodb.jackson.dataformat.velocypack
- com.arangodb.shaded.jackson.dataformat.velocypack
-
io.netty
com.arangodb.shaded.netty
@@ -113,14 +99,6 @@
META-INF/**
-
- com.arangodb:vst-protocol
-
- META-INF/MANIFEST.MF
- META-INF/services/**
- META-INF/maven/**
-
-
com.arangodb:http-protocol
@@ -129,18 +107,6 @@
META-INF/maven/**
-
- com.arangodb:velocypack
-
- META-INF/**
-
-
-
- com.arangodb:jackson-dataformat-velocypack
-
- META-INF/**
-
-
com.fasterxml.jackson.core:*
diff --git a/shaded/src/main/java/graal/BrotliSubstitutions.java b/shaded/src/main/java/graal/BrotliSubstitutions.java
index 6f067fc6d..ccd245cf4 100644
--- a/shaded/src/main/java/graal/BrotliSubstitutions.java
+++ b/shaded/src/main/java/graal/BrotliSubstitutions.java
@@ -3,20 +3,18 @@
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
+public class BrotliSubstitutions {
-@TargetClass(className = "io.netty.handler.codec.compression.Brotli")
-final class Target_io_netty_handler_codec_compression_Brotli {
- @Substitute
- public static boolean isAvailable() {
- return false;
- }
+ @TargetClass(className = "io.netty.handler.codec.compression.Brotli")
+ static final class Target_io_netty_handler_codec_compression_Brotli {
+ @Substitute
+ public static boolean isAvailable() {
+ return false;
+ }
- @Substitute
- public static void ensureAvailability() throws Throwable {
- throw new UnsupportedOperationException();
+ @Substitute
+ public static void ensureAvailability() throws Throwable {
+ throw new UnsupportedOperationException();
+ }
}
}
-
-public class BrotliSubstitutions {
-
-}
diff --git a/shaded/src/main/java/graal/netty/graal/HttpContentCompressorSubstitutions.java b/shaded/src/main/java/graal/netty/graal/HttpContentCompressorSubstitutions.java
index 92251b77b..3ff99c61a 100644
--- a/shaded/src/main/java/graal/netty/graal/HttpContentCompressorSubstitutions.java
+++ b/shaded/src/main/java/graal/netty/graal/HttpContentCompressorSubstitutions.java
@@ -1,17 +1,22 @@
package graal.netty.graal;
-import java.util.function.BooleanSupplier;
-
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
-
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
public class HttpContentCompressorSubstitutions {
- @TargetClass(className = "io.netty.handler.codec.compression.ZstdEncoder", onlyWith = IsZstdAbsent.class)
- public static final class ZstdEncoderFactorySubstitution {
+ @TargetClass(className = "io.netty.handler.codec.compression.Zstd")
+ public static final class Target_io_netty_handler_codec_compression_Zstd {
+ @Substitute
+ public static boolean isAvailable() {
+ return false;
+ }
+ }
+
+ @TargetClass(className = "io.netty.handler.codec.compression.ZstdEncoder")
+ public static final class Target_io_netty_handler_codec_compression_ZstdEncoder {
@Substitute
protected ByteBuf allocateBuffer(ChannelHandlerContext ctx, ByteBuf msg, boolean preferDirect) throws Exception {
@@ -30,8 +35,8 @@ public void flush(final ChannelHandlerContext ctx) {
}
@Substitute
- @TargetClass(className = "io.netty.handler.codec.compression.ZstdConstants", onlyWith = IsZstdAbsent.class)
- public static final class ZstdConstants {
+ @TargetClass(className = "io.netty.handler.codec.compression.ZstdConstants")
+ public static final class Target_io_netty_handler_codec_compression_ZstdConstants {
// The constants make calls to com.github.luben.zstd.Zstd so we cut links with that substitution.
@@ -41,29 +46,9 @@ public static final class ZstdConstants {
static final int MAX_COMPRESSION_LEVEL = 0;
- static final int MAX_BLOCK_SIZE = 0;
+ static final int DEFAULT_MAX_ENCODE_SIZE = 0;
static final int DEFAULT_BLOCK_SIZE = 0;
}
- public static class IsZstdAbsent implements BooleanSupplier {
-
- private boolean zstdAbsent;
-
- public IsZstdAbsent() {
- try {
- Class.forName("com.github.luben.zstd.Zstd");
- zstdAbsent = false;
- } catch (Exception e) {
- // It can be a classloading issue (the library is not available), or a native issue
- // (the library for the current OS/arch is not available)
- zstdAbsent = true;
- }
- }
-
- @Override
- public boolean getAsBoolean() {
- return zstdAbsent;
- }
- }
}
diff --git a/shaded/src/main/java/graal/netty/graal/NettySubstitutions.java b/shaded/src/main/java/graal/netty/graal/NettySubstitutions.java
index d910cf1e7..a28eb3921 100644
--- a/shaded/src/main/java/graal/netty/graal/NettySubstitutions.java
+++ b/shaded/src/main/java/graal/netty/graal/NettySubstitutions.java
@@ -28,6 +28,7 @@
import javax.crypto.NoSuchPaddingException;
import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SNIServerName;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLException;
import javax.net.ssl.TrustManagerFactory;
@@ -47,6 +48,7 @@
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.DefaultChannelPromise;
+import io.netty.channel.EventLoopTaskQueueFactory;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.codec.compression.Brotli;
import io.netty.handler.codec.compression.BrotliDecoder;
@@ -141,7 +143,7 @@ final class Target_io_netty_handler_ssl_OpenSsl {
@Alias
@RecomputeFieldValue(kind = Kind.FromAlias)
- static Set SUPPORTED_PROTOCOLS_SET = Collections.emptySet();
+ static Set CLIENT_DEFAULT_PROTOCOLS = Collections.emptySet();
@Substitute
public static boolean isAvailable() {
@@ -164,20 +166,6 @@ public static boolean isCipherSuiteAvailable(String cipherSuite) {
}
}
-@TargetClass(className = "io.netty.handler.ssl.JdkSslServerContext")
-final class Target_io_netty_handler_ssl_JdkSslServerContext {
- @Alias
- Target_io_netty_handler_ssl_JdkSslServerContext(Provider provider,
- X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory,
- X509Certificate[] keyCertChain, PrivateKey key, String keyPassword,
- KeyManagerFactory keyManagerFactory, Iterable ciphers, CipherSuiteFilter cipherFilter,
- ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout,
- ClientAuth clientAuth, String[] protocols, boolean startTls,
- SecureRandom secureRandom, String keyStore, Target_io_netty_handler_ssl_ResumptionController resumptionController)
- throws SSLException {
- }
-}
-
@TargetClass(className = "io.netty.handler.ssl.JdkSslClientContext")
final class Target_io_netty_handler_ssl_JdkSslClientContext {
@@ -188,7 +176,7 @@ final class Target_io_netty_handler_ssl_JdkSslClientContext {
KeyManagerFactory keyManagerFactory, Iterable ciphers, CipherSuiteFilter cipherFilter,
ApplicationProtocolConfig apn, String[] protocols, long sessionCacheSize, long sessionTimeout,
SecureRandom secureRandom, String keyStoreType, String endpointIdentificationAlgorithm,
- Target_io_netty_handler_ssl_ResumptionController resumptionController) throws SSLException {
+ List serverNames, Target_io_netty_handler_ssl_ResumptionController resumptionController) throws SSLException {
}
}
@@ -237,22 +225,16 @@ final class Target_io_netty_handler_ssl_ResumptionController {
final class Target_io_netty_handler_ssl_SslContext {
@Substitute
- static SslContext newServerContextInternal(SslProvider provider,
- Provider sslContextProvider,
- X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory,
- X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, KeyManagerFactory keyManagerFactory,
- Iterable ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn,
- long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth, String[] protocols, boolean startTls,
- boolean enableOcsp, SecureRandom secureRandom, String keyStoreType,
- Map.Entry, Object>... ctxOptions) throws SSLException {
- if (enableOcsp) {
- throw new IllegalArgumentException("OCSP is not supported with this SslProvider: " + provider);
- }
- Target_io_netty_handler_ssl_ResumptionController resumptionController = new Target_io_netty_handler_ssl_ResumptionController();
- return (SslContext) (Object) new Target_io_netty_handler_ssl_JdkSslServerContext(sslContextProvider,
- trustCertCollection, trustManagerFactory, keyCertChain, key, keyPassword,
- keyManagerFactory, ciphers, cipherFilter, apn, sessionCacheSize, sessionTimeout,
- clientAuth, protocols, startTls, secureRandom, keyStoreType, resumptionController);
+ static SslContext newServerContextInternal(SslProvider provider, Provider sslContextProvider,
+ X509Certificate[] trustCert, TrustManagerFactory trustManagerFactory,
+ X509Certificate[] keyCertChain, PrivateKey key, String keyPassword,
+ KeyManagerFactory keyManagerFactory, Iterable ciphers,
+ CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn,
+ long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth,
+ String[] protocols, boolean startTls, boolean enableOcsp,
+ SecureRandom secureRandom, String keyStoreType,
+ Map.Entry, Object>... options) throws SSLException {
+ throw new SSLException("not supported");
}
@Substitute
@@ -263,6 +245,7 @@ static SslContext newClientContextInternal(SslProvider provider,
Iterable ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, String[] protocols,
long sessionCacheSize, long sessionTimeout, boolean enableOcsp,
SecureRandom secureRandom, String keyStoreType, String endpointIdentificationAlgorithm,
+ List serverNames,
Map.Entry, Object>... options) throws SSLException {
if (enableOcsp) {
throw new IllegalArgumentException("OCSP is not supported with this SslProvider: " + provider);
@@ -272,7 +255,7 @@ static SslContext newClientContextInternal(SslProvider provider,
trustCert, trustManagerFactory, keyCertChain, key, keyPassword,
keyManagerFactory, ciphers, cipherFilter, apn, protocols, sessionCacheSize,
sessionTimeout, secureRandom, keyStoreType, endpointIdentificationAlgorithm,
- resumptionController);
+ serverNames, resumptionController);
}
}
@@ -402,7 +385,7 @@ final ChannelFuture initAndRegister() {
final class Target_io_netty_channel_nio_NioEventLoop {
@Substitute
- private static Queue newTaskQueue0(int maxPendingTasks) {
+ private static Queue newTaskQueue(EventLoopTaskQueueFactory queueFactory) {
return new LinkedBlockingDeque<>();
}
}
@@ -456,11 +439,11 @@ static Class> tryToLoadClass(final ClassLoader loader, final Class> helper)
final class Target_io_netty_buffer_EmptyByteBuf {
@Alias
- @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Reset)
+ @RecomputeFieldValue(kind = Kind.Reset)
private static ByteBuffer EMPTY_BYTE_BUFFER;
@Alias
- @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Reset)
+ @RecomputeFieldValue(kind = Kind.Reset)
private static long EMPTY_BYTE_BUFFER_ADDRESS;
@Substitute
@@ -470,7 +453,7 @@ public ByteBuffer nioBuffer() {
@Substitute
public ByteBuffer[] nioBuffers() {
- return new ByteBuffer[] { EmptyByteBufStub.emptyByteBuffer() };
+ return new ByteBuffer[]{EmptyByteBufStub.emptyByteBuffer()};
}
@Substitute
@@ -622,10 +605,19 @@ private static PrivateKey getPrivateKeyFromByteBuffer(ByteBuf encodedKeyBuf, Str
final class Target_io_netty_util_internal_shaded_org_jctools_util_UnsafeRefArrayAccess {
@Alias
- @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.ArrayIndexShift, declClass = Object[].class)
+ @RecomputeFieldValue(kind = Kind.ArrayIndexShift, declClass = Object[].class)
public static int LONG_ELEMENT_SHIFT;
}
+@TargetClass(className = "io.netty.util.internal.CleanerJava25$CleanableDirectBufferImpl")
+final class Target_io_netty_util_internal_CleanerJava25_CleanableDirectBufferImpl {
+ @Substitute
+ public void clean() {
+ // No-op: bypasses Arena.ofShared().close() which is unsupported
+ // in GraalVM native image without -H:+SharedArenaSupport
+ }
+}
+
class IsBouncyNotThere implements BooleanSupplier {
@Override
diff --git a/shaded/src/main/java/graal/vertx/graal/VertxSubstitutions.java b/shaded/src/main/java/graal/vertx/graal/VertxSubstitutions.java
index d8ca211b6..6390b18ab 100644
--- a/shaded/src/main/java/graal/vertx/graal/VertxSubstitutions.java
+++ b/shaded/src/main/java/graal/vertx/graal/VertxSubstitutions.java
@@ -4,22 +4,13 @@
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
import io.netty.handler.ssl.*;
-import io.vertx.core.MultiMap;
-import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import io.vertx.core.dns.AddressResolverOptions;
-import io.vertx.core.eventbus.EventBusOptions;
-import io.vertx.core.eventbus.impl.HandlerHolder;
-import io.vertx.core.eventbus.impl.HandlerRegistration;
-import io.vertx.core.eventbus.impl.MessageImpl;
-import io.vertx.core.eventbus.impl.OutboundDeliveryContext;
-import io.vertx.core.impl.ContextInternal;
-import io.vertx.core.impl.VertxInternal;
-import io.vertx.core.impl.resolver.DefaultResolverProvider;
-import io.vertx.core.impl.transports.JDKTransport;
+import io.vertx.core.dns.impl.DefaultAddressResolverProvider;
import io.vertx.core.net.NetServerOptions;
-import io.vertx.core.spi.resolver.ResolverProvider;
-import io.vertx.core.spi.transport.Transport;
+import io.vertx.core.net.impl.NetServerImpl;
+import io.vertx.core.spi.dns.AddressResolverProvider;
+import io.vertx.core.transport.Transport;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLException;
@@ -27,27 +18,7 @@
import java.util.Collection;
import java.util.List;
import java.util.Set;
-import java.util.concurrent.ConcurrentMap;
-@TargetClass(className = "io.vertx.core.impl.VertxBuilder")
-final class Target_io_vertx_core_impl_VertxBuilder {
- @Substitute
- public static Transport nativeTransport() {
- return JDKTransport.INSTANCE;
- }
-}
-
-/**
- * This substitution forces the usage of the blocking DNS resolver
- */
-@TargetClass(className = "io.vertx.core.spi.resolver.ResolverProvider")
-final class TargetResolverProvider {
-
- @Substitute
- public static ResolverProvider factory(Vertx vertx, AddressResolverOptions options) {
- return new DefaultResolverProvider();
- }
-}
@TargetClass(className = "io.vertx.core.net.OpenSSLEngineOptions")
final class Target_io_vertx_core_net_OpenSSLEngineOptions {
@@ -63,80 +34,42 @@ public static boolean isAlpnAvailable() {
}
}
-@SuppressWarnings("rawtypes")
-@TargetClass(className = "io.vertx.core.eventbus.impl.clustered.ClusteredEventBus")
-final class Target_io_vertx_core_eventbus_impl_clustered_ClusteredEventBusClusteredEventBus {
-
- @Substitute
- private NetServerOptions getServerOptions() {
- throw new RuntimeException("Not Implemented");
- }
-
- @Substitute
- public void start(Promise promise) {
- throw new RuntimeException("Not Implemented");
- }
-
- @Substitute
- public void close(Promise promise) {
- throw new RuntimeException("Not Implemented");
- }
-
- @Substitute
- public MessageImpl createMessage(boolean send, boolean isLocal, String address, MultiMap headers, Object body,
- String codecName) {
- throw new RuntimeException("Not Implemented");
- }
-
+@TargetClass(className = "io.vertx.core.transport.Transport")
+final class Target_io_vertx_core_transport_Transport {
@Substitute
- protected void onLocalRegistration(HandlerHolder handlerHolder, Promise promise) {
- throw new RuntimeException("Not Implemented");
- }
-
- @Substitute
- protected HandlerHolder createHandlerHolder(HandlerRegistration registration, boolean replyHandler,
- boolean localOnly, ContextInternal context) {
- throw new RuntimeException("Not Implemented");
- }
-
- @Substitute
- protected void onLocalUnregistration(HandlerHolder handlerHolder, Promise completionHandler) {
- throw new RuntimeException("Not Implemented");
- }
-
- @Substitute
- protected void sendOrPub(OutboundDeliveryContext sendContext) {
- throw new RuntimeException("Not Implemented");
- }
-
- @Substitute
- protected String generateReplyAddress() {
- throw new RuntimeException("Not Implemented");
+ public static Transport nativeTransport() {
+ return Transport.NIO;
}
+}
+@TargetClass(className = "io.vertx.core.spi.dns.AddressResolverProvider")
+interface Target_io_vertx_core_spi_dns_AddressResolverProvider {
@Substitute
- protected boolean isMessageLocal(MessageImpl msg) {
- throw new RuntimeException("Not Implemented");
+ static AddressResolverProvider factory(Vertx vertx, AddressResolverOptions options) {
+ return new DefaultAddressResolverProvider();
}
+}
+@TargetClass(className = "io.vertx.core.impl.transports.TransportLoader")
+final class Target_io_vertx_core_impl_transports_TransportLoader {
@Substitute
- ConcurrentMap connections() {
- throw new RuntimeException("Not Implemented");
+ public static Transport epoll() {
+ return Transport.NIO;
}
@Substitute
- VertxInternal vertx() {
- throw new RuntimeException("Not Implemented");
+ public static Transport io_uring() {
+ return Transport.NIO;
}
@Substitute
- EventBusOptions options() {
- throw new RuntimeException("Not Implemented");
+ public static Transport kqueue() {
+ return Transport.NIO;
}
}
@TargetClass(className = "io.vertx.core.spi.tls.DefaultSslContextFactory")
-final class Target_DefaultSslContextFactory {
+final class Target_io_vertx_core_spi_tls_DefaultSslContextFactory {
@Alias
private Set enabledCipherSuites;
@@ -157,7 +90,7 @@ private SslContext createContext(boolean useAlpn, boolean client, KeyManagerFact
builder.keyManager(kmf);
}
} else {
- builder = SslContextBuilder.forServer(kmf);
+ throw new SSLException("not supported");
}
Collection cipherSuites = enabledCipherSuites;
builder.sslProvider(SslProvider.JDK);
@@ -192,6 +125,15 @@ static List get() {
}
}
-class VertxSubstitutions {
+@TargetClass(className = "io.vertx.core.impl.VertxImpl")
+final class Target_io_vertx_core_impl_VertxImpl {
+
+ @Substitute
+ public NetServerImpl createNetServer(NetServerOptions options) {
+ return null;
+ }
+}
+
+public class VertxSubstitutions {
}
diff --git a/shaded/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver-shaded/native-image.properties b/shaded/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver-shaded/native-image.properties
index d3c564e31..e37561fd4 100644
--- a/shaded/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver-shaded/native-image.properties
+++ b/shaded/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver-shaded/native-image.properties
@@ -40,5 +40,7 @@ Args=\
com.arangodb.shaded.netty.resolver.dns.DnsNameResolver,\
com.arangodb.shaded.netty.resolver.HostsFileEntriesResolver,\
com.arangodb.shaded.netty.resolver.dns.ResolvConf$ResolvConfLazy,\
- com.arangodb.shaded.netty.resolver.dns.DefaultDnsServerAddressStreamProvider,\
+ com.arangodb.shaded.netty.handler.ssl.ReferenceCountedOpenSslContext,\
+ com.arangodb.shaded.netty.handler.ssl.ReferenceCountedOpenSslClientContext,\
+ com.arangodb.shaded.netty.handler.ssl.ReferenceCountedOpenSslServerContext,\
com.arangodb.shaded.vertx.core.buffer.impl.VertxByteBufAllocator
diff --git a/shaded/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver-shaded/reflect-config-spi.json b/shaded/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver-shaded/reflect-config-spi.json
index e14d4bf2e..65309b136 100644
--- a/shaded/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver-shaded/reflect-config-spi.json
+++ b/shaded/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver-shaded/reflect-config-spi.json
@@ -7,14 +7,5 @@
"parameterTypes": []
}
]
- },
- {
- "name": "com.arangodb.shaded.jackson.dataformat.velocypack.VPackFactory",
- "methods": [
- {
- "name": "",
- "parameterTypes": []
- }
- ]
}
]
diff --git a/shaded/src/main/resources/META-INF/services/com.arangodb.internal.net.ProtocolProvider b/shaded/src/main/resources/META-INF/services/com.arangodb.internal.net.ProtocolProvider
index faf8cac63..f48d178b7 100644
--- a/shaded/src/main/resources/META-INF/services/com.arangodb.internal.net.ProtocolProvider
+++ b/shaded/src/main/resources/META-INF/services/com.arangodb.internal.net.ProtocolProvider
@@ -1,2 +1 @@
com.arangodb.http.HttpProtocolProvider
-com.arangodb.vst.VstProtocolProvider
diff --git a/shaded/src/main/resources/META-INF/services/com.arangodb.shaded.fasterxml.jackson.core.JsonFactory b/shaded/src/main/resources/META-INF/services/com.arangodb.shaded.fasterxml.jackson.core.JsonFactory
index 89123f5a5..01906064f 100644
--- a/shaded/src/main/resources/META-INF/services/com.arangodb.shaded.fasterxml.jackson.core.JsonFactory
+++ b/shaded/src/main/resources/META-INF/services/com.arangodb.shaded.fasterxml.jackson.core.JsonFactory
@@ -1,2 +1 @@
com.arangodb.shaded.fasterxml.jackson.core.JsonFactory
-com.arangodb.shaded.jackson.dataformat.velocypack.VPackFactory
diff --git a/spotbugs/spotbugs-exclude.xml b/spotbugs/spotbugs-exclude.xml
index c7e8ee070..0f75877b4 100644
--- a/spotbugs/spotbugs-exclude.xml
+++ b/spotbugs/spotbugs-exclude.xml
@@ -17,14 +17,6 @@
-
-
-
-
-
-
-
-
diff --git a/test-functional/pom.xml b/test-functional/pom.xml
index 08edd0ba0..8d7f45af4 100644
--- a/test-functional/pom.xml
+++ b/test-functional/pom.xml
@@ -8,7 +8,7 @@
../test-parent
com.arangodb
test-parent
- 7.25.0
+ 8.0.0-SNAPSHOT
test-functional
@@ -163,8 +163,10 @@
true
false
- --no-fallback --verbose
- --link-at-build-time -H:+ReportExceptionStackTraces
+ --no-fallback
+ --verbose
+ --link-at-build-time
+ -H:+ReportExceptionStackTraces
diff --git a/test-functional/src/test-default/java/graal/netty/graal/HttpContentCompressorSubstitutions.java b/test-functional/src/test-default/java/graal/netty/graal/HttpContentCompressorSubstitutions.java
index 92251b77b..3ff99c61a 100644
--- a/test-functional/src/test-default/java/graal/netty/graal/HttpContentCompressorSubstitutions.java
+++ b/test-functional/src/test-default/java/graal/netty/graal/HttpContentCompressorSubstitutions.java
@@ -1,17 +1,22 @@
package graal.netty.graal;
-import java.util.function.BooleanSupplier;
-
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
-
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
public class HttpContentCompressorSubstitutions {
- @TargetClass(className = "io.netty.handler.codec.compression.ZstdEncoder", onlyWith = IsZstdAbsent.class)
- public static final class ZstdEncoderFactorySubstitution {
+ @TargetClass(className = "io.netty.handler.codec.compression.Zstd")
+ public static final class Target_io_netty_handler_codec_compression_Zstd {
+ @Substitute
+ public static boolean isAvailable() {
+ return false;
+ }
+ }
+
+ @TargetClass(className = "io.netty.handler.codec.compression.ZstdEncoder")
+ public static final class Target_io_netty_handler_codec_compression_ZstdEncoder {
@Substitute
protected ByteBuf allocateBuffer(ChannelHandlerContext ctx, ByteBuf msg, boolean preferDirect) throws Exception {
@@ -30,8 +35,8 @@ public void flush(final ChannelHandlerContext ctx) {
}
@Substitute
- @TargetClass(className = "io.netty.handler.codec.compression.ZstdConstants", onlyWith = IsZstdAbsent.class)
- public static final class ZstdConstants {
+ @TargetClass(className = "io.netty.handler.codec.compression.ZstdConstants")
+ public static final class Target_io_netty_handler_codec_compression_ZstdConstants {
// The constants make calls to com.github.luben.zstd.Zstd so we cut links with that substitution.
@@ -41,29 +46,9 @@ public static final class ZstdConstants {
static final int MAX_COMPRESSION_LEVEL = 0;
- static final int MAX_BLOCK_SIZE = 0;
+ static final int DEFAULT_MAX_ENCODE_SIZE = 0;
static final int DEFAULT_BLOCK_SIZE = 0;
}
- public static class IsZstdAbsent implements BooleanSupplier {
-
- private boolean zstdAbsent;
-
- public IsZstdAbsent() {
- try {
- Class.forName("com.github.luben.zstd.Zstd");
- zstdAbsent = false;
- } catch (Exception e) {
- // It can be a classloading issue (the library is not available), or a native issue
- // (the library for the current OS/arch is not available)
- zstdAbsent = true;
- }
- }
-
- @Override
- public boolean getAsBoolean() {
- return zstdAbsent;
- }
- }
}
diff --git a/test-functional/src/test-default/java/graal/netty/graal/NettySubstitutions.java b/test-functional/src/test-default/java/graal/netty/graal/NettySubstitutions.java
index d910cf1e7..a28eb3921 100644
--- a/test-functional/src/test-default/java/graal/netty/graal/NettySubstitutions.java
+++ b/test-functional/src/test-default/java/graal/netty/graal/NettySubstitutions.java
@@ -28,6 +28,7 @@
import javax.crypto.NoSuchPaddingException;
import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SNIServerName;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLException;
import javax.net.ssl.TrustManagerFactory;
@@ -47,6 +48,7 @@
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.DefaultChannelPromise;
+import io.netty.channel.EventLoopTaskQueueFactory;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.codec.compression.Brotli;
import io.netty.handler.codec.compression.BrotliDecoder;
@@ -141,7 +143,7 @@ final class Target_io_netty_handler_ssl_OpenSsl {
@Alias
@RecomputeFieldValue(kind = Kind.FromAlias)
- static Set SUPPORTED_PROTOCOLS_SET = Collections.emptySet();
+ static Set CLIENT_DEFAULT_PROTOCOLS = Collections.emptySet();
@Substitute
public static boolean isAvailable() {
@@ -164,20 +166,6 @@ public static boolean isCipherSuiteAvailable(String cipherSuite) {
}
}
-@TargetClass(className = "io.netty.handler.ssl.JdkSslServerContext")
-final class Target_io_netty_handler_ssl_JdkSslServerContext {
- @Alias
- Target_io_netty_handler_ssl_JdkSslServerContext(Provider provider,
- X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory,
- X509Certificate[] keyCertChain, PrivateKey key, String keyPassword,
- KeyManagerFactory keyManagerFactory, Iterable ciphers, CipherSuiteFilter cipherFilter,
- ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout,
- ClientAuth clientAuth, String[] protocols, boolean startTls,
- SecureRandom secureRandom, String keyStore, Target_io_netty_handler_ssl_ResumptionController resumptionController)
- throws SSLException {
- }
-}
-
@TargetClass(className = "io.netty.handler.ssl.JdkSslClientContext")
final class Target_io_netty_handler_ssl_JdkSslClientContext {
@@ -188,7 +176,7 @@ final class Target_io_netty_handler_ssl_JdkSslClientContext {
KeyManagerFactory keyManagerFactory, Iterable ciphers, CipherSuiteFilter cipherFilter,
ApplicationProtocolConfig apn, String[] protocols, long sessionCacheSize, long sessionTimeout,
SecureRandom secureRandom, String keyStoreType, String endpointIdentificationAlgorithm,
- Target_io_netty_handler_ssl_ResumptionController resumptionController) throws SSLException {
+ List serverNames, Target_io_netty_handler_ssl_ResumptionController resumptionController) throws SSLException {
}
}
@@ -237,22 +225,16 @@ final class Target_io_netty_handler_ssl_ResumptionController {
final class Target_io_netty_handler_ssl_SslContext {
@Substitute
- static SslContext newServerContextInternal(SslProvider provider,
- Provider sslContextProvider,
- X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory,
- X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, KeyManagerFactory keyManagerFactory,
- Iterable ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn,
- long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth, String[] protocols, boolean startTls,
- boolean enableOcsp, SecureRandom secureRandom, String keyStoreType,
- Map.Entry, Object>... ctxOptions) throws SSLException {
- if (enableOcsp) {
- throw new IllegalArgumentException("OCSP is not supported with this SslProvider: " + provider);
- }
- Target_io_netty_handler_ssl_ResumptionController resumptionController = new Target_io_netty_handler_ssl_ResumptionController();
- return (SslContext) (Object) new Target_io_netty_handler_ssl_JdkSslServerContext(sslContextProvider,
- trustCertCollection, trustManagerFactory, keyCertChain, key, keyPassword,
- keyManagerFactory, ciphers, cipherFilter, apn, sessionCacheSize, sessionTimeout,
- clientAuth, protocols, startTls, secureRandom, keyStoreType, resumptionController);
+ static SslContext newServerContextInternal(SslProvider provider, Provider sslContextProvider,
+ X509Certificate[] trustCert, TrustManagerFactory trustManagerFactory,
+ X509Certificate[] keyCertChain, PrivateKey key, String keyPassword,
+ KeyManagerFactory keyManagerFactory, Iterable ciphers,
+ CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn,
+ long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth,
+ String[] protocols, boolean startTls, boolean enableOcsp,
+ SecureRandom secureRandom, String keyStoreType,
+ Map.Entry, Object>... options) throws SSLException {
+ throw new SSLException("not supported");
}
@Substitute
@@ -263,6 +245,7 @@ static SslContext newClientContextInternal(SslProvider provider,
Iterable ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, String[] protocols,
long sessionCacheSize, long sessionTimeout, boolean enableOcsp,
SecureRandom secureRandom, String keyStoreType, String endpointIdentificationAlgorithm,
+ List serverNames,
Map.Entry, Object>... options) throws SSLException {
if (enableOcsp) {
throw new IllegalArgumentException("OCSP is not supported with this SslProvider: " + provider);
@@ -272,7 +255,7 @@ static SslContext newClientContextInternal(SslProvider provider,
trustCert, trustManagerFactory, keyCertChain, key, keyPassword,
keyManagerFactory, ciphers, cipherFilter, apn, protocols, sessionCacheSize,
sessionTimeout, secureRandom, keyStoreType, endpointIdentificationAlgorithm,
- resumptionController);
+ serverNames, resumptionController);
}
}
@@ -402,7 +385,7 @@ final ChannelFuture initAndRegister() {
final class Target_io_netty_channel_nio_NioEventLoop {
@Substitute
- private static Queue newTaskQueue0(int maxPendingTasks) {
+ private static Queue newTaskQueue(EventLoopTaskQueueFactory queueFactory) {
return new LinkedBlockingDeque<>();
}
}
@@ -456,11 +439,11 @@ static Class> tryToLoadClass(final ClassLoader loader, final Class> helper)
final class Target_io_netty_buffer_EmptyByteBuf {
@Alias
- @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Reset)
+ @RecomputeFieldValue(kind = Kind.Reset)
private static ByteBuffer EMPTY_BYTE_BUFFER;
@Alias
- @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Reset)
+ @RecomputeFieldValue(kind = Kind.Reset)
private static long EMPTY_BYTE_BUFFER_ADDRESS;
@Substitute
@@ -470,7 +453,7 @@ public ByteBuffer nioBuffer() {
@Substitute
public ByteBuffer[] nioBuffers() {
- return new ByteBuffer[] { EmptyByteBufStub.emptyByteBuffer() };
+ return new ByteBuffer[]{EmptyByteBufStub.emptyByteBuffer()};
}
@Substitute
@@ -622,10 +605,19 @@ private static PrivateKey getPrivateKeyFromByteBuffer(ByteBuf encodedKeyBuf, Str
final class Target_io_netty_util_internal_shaded_org_jctools_util_UnsafeRefArrayAccess {
@Alias
- @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.ArrayIndexShift, declClass = Object[].class)
+ @RecomputeFieldValue(kind = Kind.ArrayIndexShift, declClass = Object[].class)
public static int LONG_ELEMENT_SHIFT;
}
+@TargetClass(className = "io.netty.util.internal.CleanerJava25$CleanableDirectBufferImpl")
+final class Target_io_netty_util_internal_CleanerJava25_CleanableDirectBufferImpl {
+ @Substitute
+ public void clean() {
+ // No-op: bypasses Arena.ofShared().close() which is unsupported
+ // in GraalVM native image without -H:+SharedArenaSupport
+ }
+}
+
class IsBouncyNotThere implements BooleanSupplier {
@Override
diff --git a/test-functional/src/test-default/java/graal/vertx/graal/VertxSubstitutions.java b/test-functional/src/test-default/java/graal/vertx/graal/VertxSubstitutions.java
index d8ca211b6..6390b18ab 100644
--- a/test-functional/src/test-default/java/graal/vertx/graal/VertxSubstitutions.java
+++ b/test-functional/src/test-default/java/graal/vertx/graal/VertxSubstitutions.java
@@ -4,22 +4,13 @@
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
import io.netty.handler.ssl.*;
-import io.vertx.core.MultiMap;
-import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import io.vertx.core.dns.AddressResolverOptions;
-import io.vertx.core.eventbus.EventBusOptions;
-import io.vertx.core.eventbus.impl.HandlerHolder;
-import io.vertx.core.eventbus.impl.HandlerRegistration;
-import io.vertx.core.eventbus.impl.MessageImpl;
-import io.vertx.core.eventbus.impl.OutboundDeliveryContext;
-import io.vertx.core.impl.ContextInternal;
-import io.vertx.core.impl.VertxInternal;
-import io.vertx.core.impl.resolver.DefaultResolverProvider;
-import io.vertx.core.impl.transports.JDKTransport;
+import io.vertx.core.dns.impl.DefaultAddressResolverProvider;
import io.vertx.core.net.NetServerOptions;
-import io.vertx.core.spi.resolver.ResolverProvider;
-import io.vertx.core.spi.transport.Transport;
+import io.vertx.core.net.impl.NetServerImpl;
+import io.vertx.core.spi.dns.AddressResolverProvider;
+import io.vertx.core.transport.Transport;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLException;
@@ -27,27 +18,7 @@
import java.util.Collection;
import java.util.List;
import java.util.Set;
-import java.util.concurrent.ConcurrentMap;
-@TargetClass(className = "io.vertx.core.impl.VertxBuilder")
-final class Target_io_vertx_core_impl_VertxBuilder {
- @Substitute
- public static Transport nativeTransport() {
- return JDKTransport.INSTANCE;
- }
-}
-
-/**
- * This substitution forces the usage of the blocking DNS resolver
- */
-@TargetClass(className = "io.vertx.core.spi.resolver.ResolverProvider")
-final class TargetResolverProvider {
-
- @Substitute
- public static ResolverProvider factory(Vertx vertx, AddressResolverOptions options) {
- return new DefaultResolverProvider();
- }
-}
@TargetClass(className = "io.vertx.core.net.OpenSSLEngineOptions")
final class Target_io_vertx_core_net_OpenSSLEngineOptions {
@@ -63,80 +34,42 @@ public static boolean isAlpnAvailable() {
}
}
-@SuppressWarnings("rawtypes")
-@TargetClass(className = "io.vertx.core.eventbus.impl.clustered.ClusteredEventBus")
-final class Target_io_vertx_core_eventbus_impl_clustered_ClusteredEventBusClusteredEventBus {
-
- @Substitute
- private NetServerOptions getServerOptions() {
- throw new RuntimeException("Not Implemented");
- }
-
- @Substitute
- public void start(Promise promise) {
- throw new RuntimeException("Not Implemented");
- }
-
- @Substitute
- public void close(Promise promise) {
- throw new RuntimeException("Not Implemented");
- }
-
- @Substitute
- public MessageImpl createMessage(boolean send, boolean isLocal, String address, MultiMap headers, Object body,
- String codecName) {
- throw new RuntimeException("Not Implemented");
- }
-
+@TargetClass(className = "io.vertx.core.transport.Transport")
+final class Target_io_vertx_core_transport_Transport {
@Substitute
- protected void onLocalRegistration(HandlerHolder handlerHolder, Promise promise) {
- throw new RuntimeException("Not Implemented");
- }
-
- @Substitute
- protected HandlerHolder createHandlerHolder(HandlerRegistration registration, boolean replyHandler,
- boolean localOnly, ContextInternal context) {
- throw new RuntimeException("Not Implemented");
- }
-
- @Substitute
- protected void onLocalUnregistration(HandlerHolder handlerHolder, Promise completionHandler) {
- throw new RuntimeException("Not Implemented");
- }
-
- @Substitute
- protected void sendOrPub(OutboundDeliveryContext sendContext) {
- throw new RuntimeException("Not Implemented");
- }
-
- @Substitute
- protected String generateReplyAddress() {
- throw new RuntimeException("Not Implemented");
+ public static Transport nativeTransport() {
+ return Transport.NIO;
}
+}
+@TargetClass(className = "io.vertx.core.spi.dns.AddressResolverProvider")
+interface Target_io_vertx_core_spi_dns_AddressResolverProvider {
@Substitute
- protected boolean isMessageLocal(MessageImpl msg) {
- throw new RuntimeException("Not Implemented");
+ static AddressResolverProvider factory(Vertx vertx, AddressResolverOptions options) {
+ return new DefaultAddressResolverProvider();
}
+}
+@TargetClass(className = "io.vertx.core.impl.transports.TransportLoader")
+final class Target_io_vertx_core_impl_transports_TransportLoader {
@Substitute
- ConcurrentMap connections() {
- throw new RuntimeException("Not Implemented");
+ public static Transport epoll() {
+ return Transport.NIO;
}
@Substitute
- VertxInternal vertx() {
- throw new RuntimeException("Not Implemented");
+ public static Transport io_uring() {
+ return Transport.NIO;
}
@Substitute
- EventBusOptions options() {
- throw new RuntimeException("Not Implemented");
+ public static Transport kqueue() {
+ return Transport.NIO;
}
}
@TargetClass(className = "io.vertx.core.spi.tls.DefaultSslContextFactory")
-final class Target_DefaultSslContextFactory {
+final class Target_io_vertx_core_spi_tls_DefaultSslContextFactory {
@Alias
private Set enabledCipherSuites;
@@ -157,7 +90,7 @@ private SslContext createContext(boolean useAlpn, boolean client, KeyManagerFact
builder.keyManager(kmf);
}
} else {
- builder = SslContextBuilder.forServer(kmf);
+ throw new SSLException("not supported");
}
Collection cipherSuites = enabledCipherSuites;
builder.sslProvider(SslProvider.JDK);
@@ -192,6 +125,15 @@ static List get() {
}
}
-class VertxSubstitutions {
+@TargetClass(className = "io.vertx.core.impl.VertxImpl")
+final class Target_io_vertx_core_impl_VertxImpl {
+
+ @Substitute
+ public NetServerImpl createNetServer(NetServerOptions options) {
+ return null;
+ }
+}
+
+public class VertxSubstitutions {
}
diff --git a/test-functional/src/test-ssl/java/com/arangodb/ArangoSslTest.java b/test-functional/src/test-ssl/java/com/arangodb/ArangoSslTest.java
index 5643fc254..d7c2ebfe4 100644
--- a/test-functional/src/test-ssl/java/com/arangodb/ArangoSslTest.java
+++ b/test-functional/src/test-ssl/java/com/arangodb/ArangoSslTest.java
@@ -23,14 +23,15 @@
import com.arangodb.config.ArangoConfigProperties;
import com.arangodb.entity.ArangoDBVersion;
import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.EnumSource;
import javax.net.ssl.SSLHandshakeException;
import java.util.List;
+import org.junit.jupiter.params.provider.EnumSource;
+import utils.ProtocolSource;
+
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.catchThrowable;
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
/**
@@ -40,10 +41,8 @@
class ArangoSslTest extends BaseTest {
@ParameterizedTest
- @EnumSource(Protocol.class)
+ @ProtocolSource
void connect(Protocol protocol) {
- assumeTrue(protocol != Protocol.VST);
-
final ArangoDB arangoDB = new ArangoDB.Builder()
.protocol(protocol)
.host("172.28.0.1", 8529)
@@ -60,8 +59,6 @@ void connect(Protocol protocol) {
@ParameterizedTest
@EnumSource(Protocol.class)
void connectWithCertConf(Protocol protocol) {
- assumeTrue(protocol != Protocol.VST);
-
final ArangoDB arangoDB = new ArangoDB.Builder()
.protocol(protocol)
.host("172.28.0.1", 8529)
@@ -77,8 +74,6 @@ void connectWithCertConf(Protocol protocol) {
@ParameterizedTest
@EnumSource(Protocol.class)
void connectWithFileProperties(Protocol protocol) {
- assumeTrue(protocol != Protocol.VST);
-
final ArangoDB arangoDB = new ArangoDB.Builder()
.loadProperties(ArangoConfigProperties.fromFile("arangodb-ssl.properties"))
.protocol(protocol)
@@ -88,10 +83,8 @@ void connectWithFileProperties(Protocol protocol) {
}
@ParameterizedTest
- @EnumSource(Protocol.class)
+ @ProtocolSource
void connectWithoutValidSslContext(Protocol protocol) {
- assumeTrue(protocol != Protocol.VST);
-
final ArangoDB arangoDB = new ArangoDB.Builder()
.protocol(protocol)
.host("172.28.0.1", 8529)
diff --git a/test-functional/src/test-ssl/java/com/arangodb/HttpProxyTest.java b/test-functional/src/test-ssl/java/com/arangodb/HttpProxyTest.java
index aa2ca6bff..7f093d973 100644
--- a/test-functional/src/test-ssl/java/com/arangodb/HttpProxyTest.java
+++ b/test-functional/src/test-ssl/java/com/arangodb/HttpProxyTest.java
@@ -26,13 +26,12 @@
import io.vertx.core.net.ProxyOptions;
import io.vertx.core.net.ProxyType;
import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.EnumSource;
+import utils.ProtocolSource;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.catchThrowable;
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
/**
@@ -41,10 +40,8 @@
class HttpProxyTest extends BaseTest {
@ParameterizedTest
- @EnumSource(Protocol.class)
+ @ProtocolSource
void httpProxy(Protocol protocol) {
- assumeTrue(protocol != Protocol.VST);
-
final ArangoDB arangoDB = new ArangoDB.Builder()
.protocol(protocol)
.host("172.28.0.1", 8529)
@@ -68,10 +65,8 @@ void httpProxy(Protocol protocol) {
@ParameterizedTest
- @EnumSource(Protocol.class)
+ @ProtocolSource
void httpProxyWrongPassword(Protocol protocol) {
- assumeTrue(protocol != Protocol.VST);
-
final ArangoDB arangoDB = new ArangoDB.Builder()
.protocol(protocol)
.host("172.28.0.1", 8529)
diff --git a/test-functional/src/test-ssl/java/com/arangodb/SslExampleTest.java b/test-functional/src/test-ssl/java/com/arangodb/SslExampleTest.java
index 0a7b560a7..cf444d8e7 100644
--- a/test-functional/src/test-ssl/java/com/arangodb/SslExampleTest.java
+++ b/test-functional/src/test-ssl/java/com/arangodb/SslExampleTest.java
@@ -24,7 +24,7 @@
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
-import utils.TestUtils;
+import utils.ProtocolSource;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
@@ -35,7 +35,6 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.catchThrowable;
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
/**
* @author Mark Vollmary
@@ -45,9 +44,8 @@ class SslExampleTest extends BaseTest {
@Disabled("Only local execution, in CircleCI port 8529 exposed to localhost")
@ParameterizedTest
- @EnumSource(Protocol.class)
+ @ProtocolSource
void connect(Protocol protocol) {
- assumeTrue(!protocol.equals(Protocol.VST) || TestUtils.isLessThanVersion(version.getVersion(), 3, 12, 0));
final ArangoDB arangoDB = new ArangoDB.Builder()
.host("localhost", 8529)
.password("test")
@@ -61,9 +59,8 @@ void connect(Protocol protocol) {
}
@ParameterizedTest
- @EnumSource(Protocol.class)
+ @ProtocolSource
void noopHostnameVerifier(Protocol protocol) {
- assumeTrue(!protocol.equals(Protocol.VST) || TestUtils.isLessThanVersion(version.getVersion(), 3, 12, 0));
final ArangoDB arangoDB = new ArangoDB.Builder()
.host("172.28.0.1", 8529)
.password("test")
@@ -78,9 +75,8 @@ void noopHostnameVerifier(Protocol protocol) {
}
@ParameterizedTest
- @EnumSource(Protocol.class)
+ @ProtocolSource
void hostnameVerifierFailure(Protocol protocol) {
- assumeTrue(protocol != Protocol.VST, "VST does not support hostname verification");
final ArangoDB arangoDB = new ArangoDB.Builder()
.host("172.28.0.1", 8529)
.password("test")
@@ -101,8 +97,6 @@ void hostnameVerifierFailure(Protocol protocol) {
@ParameterizedTest
@EnumSource(Protocol.class)
void connectWithSslContext(Protocol protocol) {
- assumeTrue(protocol != Protocol.VST);
-
final ArangoDB arangoDB = new ArangoDB.Builder()
.protocol(protocol)
.host("172.28.0.1", 8529)
diff --git a/test-functional/src/test-ssl/java/utils/ProtocolSource.java b/test-functional/src/test-ssl/java/utils/ProtocolSource.java
new file mode 100644
index 000000000..3b27f64f6
--- /dev/null
+++ b/test-functional/src/test-ssl/java/utils/ProtocolSource.java
@@ -0,0 +1,15 @@
+package utils;
+
+import com.arangodb.Protocol;
+import org.junit.jupiter.params.provider.EnumSource;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@EnumSource(Protocol.class)
+@Target({ElementType.TYPE, ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ProtocolSource {
+}
diff --git a/test-functional/src/test/java/com/arangodb/ArangoCollectionAsyncTest.java b/test-functional/src/test/java/com/arangodb/ArangoCollectionAsyncTest.java
index 179e78edd..6af96a7cd 100644
--- a/test-functional/src/test/java/com/arangodb/ArangoCollectionAsyncTest.java
+++ b/test-functional/src/test/java/com/arangodb/ArangoCollectionAsyncTest.java
@@ -145,7 +145,6 @@ void insertDocumentReturnNew(ArangoCollectionAsync collection) throws ExecutionE
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentWithTypeOverwriteModeReplace(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 7));
assumeTrue(collection.getSerde().getUserSerde() instanceof JacksonSerde, "polymorphic deserialization support" +
" required");
@@ -180,8 +179,6 @@ void insertDocumentWithTypeOverwriteModeReplace(ArangoCollectionAsync collection
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentOverwriteModeIgnore(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 7));
-
String key = "key-" + UUID.randomUUID();
final BaseDocument doc = new BaseDocument(key);
doc.addAttribute("foo", "a");
@@ -199,8 +196,6 @@ void insertDocumentOverwriteModeIgnore(ArangoCollectionAsync collection) throws
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentOverwriteModeConflict(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 7));
-
String key = "key-" + UUID.randomUUID();
final BaseDocument doc = new BaseDocument(key);
doc.addAttribute("foo", "a");
@@ -218,8 +213,6 @@ void insertDocumentOverwriteModeConflict(ArangoCollectionAsync collection) throw
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentOverwriteModeReplace(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 7));
-
String key = "key-" + UUID.randomUUID();
final BaseDocument doc = new BaseDocument(key);
doc.addAttribute("foo", "a");
@@ -239,8 +232,6 @@ void insertDocumentOverwriteModeReplace(ArangoCollectionAsync collection) throws
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentOverwriteModeUpdate(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 7));
-
final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
doc.addAttribute("foo", "a");
final DocumentCreateEntity> meta = collection.insertDocument(doc).get();
@@ -258,8 +249,6 @@ void insertDocumentOverwriteModeUpdate(ArangoCollectionAsync collection) throws
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentOverwriteModeUpdateMergeObjectsFalse(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 7));
-
final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
Map fieldA = Collections.singletonMap("a", "a");
doc.addAttribute("foo", fieldA);
@@ -278,8 +267,6 @@ void insertDocumentOverwriteModeUpdateMergeObjectsFalse(ArangoCollectionAsync co
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentOverwriteModeUpdateKeepNullTrue(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 7));
-
final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
doc.addAttribute("foo", "bar");
collection.insertDocument(doc).get();
@@ -296,8 +283,6 @@ void insertDocumentOverwriteModeUpdateKeepNullTrue(ArangoCollectionAsync collect
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentOverwriteModeUpdateKeepNullFalse(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 7));
-
final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
doc.addAttribute("foo", "bar");
collection.insertDocument(doc).get();
@@ -314,8 +299,6 @@ void insertDocumentOverwriteModeUpdateKeepNullFalse(ArangoCollectionAsync collec
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentOverwriteModeUpdateWithExternalVersioning(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 12));
-
BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
doc.addAttribute("_version", 1);
collection.insertDocument(doc).get();
@@ -333,8 +316,6 @@ void insertDocumentOverwriteModeUpdateWithExternalVersioning(ArangoCollectionAsy
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentOverwriteModeUpdateWithExternalVersioningFail(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 12));
-
BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
doc.addAttribute("_version", 1);
collection.insertDocument(doc).get();
@@ -353,8 +334,6 @@ void insertDocumentOverwriteModeUpdateWithExternalVersioningFail(ArangoCollectio
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentsOverwriteModeUpdateWithExternalVersioning(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 12));
-
BaseDocument d1 = new BaseDocument(UUID.randomUUID().toString());
d1.addAttribute("_version", 1);
BaseDocument d2 = new BaseDocument(UUID.randomUUID().toString());
@@ -382,8 +361,6 @@ void insertDocumentsOverwriteModeUpdateWithExternalVersioning(ArangoCollectionAs
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentsOverwriteModeUpdateWithExternalVersioningFail(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 12));
-
BaseDocument d1 = new BaseDocument(UUID.randomUUID().toString());
d1.addAttribute("_version", 1);
BaseDocument d2 = new BaseDocument(UUID.randomUUID().toString());
@@ -411,8 +388,6 @@ void insertDocumentsOverwriteModeUpdateWithExternalVersioningFail(ArangoCollecti
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentOverwriteModeReplaceWithExternalVersioning(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 12));
-
BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
doc.addAttribute("_version", 1);
collection.insertDocument(doc).get();
@@ -430,8 +405,6 @@ void insertDocumentOverwriteModeReplaceWithExternalVersioning(ArangoCollectionAs
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentOverwriteModeReplaceUpdateWithExternalVersioningFail(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 12));
-
BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
doc.addAttribute("_version", 1);
collection.insertDocument(doc).get();
@@ -450,8 +423,6 @@ void insertDocumentOverwriteModeReplaceUpdateWithExternalVersioningFail(ArangoCo
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentsOverwriteModeReplaceWithExternalVersioning(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 12));
-
BaseDocument d1 = new BaseDocument(UUID.randomUUID().toString());
d1.addAttribute("_version", 1);
BaseDocument d2 = new BaseDocument(UUID.randomUUID().toString());
@@ -479,8 +450,6 @@ void insertDocumentsOverwriteModeReplaceWithExternalVersioning(ArangoCollectionA
@ParameterizedTest
@MethodSource("asyncCols")
void insertDocumentsOverwriteModeReplaceWithExternalVersioningFail(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isAtLeastVersion(3, 12));
-
BaseDocument d1 = new BaseDocument(UUID.randomUUID().toString());
d1.addAttribute("_version", 1);
BaseDocument d2 = new BaseDocument(UUID.randomUUID().toString());
@@ -754,7 +723,7 @@ void getDocumentsWithCustomShardingKey(ArangoCollectionAsync c) throws Execution
@ParameterizedTest
@MethodSource("asyncCols")
void getDocumentsDirtyRead(ArangoCollectionAsync collection) throws ExecutionException, InterruptedException {
- assumeTrue(isCluster()); // skip activefailover
+ assumeTrue(isCluster());
final Collection