|
32 | 32 | import org.slf4j.Logger; |
33 | 33 | import org.slf4j.LoggerFactory; |
34 | 34 |
|
| 35 | +import com.arangodb.model.*; |
35 | 36 | import com.arangodb.ArangoCollection; |
36 | 37 | import com.arangodb.ArangoDBException; |
37 | 38 | import com.arangodb.entity.CollectionEntity; |
|
45 | 46 | import com.arangodb.entity.MultiDocumentEntity; |
46 | 47 | import com.arangodb.entity.Permissions; |
47 | 48 | import com.arangodb.internal.util.DocumentUtil; |
48 | | -import com.arangodb.model.CollectionCreateOptions; |
49 | | -import com.arangodb.model.CollectionPropertiesOptions; |
50 | | -import com.arangodb.model.DocumentCreateOptions; |
51 | | -import com.arangodb.model.DocumentDeleteOptions; |
52 | | -import com.arangodb.model.DocumentExistsOptions; |
53 | | -import com.arangodb.model.DocumentImportOptions; |
54 | | -import com.arangodb.model.DocumentReadOptions; |
55 | | -import com.arangodb.model.DocumentReplaceOptions; |
56 | | -import com.arangodb.model.DocumentUpdateOptions; |
57 | | -import com.arangodb.model.FulltextIndexOptions; |
58 | | -import com.arangodb.model.GeoIndexOptions; |
59 | | -import com.arangodb.model.HashIndexOptions; |
60 | | -import com.arangodb.model.PersistentIndexOptions; |
61 | | -import com.arangodb.model.SkiplistIndexOptions; |
62 | 49 | import com.arangodb.velocypack.VPackSlice; |
63 | 50 |
|
64 | 51 | /** |
@@ -131,10 +118,12 @@ public Collection<DocumentImportEntity> importDocuments(Collection<?> values, Do |
131 | 118 | try { |
132 | 119 | documentImportEntity = completableFuture.get(); |
133 | 120 | } catch (InterruptedException | ExecutionException e) { |
| 121 | + executorService.shutdown(); |
134 | 122 | throw new ArangoDBException(e); |
135 | 123 | } |
136 | 124 | documentImportEntityList.add(documentImportEntity); |
137 | 125 | } |
| 126 | + executorService.shutdown(); |
138 | 127 | return documentImportEntityList; |
139 | 128 | } |
140 | 129 |
|
@@ -334,6 +323,12 @@ public IndexEntity ensureFulltextIndex(final Iterable<String> fields, final Full |
334 | 323 | return executor.execute(createFulltextIndexRequest(fields, options), IndexEntity.class); |
335 | 324 | } |
336 | 325 |
|
| 326 | + @Override |
| 327 | + public IndexEntity ensureTtlIndex(final Iterable<String> fields, final TtlIndexOptions options) |
| 328 | + throws ArangoDBException { |
| 329 | + return executor.execute(createTtlIndexRequest(fields, options), IndexEntity.class); |
| 330 | + } |
| 331 | + |
337 | 332 | @Override |
338 | 333 | public Collection<IndexEntity> getIndexes() throws ArangoDBException { |
339 | 334 | return executor.execute(getIndexesRequest(), getIndexesResponseDeserializer()); |
|
0 commit comments