public class ArangoDBAsyncImpl extends InternalArangoDB<ArangoExecutorAsync> implements ArangoDBAsync
ArangoDBAsync.Builder
executor, serde
Constructor and Description |
---|
ArangoDBAsyncImpl(com.arangodb.async.internal.velocystream.VstCommunicationAsync.Builder asyncCommBuilder,
com.arangodb.internal.serde.InternalSerde util,
com.arangodb.internal.velocystream.VstCommunicationSync.Builder syncCommBuilder,
com.arangodb.internal.net.HostResolver asyncHostResolver,
com.arangodb.internal.net.HostResolver syncHostResolver,
com.arangodb.internal.net.HostHandler asyncHostHandler,
com.arangodb.internal.net.HostHandler syncHostHandler,
int responseQueueTimeSamples,
int timeoutMs) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Boolean> |
createDatabase(DBCreateOptions options)
Creates a new database
|
CompletableFuture<Boolean> |
createDatabase(DbName name)
Creates a new database
|
CompletableFuture<UserEntity> |
createUser(String user,
String passwd)
Create a new user.
|
CompletableFuture<UserEntity> |
createUser(String user,
String passwd,
UserCreateOptions options)
Create a new user.
|
ArangoDatabaseAsync |
db()
Returns a handler of the system database
|
ArangoDatabaseAsync |
db(DbName name)
Returns a handler of the database by the given name
|
CompletableFuture<Void> |
deleteUser(String user)
Removes an existing user, identified by user.
|
<T,U> CompletableFuture<Response<U>> |
execute(Request<T> request,
Class<U> type)
Execute custom requests.
|
protected ArangoExecutorAsync |
executor() |
CompletableFuture<Collection<String>> |
getAccessibleDatabases()
Retrieves a list of all databases the current user can access
|
CompletableFuture<Collection<String>> |
getAccessibleDatabasesFor(String user)
List available database to the specified user
|
CompletableFuture<Collection<String>> |
getDatabases()
Retrieves a list of all existing databases
|
CompletableFuture<LogEntriesEntity> |
getLogEntries(LogOptions options)
Returns the server logs
|
CompletableFuture<LogLevelEntity> |
getLogLevel()
Returns the server's current loglevel settings.
|
CompletableFuture<Collection<QueryOptimizerRule>> |
getQueryOptimizerRules() |
CompletableFuture<ServerRole> |
getRole()
Returns the server role.
|
CompletableFuture<UserEntity> |
getUser(String user)
Fetches data about the specified user.
|
CompletableFuture<Collection<UserEntity>> |
getUsers()
Fetches data about all users.
|
CompletableFuture<ArangoDBVersion> |
getVersion()
Returns the server name and version number.
|
CompletableFuture<Void> |
grantDefaultCollectionAccess(String user,
Permissions permissions)
Sets the default access level for collections for the user
user . |
CompletableFuture<Void> |
grantDefaultDatabaseAccess(String user,
Permissions permissions)
Sets the default access level for databases for the user
user . |
ArangoMetrics |
metrics() |
CompletableFuture<UserEntity> |
replaceUser(String user,
UserUpdateOptions options)
Replaces the data of an existing user.
|
CompletableFuture<LogLevelEntity> |
setLogLevel(LogLevelEntity entity)
Modifies and returns the server's current loglevel settings.
|
void |
shutdown() |
void |
updateJwt(String jwt)
Updates the JWT used for requests authorization.
|
CompletableFuture<UserEntity> |
updateUser(String user,
UserUpdateOptions options)
Partially updates the data of an existing user.
|
createDatabaseRequest, createDatabaseResponseDeserializer, createUserRequest, deleteUserRequest, executeRequest, getAccessibleDatabasesForRequest, getAccessibleDatabasesForResponseDeserializer, getDatabaseResponseDeserializer, getDatabasesRequest, getLogEntriesRequest, getLogLevelRequest, getQueryOptimizerRulesRequest, getRoleRequest, getRoleResponseDeserializer, getServerIdRequest, getServerIdResponseDeserializer, getUserRequest, getUsersRequest, getUsersResponseDeserializer, replaceUserRequest, responseDeserializer, setLogLevelRequest, updateUserDefaultCollectionAccessRequest, updateUserDefaultDatabaseAccessRequest, updateUserRequest
createPath, getSerde, request
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSerde
public ArangoDBAsyncImpl(com.arangodb.async.internal.velocystream.VstCommunicationAsync.Builder asyncCommBuilder, com.arangodb.internal.serde.InternalSerde util, com.arangodb.internal.velocystream.VstCommunicationSync.Builder syncCommBuilder, com.arangodb.internal.net.HostResolver asyncHostResolver, com.arangodb.internal.net.HostResolver syncHostResolver, com.arangodb.internal.net.HostHandler asyncHostHandler, com.arangodb.internal.net.HostHandler syncHostHandler, int responseQueueTimeSamples, int timeoutMs)
protected ArangoExecutorAsync executor()
executor
in class ArangoExecuteable<ArangoExecutorAsync>
public void shutdown()
shutdown
in interface ArangoDBAsync
public void updateJwt(String jwt)
ArangoDBAsync
updateJwt
in interface ArangoDBAsync
jwt
- token to usepublic ArangoDatabaseAsync db()
ArangoDBAsync
db
in interface ArangoDBAsync
public ArangoDatabaseAsync db(DbName name)
ArangoDBAsync
db
in interface ArangoDBAsync
name
- Name of the databasepublic ArangoMetrics metrics()
metrics
in interface ArangoDBAsync
public CompletableFuture<Boolean> createDatabase(DbName name)
ArangoDBAsync
createDatabase
in interface ArangoDBAsync
name
- database namepublic CompletableFuture<Boolean> createDatabase(DBCreateOptions options)
ArangoDBAsync
createDatabase
in interface ArangoDBAsync
options
- Creation optionspublic CompletableFuture<Collection<String>> getDatabases()
ArangoDBAsync
getDatabases
in interface ArangoDBAsync
public CompletableFuture<Collection<String>> getAccessibleDatabases()
ArangoDBAsync
getAccessibleDatabases
in interface ArangoDBAsync
public CompletableFuture<Collection<String>> getAccessibleDatabasesFor(String user)
ArangoDBAsync
getAccessibleDatabasesFor
in interface ArangoDBAsync
user
- The name of the user for which you want to query the databasespublic CompletableFuture<ArangoDBVersion> getVersion()
ArangoDBAsync
getVersion
in interface ArangoDBAsync
public CompletableFuture<ServerRole> getRole()
ArangoDBAsync
getRole
in interface ArangoDBAsync
public CompletableFuture<UserEntity> createUser(String user, String passwd)
ArangoDBAsync
createUser
in interface ArangoDBAsync
user
- The name of the userpasswd
- The user passwordpublic CompletableFuture<UserEntity> createUser(String user, String passwd, UserCreateOptions options)
ArangoDBAsync
createUser
in interface ArangoDBAsync
user
- The name of the userpasswd
- The user passwordoptions
- Additional properties of the user, can be nullpublic CompletableFuture<Void> deleteUser(String user)
ArangoDBAsync
deleteUser
in interface ArangoDBAsync
user
- The name of the userpublic CompletableFuture<UserEntity> getUser(String user)
ArangoDBAsync
getUser
in interface ArangoDBAsync
user
- The name of the userpublic CompletableFuture<Collection<UserEntity>> getUsers()
ArangoDBAsync
getUsers
in interface ArangoDBAsync
public CompletableFuture<UserEntity> updateUser(String user, UserUpdateOptions options)
ArangoDBAsync
updateUser
in interface ArangoDBAsync
user
- The name of the useroptions
- Properties of the user to be changedpublic CompletableFuture<UserEntity> replaceUser(String user, UserUpdateOptions options)
ArangoDBAsync
replaceUser
in interface ArangoDBAsync
user
- The name of the useroptions
- Additional properties of the user, can be nullpublic CompletableFuture<Void> grantDefaultDatabaseAccess(String user, Permissions permissions)
ArangoDBAsync
user
. You need permission to the _system
database in order to execute this call.grantDefaultDatabaseAccess
in interface ArangoDBAsync
user
- The name of the userpermissions
- The permissions the user grantpublic CompletableFuture<Void> grantDefaultCollectionAccess(String user, Permissions permissions)
ArangoDBAsync
user
. You need permission to the _system
database in order to execute this call.grantDefaultCollectionAccess
in interface ArangoDBAsync
user
- The name of the userpermissions
- The permissions the user grantpublic <T,U> CompletableFuture<Response<U>> execute(Request<T> request, Class<U> type)
ArangoDBAsync
execute
in interface ArangoDBAsync
request
- requesttype
- Deserialization target type for the response body (POJO or RawData
)public CompletableFuture<LogEntriesEntity> getLogEntries(LogOptions options)
ArangoDBAsync
getLogEntries
in interface ArangoDBAsync
options
- Additional options, can be nullpublic CompletableFuture<LogLevelEntity> getLogLevel()
ArangoDBAsync
getLogLevel
in interface ArangoDBAsync
public CompletableFuture<LogLevelEntity> setLogLevel(LogLevelEntity entity)
ArangoDBAsync
setLogLevel
in interface ArangoDBAsync
entity
- loglevel settingspublic CompletableFuture<Collection<QueryOptimizerRule>> getQueryOptimizerRules()
getQueryOptimizerRules
in interface ArangoDBAsync
Copyright © 2016–2023 ArangoDB GmbH. All rights reserved.