Package com.arangodb.internal
Class ArangoDBImpl
java.lang.Object
com.arangodb.internal.ArangoExecuteable
com.arangodb.internal.InternalArangoDB
com.arangodb.internal.ArangoDBImpl
- All Implemented Interfaces:
ArangoDB
,ArangoSerdeAccessor
- Author:
- Mark Vollmary, Heiko Kernbach, Michele Rastelli
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.arangodb.ArangoDB
ArangoDB.Builder
-
Constructor Summary
ConstructorsConstructorDescriptionArangoDBImpl
(ArangoConfig config, CommunicationProtocol protocol, HostHandler hostHandler) -
Method Summary
Modifier and TypeMethodDescriptionasync()
createDatabase
(DBCreateOptions options) Creates a new database with the given name.createDatabase
(String dbName) 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 class com.arangodb.internal.InternalArangoDB
createDatabaseRequest, createDatabaseResponseDeserializer, createUserRequest, deleteUserRequest, executeRequest, getAccessibleDatabasesForRequest, getAccessibleDatabasesForResponseDeserializer, getDatabaseResponseDeserializer, getDatabasesRequest, getLogEntriesRequest, getLogLevelRequest, getQueryOptimizerRulesRequest, getRoleRequest, getRoleResponseDeserializer, getServerIdRequest, getServerIdResponseDeserializer, getUserRequest, getUsersRequest, getUsersResponseDeserializer, replaceUserRequest, resetLogLevelsRequest, responseDeserializer, setLogLevelRequest, updateUserDefaultCollectionAccessRequest, updateUserDefaultDatabaseAccessRequest, updateUserRequest
Methods inherited from class com.arangodb.internal.ArangoExecuteable
createPath, executorAsync, executorSync, getSerde, request
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.arangodb.ArangoSerdeAccessor
getSerde
-
Constructor Details
-
ArangoDBImpl
-
-
Method Details
-
async
-
shutdown
public void shutdown()Description copied from interface:ArangoDB
Releases all connections to the server and clear the connection pool. -
updateJwt
Description copied from interface:ArangoDB
Updates the JWT used for requests authorization. It does not change already existing VST connections, since VST connections are authenticated during the initialization phase. -
db
Description copied from interface:ArangoDB
Returns aArangoDatabase
instance for the_system
database. -
db
Description copied from interface:ArangoDB
Returns aArangoDatabase
instance for the given database name. -
metrics
-
createDatabase
Description copied from interface:ArangoDB
Creates a new database with the given name.- Specified by:
createDatabase
in interfaceArangoDB
- Parameters:
dbName
- Name of the database to create- Returns:
- true if the database was created successfully.
- See Also:
-
createDatabase
Description copied from interface:ArangoDB
Creates a new database with the given name.- Specified by:
createDatabase
in interfaceArangoDB
- Parameters:
options
- Creation options- Returns:
- true if the database was created successfully.
- See Also:
-
getDatabases
Description copied from interface:ArangoDB
Retrieves a list of all existing databases- Specified by:
getDatabases
in interfaceArangoDB
- Returns:
- a list of all existing databases
- See Also:
-
getAccessibleDatabases
Description copied from interface:ArangoDB
Retrieves a list of all databases the current user can access- Specified by:
getAccessibleDatabases
in interfaceArangoDB
- Returns:
- a list of all databases the current user can access
- See Also:
-
getAccessibleDatabasesFor
Description copied from interface:ArangoDB
List available database to the specified user- Specified by:
getAccessibleDatabasesFor
in interfaceArangoDB
- 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
Description copied from interface:ArangoDB
Returns the server name and version number.- Specified by:
getVersion
in interfaceArangoDB
- Returns:
- the server version, number
- See Also:
-
getEngine
Description copied from interface:ArangoDB
Returns the server storage engine. -
getRole
Description copied from interface:ArangoDB
Returns the server role. -
getServerId
Description copied from interface:ArangoDB
Returns the id of a server in a cluster.- Specified by:
getServerId
in interfaceArangoDB
- Returns:
- the server id
- See Also:
-
createUser
Description copied from interface:ArangoDB
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.- Specified by:
createUser
in interfaceArangoDB
- Parameters:
user
- The name of the userpasswd
- The user password- Returns:
- information about the user
- See Also:
-
createUser
Description copied from interface:ArangoDB
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.- Specified by:
createUser
in interfaceArangoDB
- Parameters:
user
- The name of the userpasswd
- The user passwordoptions
- Additional options, can be null- Returns:
- information about the user
- See Also:
-
deleteUser
Description copied from interface:ArangoDB
Removes an existing user, identified by user. You need access to the _system database.- Specified by:
deleteUser
in interfaceArangoDB
- Parameters:
user
- The name of the user- See Also:
-
getUser
Description copied from interface:ArangoDB
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. -
getUsers
Description copied from interface:ArangoDB
Fetches data about all users. You can only execute this call if you have access to the _system database. -
updateUser
Description copied from interface:ArangoDB
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.- Specified by:
updateUser
in interfaceArangoDB
- Parameters:
user
- The name of the useroptions
- Properties of the user to be changed- Returns:
- information about the user
- See Also:
-
replaceUser
Description copied from interface:ArangoDB
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.- Specified by:
replaceUser
in interfaceArangoDB
- Parameters:
user
- The name of the useroptions
- Additional properties of the user, can be null- Returns:
- information about the user
- See Also:
-
grantDefaultDatabaseAccess
Description copied from interface:ArangoDB
Sets the default access level for databases for the useruser
. You need permission to the _system database in order to execute this call.- Specified by:
grantDefaultDatabaseAccess
in interfaceArangoDB
- Parameters:
user
- The name of the userpermissions
- The permissions the user grant- See Also:
-
grantDefaultCollectionAccess
Description copied from interface:ArangoDB
Sets the default access level for collections for the useruser
. You need permission to the _system database in order to execute this call.- Specified by:
grantDefaultCollectionAccess
in interfaceArangoDB
- Parameters:
user
- The name of the userpermissions
- The permissions the user grant- See Also:
-
execute
Description copied from interface:ArangoDB
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 -
getLogEntries
Description copied from interface:ArangoDB
Returns the server logs- Specified by:
getLogEntries
in interfaceArangoDB
- Parameters:
options
- Additional options, can be null- Returns:
- the log messages
- See Also:
-
getLogLevel
Description copied from interface:ArangoDB
Returns the server's current loglevel settings.- Specified by:
getLogLevel
in interfaceArangoDB
- Returns:
- the server's current loglevel settings
- See Also:
-
getLogLevel
Description copied from interface:ArangoDB
Returns the server's current loglevel settings.- Specified by:
getLogLevel
in interfaceArangoDB
- Returns:
- the server's current loglevel settings
- See Also:
-
setLogLevel
Description copied from interface:ArangoDB
Modifies and returns the server's current loglevel settings.- Specified by:
setLogLevel
in interfaceArangoDB
- Parameters:
entity
- loglevel settings- Returns:
- the server's current loglevel settings
- See Also:
-
setLogLevel
Description copied from interface:ArangoDB
Modifies and returns the server's current loglevel settings.- Specified by:
setLogLevel
in interfaceArangoDB
- Parameters:
entity
- loglevel settings- Returns:
- the server's current loglevel settings
- See Also:
-
resetLogLevels
Description copied from interface:ArangoDB
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.- Specified by:
resetLogLevels
in interfaceArangoDB
-
getQueryOptimizerRules
- Specified by:
getQueryOptimizerRules
in interfaceArangoDB
- Returns:
- the list of available rules and their respective flags
- See Also:
-