public class ArangoDBAsyncImpl extends com.arangodb.internal.InternalArangoDB<ArangoExecutorAsync> implements ArangoDBAsync
ArangoDBAsync.Builder
Constructor and Description |
---|
ArangoDBAsyncImpl(VstCommunicationAsync.Builder asyncCommBuilder,
ArangoSerializationFactory util,
VstCommunicationSync.Builder syncCommBuilder,
HostResolver asyncHostResolver,
HostResolver syncHostResolver,
HostHandler asyncHostHandler,
HostHandler syncHostHandler,
com.arangodb.internal.ArangoContext context) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Boolean> |
createDatabase(DBCreateOptions options)
Creates a new database
|
CompletableFuture<Boolean> |
createDatabase(String 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(String name)
Returns a handler of the database by the given name
|
CompletableFuture<Void> |
deleteUser(String user)
Removes an existing user, identified by user.
|
CompletableFuture<Response> |
execute(Request request)
Generic Execute.
|
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<LogEntity> |
getLogs(LogOptions options)
Returns fatal, error, warning or info log messages from the server's global log.
|
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 . |
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, getAccessibleDatabasesForRequest, getAccessibleDatabasesForResponseDeserializer, getDatabaseResponseDeserializer, getDatabasesRequest, getLogEntriesRequest, getLogLevelRequest, getLogsRequest, getRoleRequest, getRoleResponseDeserializer, getServerIdRequest, getServerIdResponseDeserializer, getUserRequest, getUsersRequest, getUsersResponseDeserializer, replaceUserRequest, setLogLevelRequest, updateUserDefaultCollectionAccessRequest, updateUserDefaultDatabaseAccessRequest, updateUserRequest
createPath, request, util, util
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
util, util
public ArangoDBAsyncImpl(VstCommunicationAsync.Builder asyncCommBuilder, ArangoSerializationFactory util, VstCommunicationSync.Builder syncCommBuilder, HostResolver asyncHostResolver, HostResolver syncHostResolver, HostHandler asyncHostHandler, HostHandler syncHostHandler, com.arangodb.internal.ArangoContext context)
protected ArangoExecutorAsync executor()
executor
in class com.arangodb.internal.ArangoExecuteable<ArangoExecutorAsync>
public void shutdown() throws ArangoDBException
shutdown
in interface ArangoDBAsync
ArangoDBException
public void updateJwt(String jwt)
ArangoDBAsync
updateJwt
in interface ArangoDBAsync
jwt
- token to usepublic ArangoDatabaseAsync db()
ArangoDBAsync
db
in interface ArangoDBAsync
public ArangoDatabaseAsync db(String name)
ArangoDBAsync
db
in interface ArangoDBAsync
name
- Name of the databasepublic CompletableFuture<Boolean> createDatabase(String name)
ArangoDBAsync
createDatabase
in interface ArangoDBAsync
name
- Has to contain a valid 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 CompletableFuture<Response> execute(Request request)
ArangoDBAsync
execute
in interface ArangoDBAsync
request
- VelocyStream requestpublic CompletableFuture<LogEntity> getLogs(LogOptions options)
ArangoDBAsync
getLogs
in interface ArangoDBAsync
options
- Additional options, can be nullpublic 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 settingsCopyright © 2016–2021 ArangoDB GmbH. All rights reserved.