public class ArangoDBImpl extends InternalArangoDB<ArangoExecutorSync> implements ArangoDB
ArangoDB.Builder
executor, serde
Constructor and Description |
---|
ArangoDBImpl(com.arangodb.internal.velocystream.VstCommunicationSync.Builder vstBuilder,
com.arangodb.internal.http.HttpCommunication.Builder httpBuilder,
com.arangodb.internal.serde.InternalSerde util,
Protocol protocol,
com.arangodb.internal.net.HostResolver hostResolver,
com.arangodb.internal.net.HostHandler hostHandler,
int responseQueueTimeSamples,
int timeoutMs) |
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.
|
protected ArangoExecutorSync |
executor() |
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.
|
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 ArangoDBImpl(com.arangodb.internal.velocystream.VstCommunicationSync.Builder vstBuilder, com.arangodb.internal.http.HttpCommunication.Builder httpBuilder, com.arangodb.internal.serde.InternalSerde util, Protocol protocol, com.arangodb.internal.net.HostResolver hostResolver, com.arangodb.internal.net.HostHandler hostHandler, int responseQueueTimeSamples, int timeoutMs)
protected ArangoExecutorSync executor()
executor
in class ArangoExecuteable<ArangoExecutorSync>
public void shutdown()
ArangoDB
public void updateJwt(String jwt)
ArangoDB
public ArangoDatabase db()
ArangoDB
ArangoDatabase
instance for the _system
database.public ArangoDatabase db(DbName dbName)
ArangoDB
ArangoDatabase
instance for the given database name.public ArangoMetrics metrics()
public Boolean createDatabase(DbName dbName)
ArangoDB
createDatabase
in interface ArangoDB
dbName
- Name of the database to createpublic Boolean createDatabase(DBCreateOptions options)
ArangoDB
createDatabase
in interface ArangoDB
options
- Creation optionspublic Collection<String> getDatabases()
ArangoDB
getDatabases
in interface ArangoDB
public Collection<String> getAccessibleDatabases()
ArangoDB
getAccessibleDatabases
in interface ArangoDB
public Collection<String> getAccessibleDatabasesFor(String user)
ArangoDB
getAccessibleDatabasesFor
in interface ArangoDB
user
- The name of the user for which you want to query the databasespublic ArangoDBVersion getVersion()
ArangoDB
getVersion
in interface ArangoDB
public ArangoDBEngine getEngine()
ArangoDB
getEngine
in interface ArangoDB
public ServerRole getRole()
ArangoDB
public String getServerId()
ArangoDB
getServerId
in interface ArangoDB
public UserEntity createUser(String user, String passwd)
ArangoDB
createUser
in interface ArangoDB
user
- The name of the userpasswd
- The user passwordpublic UserEntity createUser(String user, String passwd, UserCreateOptions options)
ArangoDB
createUser
in interface ArangoDB
user
- The name of the userpasswd
- The user passwordoptions
- Additional options, can be nullpublic void deleteUser(String user)
ArangoDB
deleteUser
in interface ArangoDB
user
- The name of the userpublic UserEntity getUser(String user)
ArangoDB
getUser
in interface ArangoDB
user
- The name of the userpublic Collection<UserEntity> getUsers()
ArangoDB
getUsers
in interface ArangoDB
public UserEntity updateUser(String user, UserUpdateOptions options)
ArangoDB
updateUser
in interface ArangoDB
user
- The name of the useroptions
- Properties of the user to be changedpublic UserEntity replaceUser(String user, UserUpdateOptions options)
ArangoDB
replaceUser
in interface ArangoDB
user
- The name of the useroptions
- Additional properties of the user, can be nullpublic void grantDefaultDatabaseAccess(String user, Permissions permissions)
ArangoDB
user
. You need permission to the _system
database in order to execute this call.grantDefaultDatabaseAccess
in interface ArangoDB
user
- The name of the userpermissions
- The permissions the user grantpublic void grantDefaultCollectionAccess(String user, Permissions permissions)
ArangoDB
user
. You need permission to the _system
database in order to execute this call.grantDefaultCollectionAccess
in interface ArangoDB
user
- The name of the userpermissions
- The permissions the user grantpublic <T,U> Response<U> execute(Request<T> request, Class<U> type)
ArangoDB
public LogEntriesEntity getLogEntries(LogOptions options)
ArangoDB
getLogEntries
in interface ArangoDB
options
- Additional options, can be nullpublic LogLevelEntity getLogLevel()
ArangoDB
getLogLevel
in interface ArangoDB
public LogLevelEntity setLogLevel(LogLevelEntity entity)
ArangoDB
setLogLevel
in interface ArangoDB
entity
- loglevel settingspublic Collection<QueryOptimizerRule> getQueryOptimizerRules()
getQueryOptimizerRules
in interface ArangoDB
Copyright © 2016–2023 ArangoDB GmbH. All rights reserved.