public interface OrientDBInternal extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the factory with all related databases and pools.
|
void |
create(String name,
String user,
String password,
ODatabaseType type)
Create a new database
|
void |
create(String name,
String user,
String password,
ODatabaseType type,
OrientDBConfig config)
Create a new database
|
static OrientDBInternal |
distributed(String directoryPath,
OrientDBConfig configuration) |
void |
drop(String name,
String user,
String password)
Drop a database
|
static OrientDBInternal |
embedded(String directoryPath,
OrientDBConfig config)
Create a new Embedded factory
|
boolean |
exists(String name,
String user,
String password)
Check if a database exists
|
static OrientDBInternal |
extract(OrientDB orientDB) |
void |
forceDatabaseClose(String databaseName) |
static OrientDBInternal |
fromUrl(String url,
OrientDBConfig configuration)
Create a new factory from a given url.
|
default OStorage |
fullSync(String dbName,
String backupPath,
OrientDBConfig config) |
OEmbeddedDatabaseInstanceFactory |
getFactory() |
Collection<OStorage> |
getStorages() |
void |
initCustomStorage(String name,
String baseUrl,
String userName,
String userPassword) |
void |
internalClose()
Should be called only by shutdown listeners
|
boolean |
isEmbedded() |
boolean |
isOpen()
Check if the current instance is open
|
Set<String> |
listDatabases(String user,
String password)
List of database exiting in the current environment
|
void |
loadAllDatabases() |
default OrientDB |
newOrientDB() |
ODatabaseDocumentInternal |
open(String name,
String user,
String password)
Open a database specified by name using the username and password if needed
|
ODatabaseDocumentInternal |
open(String name,
String user,
String password,
OrientDBConfig config)
Open a database specified by name using the username and password if needed, with specific configuration
|
ODatabaseDocumentInternal |
openNoAuthenticate(String iDbUrl,
String user) |
ODatabaseDocumentInternal |
openNoAuthorization(String name) |
ODatabasePoolInternal |
openPool(String name,
String user,
String password)
Open a pool of databases, similar to open but with multiple instances.
|
ODatabasePoolInternal |
openPool(String name,
String user,
String password,
OrientDBConfig config)
Open a pool of databases, similar to open but with multiple instances.
|
ODatabaseDocumentInternal |
poolOpen(String name,
String user,
String password,
ODatabasePoolInternal pool)
Internal api for request to open a database with a pool
|
static OrientDBInternal |
remote(String[] hosts,
OrientDBConfig configuration)
Create a new remote factory
|
void |
removePool(ODatabasePoolInternal toRemove)
Internal API for pool close
|
void |
removeShutdownHook() |
void |
replaceFactory(OEmbeddedDatabaseInstanceFactory instanceFactory) |
void |
restore(String name,
InputStream in,
Map<String,Object> options,
Callable<Object> callable,
OCommandOutputListener iListener) |
void |
restore(String name,
String user,
String password,
ODatabaseType type,
String path,
OrientDBConfig config) |
static OrientDBInternal fromUrl(String url, OrientDBConfig configuration)
url
- the url for the specific factory.configuration
- configuration for the specific factory for the list of option OGlobalConfiguration
.default OrientDB newOrientDB()
static OrientDBInternal remote(String[] hosts, OrientDBConfig configuration)
hosts
- array of hostsconfiguration
- configuration for the specific factory for the list of option OGlobalConfiguration
.static OrientDBInternal embedded(String directoryPath, OrientDBConfig config)
directoryPath
- base path where the database are hostedconfig
- configuration for the specific factory for the list of option OGlobalConfiguration
static OrientDBInternal distributed(String directoryPath, OrientDBConfig configuration)
ODatabaseDocumentInternal open(String name, String user, String password)
name
- of the database to openuser
- the username allowed to open the databasepassword
- related to the specified usernameODatabaseDocumentInternal open(String name, String user, String password, OrientDBConfig config)
name
- of the database to openuser
- the username allowed to open the databasepassword
- related to the specified usernameconfig
- database specific configuration that override the factory global settings where needed.void create(String name, String user, String password, ODatabaseType type)
name
- database nameuser
- the username of a user allowed to create a database, in case of remote is a server user for embedded it can be
left emptypassword
- the password relative to the usertype
- can be plocal or memoryvoid create(String name, String user, String password, ODatabaseType type, OrientDBConfig config)
name
- database nameuser
- the username of a user allowed to create a database, in case of remote is a server user for embedded it can be
left emptypassword
- the password relative to the userconfig
- database specific configuration that override the factory global settings where needed.type
- can be plocal or memoryboolean exists(String name, String user, String password)
name
- database name to checkuser
- the username of a user allowed to check the database existence, in case of remote is a server user for embedded
it can be left empty.password
- the password relative to the uservoid drop(String name, String user, String password)
name
- database nameuser
- the username of a user allowed to drop a database, in case of remote is a server user for embedded it can be
left emptypassword
- the password relative to the userSet<String> listDatabases(String user, String password)
user
- the username of a user allowed to list databases, in case of remote is a server user for embedded it can be
left emptypassword
- the password relative to the userODatabasePoolInternal openPool(String name, String user, String password)
name
- database nameuser
- the username allowed to open the databasepassword
- the password relative to the userODatabasePoolInternal openPool(String name, String user, String password, OrientDBConfig config)
name
- database nameuser
- the username allowed to open the databasepassword
- the password relative to the userconfig
- database specific configuration that override the factory global settings where needed.ODatabaseDocumentInternal poolOpen(String name, String user, String password, ODatabasePoolInternal pool)
void restore(String name, String user, String password, ODatabaseType type, String path, OrientDBConfig config)
void restore(String name, InputStream in, Map<String,Object> options, Callable<Object> callable, OCommandOutputListener iListener)
void close()
close
in interface AutoCloseable
void internalClose()
void removePool(ODatabasePoolInternal toRemove)
boolean isOpen()
boolean isEmbedded()
static OrientDBInternal extract(OrientDB orientDB)
ODatabaseDocumentInternal openNoAuthenticate(String iDbUrl, String user)
ODatabaseDocumentInternal openNoAuthorization(String name)
void initCustomStorage(String name, String baseUrl, String userName, String userPassword)
void loadAllDatabases()
void removeShutdownHook()
Collection<OStorage> getStorages()
void forceDatabaseClose(String databaseName)
void replaceFactory(OEmbeddedDatabaseInstanceFactory instanceFactory)
OEmbeddedDatabaseInstanceFactory getFactory()
default OStorage fullSync(String dbName, String backupPath, OrientDBConfig config)
Copyright © 2009–2019 OrientDB. All rights reserved.