Package com.arangodb
Interface ArangoDB
- All Superinterfaces:
ArangoSerdeAccessor
- All Known Implementing Classes:
ArangoDBImpl
Central access point for applications to communicate with an ArangoDB server.
Will be instantiated through ArangoDB.Builder
ArangoDB arango = new ArangoDB.Builder().build(); ArangoDB arango = new ArangoDB.Builder().host("127.0.0.1", 8529).build();
- Author:
- Mark Vollmary, Michele Rastelli
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Builder class to build an instance ofArangoDB
. -
Method Summary
Modifier and TypeMethodDescriptionasync()
createDatabase
(DBCreateOptions options) Creates a new database with the given name.createDatabase
(String name) Creates a new database with the given name.createUser
(String user, String passwd) Create a new user.createUser
(String user, String passwd, UserCreateOptions options) Create a new user.db()
Returns aArangoDatabase
instance for the_system
database.Returns aArangoDatabase
instance for the given database name.void
deleteUser
(String user) Removes an existing user, identified by user.<T> Response<T>
Execute custom requests.Retrieves a list of all databases the current user can accessList available database to the specified userRetrieves a list of all existing databasesReturns the server storage engine.getLogEntries
(LogOptions options) Returns the server logsReturns the server's current loglevel settings.getLogLevel
(LogLevelOptions options) Returns the server's current loglevel settings.getRole()
Returns the server role.Returns the id of a server in a cluster.Fetches data about the specified user.getUsers()
Fetches data about all users.Returns the server name and version number.void
grantDefaultCollectionAccess
(String user, Permissions permissions) Sets the default access level for collections for the useruser
.void
grantDefaultDatabaseAccess
(String user, Permissions permissions) Sets the default access level for databases for the useruser
.metrics()
replaceUser
(String user, UserUpdateOptions options) Replaces the data of an existing user.resetLogLevels
(LogLevelOptions options) Reset the server log levels Revert the server's log level settings to the values they had at startup, as determined by the startup options specified on the command-line, a configuration file, and the factory defaults.setLogLevel
(LogLevelEntity entity) Modifies and returns the server's current loglevel settings.setLogLevel
(LogLevelEntity entity, LogLevelOptions options) Modifies and returns the server's current loglevel settings.void
shutdown()
Releases all connections to the server and clear the connection pool.void
Updates the JWT used for requests authorization.updateUser
(String user, UserUpdateOptions options) Partially updates the data of an existing user.Methods inherited from interface com.arangodb.ArangoSerdeAccessor
getSerde
-
Method Details
-
async
ArangoDBAsync async()- Returns:
- the asynchronous version of this class
-
shutdown
void shutdown()Releases all connections to the server and clear the connection pool. -
updateJwt
Updates the JWT used for requests authorization. It does not change already existing VST connections, since VST connections are authenticated during the initialization phase.- Parameters:
jwt
- token to use
-
db
ArangoDatabase db()Returns aArangoDatabase
instance for the_system
database.- Returns:
- database handler
-
db
Returns aArangoDatabase
instance for the given database name.- Parameters:
name
- Name of the database- Returns:
- database handler
-
metrics
ArangoMetrics metrics()- Returns:
- entry point for accessing client metrics
-
createDatabase
Creates a new database with the given name.- Parameters:
name
- Name of the database to create- Returns:
- true if the database was created successfully.
- See Also:
-
createDatabase
Creates a new database with the given name.- Parameters:
options
- Creation options- Returns:
- true if the database was created successfully.
- Since:
- ArangoDB 3.6.0
- See Also:
-
getDatabases
Collection<String> getDatabases()Retrieves a list of all existing databases- Returns:
- a list of all existing databases
- See Also:
-
getAccessibleDatabases
Collection<String> getAccessibleDatabases()Retrieves a list of all databases the current user can access- Returns:
- a list of all databases the current user can access
- See Also:
-
getAccessibleDatabasesFor
List available database to the specified user- Parameters:
user
- The name of the user for which you want to query the databases- Returns:
- list of database names which are available for the specified user
- See Also:
-
getVersion
ArangoDBVersion getVersion()Returns the server name and version number.- Returns:
- the server version, number
- See Also:
-
getEngine
ArangoDBEngine getEngine()Returns the server storage engine.- Returns:
- the storage engine name
- See Also:
-
getRole
ServerRole getRole()Returns the server role.- Returns:
- the server role
- See Also:
-
getServerId
String getServerId()Returns the id of a server in a cluster.- Returns:
- the server id
- See Also:
-
createUser
Create a new user. This user will not have access to any database. You need permission to the _system database in order to execute this call.- Parameters:
user
- The name of the userpasswd
- The user password- Returns:
- information about the user
- See Also:
-
createUser
Create a new user. This user will not have access to any database. You need permission to the _system database in order to execute this call.- Parameters:
user
- The name of the userpasswd
- The user passwordoptions
- Additional options, can be null- Returns:
- information about the user
- See Also:
-
deleteUser
Removes an existing user, identified by user. You need access to the _system database.- Parameters:
user
- The name of the user- See Also:
-
getUser
Fetches data about the specified user. You can fetch information about yourself or you need permission to the _system database in order to execute this call.- Parameters:
user
- The name of the user- Returns:
- information about the user
- See Also:
-
getUsers
Collection<UserEntity> getUsers()Fetches data about all users. You can only execute this call if you have access to the _system database.- Returns:
- informations about all users
- See Also:
-
updateUser
Partially updates the data of an existing user. The name of an existing user must be specified in user. You can only change the password of your self. You need access to the _system database to change the active flag.- Parameters:
user
- The name of the useroptions
- Properties of the user to be changed- Returns:
- information about the user
- See Also:
-
replaceUser
Replaces the data of an existing user. The name of an existing user must be specified in user. You can only change the password of your self. You need access to the _system database to change the active flag.- Parameters:
user
- The name of the useroptions
- Additional properties of the user, can be null- Returns:
- information about the user
- See Also:
-
grantDefaultDatabaseAccess
Sets the default access level for databases for the useruser
. You need permission to the _system database in order to execute this call.- Parameters:
user
- The name of the userpermissions
- The permissions the user grant- Since:
- ArangoDB 3.2.0
- See Also:
-
grantDefaultCollectionAccess
Sets the default access level for collections for the useruser
. You need permission to the _system database in order to execute this call.- Parameters:
user
- The name of the userpermissions
- The permissions the user grant- Since:
- ArangoDB 3.2.0
- See Also:
-
execute
Execute custom requests. Requests can be programmatically built by setting low level detail such as method, path, query parameters, headers and body payload. This method can be used to call FOXX services, API endpoints not (yet) implemented in this driver or trigger async jobs, see Fire and Forget and Async Execution and later Result Retrieval- Parameters:
request
- requesttype
- Deserialization target type for the response body (POJO orRawData
)- Returns:
- response
-
getLogEntries
Returns the server logs- Parameters:
options
- Additional options, can be null- Returns:
- the log messages
- Since:
- ArangoDB 3.8
- See Also:
-
getLogLevel
LogLevelEntity getLogLevel()Returns the server's current loglevel settings.- Returns:
- the server's current loglevel settings
- Since:
- ArangoDB 3.1.0
- See Also:
-
getLogLevel
Returns the server's current loglevel settings.- Returns:
- the server's current loglevel settings
- Since:
- ArangoDB 3.10
- See Also:
-
setLogLevel
Modifies and returns the server's current loglevel settings.- Parameters:
entity
- loglevel settings- Returns:
- the server's current loglevel settings
- Since:
- ArangoDB 3.1.0
- See Also:
-
setLogLevel
Modifies and returns the server's current loglevel settings.- Parameters:
entity
- loglevel settings- Returns:
- the server's current loglevel settings
- Since:
- ArangoDB 3.10
- See Also:
-
resetLogLevels
Reset the server log levels Revert the server's log level settings to the values they had at startup, as determined by the startup options specified on the command-line, a configuration file, and the factory defaults.- Since:
- ArangoDB 3.12
-
getQueryOptimizerRules
Collection<QueryOptimizerRule> getQueryOptimizerRules()- Returns:
- the list of available rules and their respective flags
- Since:
- ArangoDB 3.10
- See Also:
-