public class ArangoCollectionAsyncImpl extends com.arangodb.internal.InternalArangoCollection<ArangoDBAsyncImpl,ArangoDatabaseAsyncImpl,ArangoExecutorAsync> implements ArangoCollectionAsync
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<CollectionPropertiesEntity> |
changeProperties(CollectionPropertiesOptions options)
Changes the properties of a collection
|
CompletableFuture<CollectionPropertiesEntity> |
count()
Counts the documents in a collection
|
CompletableFuture<CollectionPropertiesEntity> |
count(CollectionCountOptions options)
Counts the documents in a collection
|
CompletableFuture<CollectionEntity> |
create()
Creates the collection
|
CompletableFuture<CollectionEntity> |
create(CollectionCreateOptions options)
Creates the collection
|
CompletableFuture<DocumentDeleteEntity<Void>> |
deleteDocument(String key)
Removes a document
|
<T> CompletableFuture<DocumentDeleteEntity<T>> |
deleteDocument(String key,
Class<T> type,
DocumentDeleteOptions options)
Removes a document
|
CompletableFuture<MultiDocumentEntity<DocumentDeleteEntity<Void>>> |
deleteDocuments(Collection<?> values)
Removes multiple document
|
<T> CompletableFuture<MultiDocumentEntity<DocumentDeleteEntity<T>>> |
deleteDocuments(Collection<?> values,
Class<T> type,
DocumentDeleteOptions options)
Removes multiple document
|
CompletableFuture<String> |
deleteIndex(String id)
Deletes an index
|
CompletableFuture<Boolean> |
documentExists(String key)
Checks if the document exists by reading a single document head
|
CompletableFuture<Boolean> |
documentExists(String key,
DocumentExistsOptions options)
Checks if the document exists by reading a single document head
|
CompletableFuture<Void> |
drop()
Drops the collection
|
CompletableFuture<Void> |
drop(boolean isSystem)
Drops the collection
|
CompletableFuture<IndexEntity> |
ensureFulltextIndex(Iterable<String> fields,
FulltextIndexOptions options)
Creates a fulltext index for the collection, if it does not already exist.
|
CompletableFuture<IndexEntity> |
ensureGeoIndex(Iterable<String> fields,
GeoIndexOptions options)
Creates a geo-spatial index for the collection, if it does not already exist.
|
CompletableFuture<IndexEntity> |
ensureHashIndex(Iterable<String> fields,
HashIndexOptions options)
Creates a hash index for the collection, if it does not already exist.
|
CompletableFuture<IndexEntity> |
ensurePersistentIndex(Iterable<String> fields,
PersistentIndexOptions options)
Creates a persistent index for the collection, if it does not already exist.
|
CompletableFuture<IndexEntity> |
ensureSkiplistIndex(Iterable<String> fields,
SkiplistIndexOptions options)
Creates a skip-list index for the collection, if it does not already exist.
|
CompletableFuture<IndexEntity> |
ensureTtlIndex(Iterable<String> fields,
TtlIndexOptions options)
Creates a ttl index for the collection, if it does not already exist.
|
CompletableFuture<Boolean> |
exists()
Checks whether the collection exists
|
<T> CompletableFuture<T> |
getDocument(String key,
Class<T> type)
Reads a single document
|
<T> CompletableFuture<T> |
getDocument(String key,
Class<T> type,
DocumentReadOptions options)
Reads a single document
|
<T> CompletableFuture<MultiDocumentEntity<T>> |
getDocuments(Collection<String> keys,
Class<T> type)
Reads multiple documents
|
<T> CompletableFuture<MultiDocumentEntity<T>> |
getDocuments(Collection<String> keys,
Class<T> type,
DocumentReadOptions options)
Reads multiple documents
|
CompletableFuture<IndexEntity> |
getIndex(String id)
Returns an index
|
CompletableFuture<Collection<IndexEntity>> |
getIndexes()
Returns all indexes of the collection
|
CompletableFuture<CollectionEntity> |
getInfo()
Returns information about the collection
|
CompletableFuture<Permissions> |
getPermissions(String user)
Get the collection access level
|
CompletableFuture<CollectionPropertiesEntity> |
getProperties()
Reads the properties of the specified collection
|
CompletableFuture<ShardEntity> |
getResponsibleShard(Object value)
Returns the responsible shard for the document.
|
CompletableFuture<CollectionRevisionEntity> |
getRevision()
Retrieve the collections revision
|
CompletableFuture<Void> |
grantAccess(String user,
Permissions permissions)
Grants or revoke access to the collection for user user.
|
CompletableFuture<DocumentImportEntity> |
importDocuments(Collection<?> values)
Imports documents
|
CompletableFuture<DocumentImportEntity> |
importDocuments(Collection<?> values,
DocumentImportOptions options)
Imports documents
|
CompletableFuture<DocumentImportEntity> |
importDocuments(String values)
Imports documents
|
CompletableFuture<DocumentImportEntity> |
importDocuments(String values,
DocumentImportOptions options)
Imports documents
|
<T> CompletableFuture<DocumentCreateEntity<T>> |
insertDocument(T value)
Creates a new document from the given document, unless there is already a document with the _key given.
|
<T> CompletableFuture<DocumentCreateEntity<T>> |
insertDocument(T value,
DocumentCreateOptions options)
Creates a new document from the given document, unless there is already a document with the _key given.
|
<T> CompletableFuture<MultiDocumentEntity<DocumentCreateEntity<T>>> |
insertDocuments(Collection<T> values)
Creates new documents from the given documents, unless there is already a document with the _key given.
|
<T> CompletableFuture<MultiDocumentEntity<DocumentCreateEntity<T>>> |
insertDocuments(Collection<T> values,
DocumentCreateOptions options)
Creates new documents from the given documents, unless there is already a document with the _key given.
|
CompletableFuture<CollectionEntity> |
load()
Loads a collection into memory.
|
CompletableFuture<CollectionEntity> |
rename(String newName)
Renames a collection
|
<T> CompletableFuture<DocumentUpdateEntity<T>> |
replaceDocument(String key,
T value)
Replaces the document with key with the one in the body, provided there is such a document and no precondition is
violated
|
<T> CompletableFuture<DocumentUpdateEntity<T>> |
replaceDocument(String key,
T value,
DocumentReplaceOptions options)
Replaces the document with key with the one in the body, provided there is such a document and no precondition is
violated
|
<T> CompletableFuture<MultiDocumentEntity<DocumentUpdateEntity<T>>> |
replaceDocuments(Collection<T> values)
Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are
specified by the _key attributes in the documents in values.
|
<T> CompletableFuture<MultiDocumentEntity<DocumentUpdateEntity<T>>> |
replaceDocuments(Collection<T> values,
DocumentReplaceOptions options)
Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are
specified by the _key attributes in the documents in values.
|
CompletableFuture<Void> |
resetAccess(String user)
Clear the collection access level, revert back to the default access level.
|
CompletableFuture<Void> |
revokeAccess(String user)
Revokes access to the collection for user user.
|
CompletableFuture<CollectionEntity> |
truncate()
Removes all documents from the collection, but leaves the indexes intact
|
CompletableFuture<CollectionEntity> |
truncate(CollectionTruncateOptions options)
Removes all documents from the collection, but leaves the indexes intact
|
CompletableFuture<CollectionEntity> |
unload()
Removes a collection from memory.
|
<T> CompletableFuture<DocumentUpdateEntity<T>> |
updateDocument(String key,
T value)
Partially updates the document identified by document-key.
|
<T> CompletableFuture<DocumentUpdateEntity<T>> |
updateDocument(String key,
T value,
DocumentUpdateOptions options)
Partially updates the document identified by document-key.
|
<T> CompletableFuture<MultiDocumentEntity<DocumentUpdateEntity<T>>> |
updateDocuments(Collection<T> values)
Partially updates documents, the documents to update are specified by the _key attributes in the objects on
values.
|
<T> CompletableFuture<MultiDocumentEntity<DocumentUpdateEntity<T>>> |
updateDocuments(Collection<T> values,
DocumentUpdateOptions options)
Partially updates documents, the documents to update are specified by the _key attributes in the objects on
values.
|
changePropertiesRequest, countRequest, createFulltextIndexRequest, createGeoIndexRequest, createHashIndexRequest, createPersistentIndexRequest, createSkiplistIndexRequest, createTtlIndexRequest, db, deleteDocumentRequest, deleteDocumentResponseDeserializer, deleteDocumentsRequest, deleteDocumentsResponseDeserializer, deleteIndexRequest, deleteIndexResponseDeserializer, documentExistsRequest, dropRequest, getDocumentRequest, getDocumentsRequest, getDocumentsResponseDeserializer, getIndexesRequest, getIndexesResponseDeserializer, getIndexRequest, getInfoRequest, getPermissionsRequest, getPermissionsResponseDeserialzer, getPropertiesRequest, getRevisionRequest, grantAccessRequest, importDocumentsRequest, importDocumentsRequest, importDocumentsRequest, insertDocumentRequest, insertDocumentResponseDeserializer, insertDocumentsRequest, insertDocumentsResponseDeserializer, loadRequest, name, renameRequest, replaceDocumentRequest, replaceDocumentResponseDeserializer, replaceDocumentsRequest, replaceDocumentsResponseDeserializer, resetAccessRequest, responsibleShardRequest, truncateRequest, unloadRequest, updateDocumentRequest, updateDocumentResponseDeserializer, updateDocumentsRequest, updateDocumentsResponseDeserializercreatePath, executor, request, util, utilclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdb, nameutil, utilpublic <T> CompletableFuture<DocumentCreateEntity<T>> insertDocument(T value)
ArangoCollectionAsyncinsertDocument in interface ArangoCollectionAsyncvalue - A representation of a single document (POJO, VPackSlice or String for Json)public <T> CompletableFuture<DocumentCreateEntity<T>> insertDocument(T value, DocumentCreateOptions options)
ArangoCollectionAsyncinsertDocument in interface ArangoCollectionAsyncvalue - A representation of a single document (POJO, VPackSlice or String for Json)options - Additional options, can be nullpublic <T> CompletableFuture<MultiDocumentEntity<DocumentCreateEntity<T>>> insertDocuments(Collection<T> values)
ArangoCollectionAsyncinsertDocuments in interface ArangoCollectionAsyncvalues - A List of documents (POJO, VPackSlice or String for Json)public <T> CompletableFuture<MultiDocumentEntity<DocumentCreateEntity<T>>> insertDocuments(Collection<T> values, DocumentCreateOptions options)
ArangoCollectionAsyncinsertDocuments in interface ArangoCollectionAsyncvalues - A List of documents (POJO, VPackSlice or String for Json)options - Additional options, can be nullpublic CompletableFuture<DocumentImportEntity> importDocuments(Collection<?> values)
ArangoCollectionAsyncimportDocuments in interface ArangoCollectionAsyncvalues - a list of Objects that will be stored as documentspublic CompletableFuture<DocumentImportEntity> importDocuments(Collection<?> values, DocumentImportOptions options)
ArangoCollectionAsyncimportDocuments in interface ArangoCollectionAsyncvalues - a list of Objects that will be stored as documentsoptions - Additional options, can be nullpublic CompletableFuture<DocumentImportEntity> importDocuments(String values)
ArangoCollectionAsyncimportDocuments in interface ArangoCollectionAsyncvalues - JSON-encoded array of objects that will be stored as documentspublic CompletableFuture<DocumentImportEntity> importDocuments(String values, DocumentImportOptions options)
ArangoCollectionAsyncimportDocuments in interface ArangoCollectionAsyncvalues - JSON-encoded array of objects that will be stored as documentsoptions - Additional options, can be nullpublic <T> CompletableFuture<T> getDocument(String key, Class<T> type) throws ArangoDBException
ArangoCollectionAsyncgetDocument in interface ArangoCollectionAsynckey - The key of the documenttype - The type of the document (POJO class, VPackSlice or String for Json)ArangoDBExceptionpublic <T> CompletableFuture<T> getDocument(String key, Class<T> type, DocumentReadOptions options) throws ArangoDBException
ArangoCollectionAsyncgetDocument in interface ArangoCollectionAsynckey - The key of the documenttype - The type of the document (POJO class, VPackSlice or String for Json)options - Additional options, can be nullArangoDBExceptionpublic <T> CompletableFuture<MultiDocumentEntity<T>> getDocuments(Collection<String> keys, Class<T> type)
ArangoCollectionAsyncgetDocuments in interface ArangoCollectionAsynckeys - The keys of the documentstype - The type of the documents (POJO class, VPackSlice or String for Json)public <T> CompletableFuture<MultiDocumentEntity<T>> getDocuments(Collection<String> keys, Class<T> type, DocumentReadOptions options)
ArangoCollectionAsyncgetDocuments in interface ArangoCollectionAsynckeys - The keys of the documentstype - The type of the documents (POJO class, VPackSlice or String for Json)options - Additional options, can be nullpublic <T> CompletableFuture<DocumentUpdateEntity<T>> replaceDocument(String key, T value)
ArangoCollectionAsyncreplaceDocument in interface ArangoCollectionAsynckey - The key of the documentvalue - A representation of a single document (POJO, VPackSlice or String for Json)public <T> CompletableFuture<DocumentUpdateEntity<T>> replaceDocument(String key, T value, DocumentReplaceOptions options)
ArangoCollectionAsyncreplaceDocument in interface ArangoCollectionAsynckey - The key of the documentvalue - A representation of a single document (POJO, VPackSlice or String for Json)options - Additional options, can be nullpublic <T> CompletableFuture<MultiDocumentEntity<DocumentUpdateEntity<T>>> replaceDocuments(Collection<T> values)
ArangoCollectionAsyncreplaceDocuments in interface ArangoCollectionAsyncvalues - A List of documents (POJO, VPackSlice or String for Json)public <T> CompletableFuture<MultiDocumentEntity<DocumentUpdateEntity<T>>> replaceDocuments(Collection<T> values, DocumentReplaceOptions options)
ArangoCollectionAsyncreplaceDocuments in interface ArangoCollectionAsyncvalues - A List of documents (POJO, VPackSlice or String for Json)options - Additional options, can be nullpublic <T> CompletableFuture<DocumentUpdateEntity<T>> updateDocument(String key, T value)
ArangoCollectionAsyncupdateDocument in interface ArangoCollectionAsynckey - The key of the documentvalue - A representation of a single document (POJO, VPackSlice or String for Json)public <T> CompletableFuture<DocumentUpdateEntity<T>> updateDocument(String key, T value, DocumentUpdateOptions options)
ArangoCollectionAsyncupdateDocument in interface ArangoCollectionAsynckey - The key of the documentvalue - A representation of a single document (POJO, VPackSlice or String for Json)options - Additional options, can be nullpublic <T> CompletableFuture<MultiDocumentEntity<DocumentUpdateEntity<T>>> updateDocuments(Collection<T> values)
ArangoCollectionAsyncupdateDocuments in interface ArangoCollectionAsyncvalues - A list of documents (POJO, VPackSlice or String for Json)public <T> CompletableFuture<MultiDocumentEntity<DocumentUpdateEntity<T>>> updateDocuments(Collection<T> values, DocumentUpdateOptions options)
ArangoCollectionAsyncupdateDocuments in interface ArangoCollectionAsyncvalues - A list of documents (POJO, VPackSlice or String for Json)options - Additional options, can be nullpublic CompletableFuture<DocumentDeleteEntity<Void>> deleteDocument(String key)
ArangoCollectionAsyncdeleteDocument in interface ArangoCollectionAsynckey - The key of the documentpublic <T> CompletableFuture<DocumentDeleteEntity<T>> deleteDocument(String key, Class<T> type, DocumentDeleteOptions options)
ArangoCollectionAsyncdeleteDocument in interface ArangoCollectionAsynckey - The key of the documenttype - The type of the document (POJO class, VPackSlice or String for Json). Only necessary if
options.returnOld is set to true, otherwise can be null.options - Additional options, can be nullpublic CompletableFuture<MultiDocumentEntity<DocumentDeleteEntity<Void>>> deleteDocuments(Collection<?> values)
ArangoCollectionAsyncdeleteDocuments in interface ArangoCollectionAsyncvalues - The keys of the documents or the documents themselvespublic <T> CompletableFuture<MultiDocumentEntity<DocumentDeleteEntity<T>>> deleteDocuments(Collection<?> values, Class<T> type, DocumentDeleteOptions options)
ArangoCollectionAsyncdeleteDocuments in interface ArangoCollectionAsyncvalues - The keys of the documents or the documents themselvestype - The type of the documents (POJO class, VPackSlice or String for Json). Only necessary if
options.returnOld is set to true, otherwise can be null.options - Additional options, can be nullpublic CompletableFuture<Boolean> documentExists(String key)
ArangoCollectionAsyncdocumentExists in interface ArangoCollectionAsynckey - The key of the documentpublic CompletableFuture<Boolean> documentExists(String key, DocumentExistsOptions options)
ArangoCollectionAsyncdocumentExists in interface ArangoCollectionAsynckey - The key of the documentoptions - Additional options, can be nullpublic CompletableFuture<IndexEntity> getIndex(String id)
ArangoCollectionAsyncgetIndex in interface ArangoCollectionAsyncid - The index-handlepublic CompletableFuture<String> deleteIndex(String id)
ArangoCollectionAsyncdeleteIndex in interface ArangoCollectionAsyncid - The index-handlepublic CompletableFuture<IndexEntity> ensureHashIndex(Iterable<String> fields, HashIndexOptions options)
ArangoCollectionAsyncensureHashIndex in interface ArangoCollectionAsyncfields - A list of attribute pathsoptions - Additional options, can be nullpublic CompletableFuture<IndexEntity> ensureSkiplistIndex(Iterable<String> fields, SkiplistIndexOptions options)
ArangoCollectionAsyncensureSkiplistIndex in interface ArangoCollectionAsyncfields - A list of attribute pathsoptions - Additional options, can be nullpublic CompletableFuture<IndexEntity> ensurePersistentIndex(Iterable<String> fields, PersistentIndexOptions options)
ArangoCollectionAsyncensurePersistentIndex in interface ArangoCollectionAsyncfields - A list of attribute pathsoptions - Additional options, can be nullpublic CompletableFuture<IndexEntity> ensureGeoIndex(Iterable<String> fields, GeoIndexOptions options)
ArangoCollectionAsyncensureGeoIndex in interface ArangoCollectionAsyncfields - A list of attribute pathsoptions - Additional options, can be nullpublic CompletableFuture<IndexEntity> ensureFulltextIndex(Iterable<String> fields, FulltextIndexOptions options)
ArangoCollectionAsyncensureFulltextIndex in interface ArangoCollectionAsyncfields - A list of attribute pathsoptions - Additional options, can be nullpublic CompletableFuture<IndexEntity> ensureTtlIndex(Iterable<String> fields, TtlIndexOptions options)
ArangoCollectionAsyncensureTtlIndex in interface ArangoCollectionAsyncfields - A list of attribute pathsoptions - Additional options, can be nullpublic CompletableFuture<Collection<IndexEntity>> getIndexes()
ArangoCollectionAsyncgetIndexes in interface ArangoCollectionAsyncpublic CompletableFuture<Boolean> exists()
ArangoCollectionAsyncexists in interface ArangoCollectionAsyncpublic CompletableFuture<CollectionEntity> truncate()
ArangoCollectionAsynctruncate in interface ArangoCollectionAsyncpublic CompletableFuture<CollectionEntity> truncate(CollectionTruncateOptions options)
ArangoCollectionAsynctruncate in interface ArangoCollectionAsyncpublic CompletableFuture<CollectionPropertiesEntity> count()
ArangoCollectionAsynccount in interface ArangoCollectionAsyncpublic CompletableFuture<CollectionPropertiesEntity> count(CollectionCountOptions options)
ArangoCollectionAsynccount in interface ArangoCollectionAsyncpublic CompletableFuture<CollectionEntity> create()
ArangoCollectionAsynccreate in interface ArangoCollectionAsyncpublic CompletableFuture<CollectionEntity> create(CollectionCreateOptions options)
ArangoCollectionAsynccreate in interface ArangoCollectionAsyncoptions - Additional options, can be nullpublic CompletableFuture<Void> drop()
ArangoCollectionAsyncdrop in interface ArangoCollectionAsyncpublic CompletableFuture<Void> drop(boolean isSystem)
ArangoCollectionAsyncdrop in interface ArangoCollectionAsyncisSystem - Whether or not the collection to drop is a system collection. This parameter must be set to true in
order to drop a system collection.public CompletableFuture<CollectionEntity> load()
ArangoCollectionAsyncload in interface ArangoCollectionAsyncpublic CompletableFuture<CollectionEntity> unload()
ArangoCollectionAsyncunload in interface ArangoCollectionAsyncpublic CompletableFuture<CollectionEntity> getInfo()
ArangoCollectionAsyncgetInfo in interface ArangoCollectionAsyncpublic CompletableFuture<CollectionPropertiesEntity> getProperties()
ArangoCollectionAsyncgetProperties in interface ArangoCollectionAsyncpublic CompletableFuture<CollectionPropertiesEntity> changeProperties(CollectionPropertiesOptions options)
ArangoCollectionAsyncchangeProperties in interface ArangoCollectionAsyncoptions - Additional options, can be nullpublic CompletableFuture<CollectionEntity> rename(String newName)
ArangoCollectionAsyncrename in interface ArangoCollectionAsyncnewName - The new namepublic CompletableFuture<ShardEntity> getResponsibleShard(Object value)
ArangoCollectionAsyncgetResponsibleShard in interface ArangoCollectionAsyncvalue - A projection of the document containing at least the shard key (_key or a custom attribute) for
which the responsible shard should be determinedpublic CompletableFuture<CollectionRevisionEntity> getRevision()
ArangoCollectionAsyncgetRevision in interface ArangoCollectionAsyncpublic CompletableFuture<Void> grantAccess(String user, Permissions permissions)
ArangoCollectionAsyncgrantAccess in interface ArangoCollectionAsyncuser - The name of the userpermissions - The permissions the user grantpublic CompletableFuture<Void> revokeAccess(String user)
ArangoCollectionAsyncrevokeAccess in interface ArangoCollectionAsyncuser - The name of the userpublic CompletableFuture<Void> resetAccess(String user)
ArangoCollectionAsyncresetAccess in interface ArangoCollectionAsyncuser - The name of the userpublic CompletableFuture<Permissions> getPermissions(String user)
ArangoCollectionAsyncgetPermissions in interface ArangoCollectionAsyncuser - The name of the userCopyright © 2016–2020 ArangoDB GmbH. All rights reserved.