@ThreadSafe public interface ArangoDB extends ArangoSerdeAccessor
Will be instantiated through ArangoDB.Builder
ArangoDB arango = new ArangoDB.Builder().build(); ArangoDB arango = new ArangoDB.Builder().host("127.0.0.1", 8529).build();
Modifier and Type | Interface and Description |
---|---|
static class |
ArangoDB.Builder
Builder class to build an instance of
ArangoDB . |
Modifier and Type | Method and Description |
---|---|
Boolean |
createDatabase(DBCreateOptions options)
Creates a new database with the given name.
|
Boolean |
createDatabase(DbName dbName)
Creates a new database with the given name.
|
UserEntity |
createUser(String user,
String passwd)
Create a new user.
|
UserEntity |
createUser(String user,
String passwd,
UserCreateOptions options)
Create a new user.
|
ArangoDatabase |
db()
Returns a
ArangoDatabase instance for the _system database. |
ArangoDatabase |
db(DbName dbName)
Returns a
ArangoDatabase instance for the given database name. |
void |
deleteUser(String user)
Removes an existing user, identified by user.
|
<T,U> Response<U> |
execute(Request<T> request,
Class<U> type)
Execute custom requests.
|
Collection<String> |
getAccessibleDatabases()
Retrieves a list of all databases the current user can access
|
Collection<String> |
getAccessibleDatabasesFor(String user)
List available database to the specified user
|
Collection<String> |
getDatabases()
Retrieves a list of all existing databases
|
ArangoDBEngine |
getEngine()
Returns the server storage engine.
|
LogEntriesEntity |
getLogEntries(LogOptions options)
Returns the server logs
|
LogLevelEntity |
getLogLevel()
Returns the server's current loglevel settings.
|
Collection<QueryOptimizerRule> |
getQueryOptimizerRules() |
ServerRole |
getRole()
Returns the server role.
|
String |
getServerId()
Returns the id of a server in a cluster.
|
UserEntity |
getUser(String user)
Fetches data about the specified user.
|
Collection<UserEntity> |
getUsers()
Fetches data about all users.
|
ArangoDBVersion |
getVersion()
Returns the server name and version number.
|
void |
grantDefaultCollectionAccess(String user,
Permissions permissions)
Sets the default access level for collections for the user
user . |
void |
grantDefaultDatabaseAccess(String user,
Permissions permissions)
Sets the default access level for databases for the user
user . |
ArangoMetrics |
metrics() |
UserEntity |
replaceUser(String user,
UserUpdateOptions options)
Replaces the data of an existing user.
|
LogLevelEntity |
setLogLevel(LogLevelEntity entity)
Modifies and returns the server's current loglevel settings.
|
void |
shutdown()
Releases all connections to the server and clear the connection pool.
|
void |
updateJwt(String jwt)
Updates the JWT used for requests authorization.
|
UserEntity |
updateUser(String user,
UserUpdateOptions options)
Partially updates the data of an existing user.
|
getSerde
void shutdown()
void updateJwt(String jwt)
jwt
- token to useArangoDatabase db()
ArangoDatabase
instance for the _system
database.ArangoDatabase db(DbName dbName)
ArangoDatabase
instance for the given database name.dbName
- Name of the databaseArangoMetrics metrics()
Boolean createDatabase(DbName dbName)
dbName
- Name of the database to createBoolean createDatabase(DBCreateOptions options)
options
- Creation optionsCollection<String> getDatabases()
Collection<String> getAccessibleDatabases()
Collection<String> getAccessibleDatabasesFor(String user)
user
- The name of the user for which you want to query the databasesArangoDBVersion getVersion()
ArangoDBEngine getEngine()
ServerRole getRole()
String getServerId()
UserEntity createUser(String user, String passwd)
user
- The name of the userpasswd
- The user passwordUserEntity createUser(String user, String passwd, UserCreateOptions options)
user
- The name of the userpasswd
- The user passwordoptions
- Additional options, can be nullvoid deleteUser(String user)
user
- The name of the userUserEntity getUser(String user)
user
- The name of the userCollection<UserEntity> getUsers()
UserEntity updateUser(String user, UserUpdateOptions options)
user
- The name of the useroptions
- Properties of the user to be changedUserEntity replaceUser(String user, UserUpdateOptions options)
user
- The name of the useroptions
- Additional properties of the user, can be nullvoid grantDefaultDatabaseAccess(String user, Permissions permissions)
user
. You need permission to the _system
database in order to execute this call.user
- The name of the userpermissions
- The permissions the user grantvoid grantDefaultCollectionAccess(String user, Permissions permissions)
user
. You need permission to the _system
database in order to execute this call.user
- The name of the userpermissions
- The permissions the user grant<T,U> Response<U> execute(Request<T> request, Class<U> type)
request
- requesttype
- Deserialization target type for the response body (POJO or RawData
)LogEntriesEntity getLogEntries(LogOptions options)
options
- Additional options, can be nullLogLevelEntity getLogLevel()
LogLevelEntity setLogLevel(LogLevelEntity entity)
entity
- loglevel settingsCollection<QueryOptimizerRule> getQueryOptimizerRules()
Copyright © 2016–2023 ArangoDB GmbH. All rights reserved.