Interface OrientDBInternal
- All Superinterfaces:
AutoCloseable,OSchedulerInternal
- All Known Implementing Classes:
OrientDBDistributed,OrientDBEmbedded,OrientDBRemote
Created by tglman on 27/03/16.
-
Method Summary
Modifier and TypeMethodDescriptioncachedPool(String database, String user, String password) cachedPool(String database, String user, String password, OrientDBConfig config) voidclose()Close the factory with all related databases and pools.voidcreate(String name, String user, String password, ODatabaseType type) Create a new databasevoidcreate(String name, String user, String password, ODatabaseType type, OrientDBConfig config) Create a new databasevoidcreate(String name, String user, String password, ODatabaseType type, OrientDBConfig config, ODatabaseTask<Void> createOps) default booleandeltaSync(String dbName, InputStream backupStream, OrientDBConfig config) static OrientDBInternaldistributed(String directoryPath, OrientDBConfig configuration) default voiddistributedSetOnline(String database) voidDrop a databasestatic OrientDBInternalembedded(String directoryPath, OrientDBConfig config) Create a new Embedded factorydefault voidFuture<?><X> Future<X>execute(String database, String user, ODatabaseTask<X> task) <X> Future<X><X> Future<X>executeNoAuthorization(String database, ODatabaseTask<X> task) default OResultSetexecuteServerStatement(String script, String user, String pw, Object... params) default OResultSetbooleanCheck if a database existsstatic OrientDBInternalstatic StringextractUser(OrientDB orientDB) voidforceDatabaseClose(String databaseName) static OrientDBInternalfromUrl(String url, OrientDBConfig configuration) Create a new factory from a given url.default voidfullSync(String dbName, InputStream backupStream, OrientDBConfig config) default Stringdefault OScriptManagerdefault OSystemDatabasevoidinitCustomStorage(String name, String baseUrl, String userName, String userPassword) voidShould be called only by shutdown listenersvoidinternalDrop(String database) booleandefault booleanbooleanisOpen()Check if the current instance is openlistDatabases(String user, String password) List of database exiting in the current environmentvoiddefault voidnetworkRestore(String databaseName, InputStream in, Callable<Object> callback) default ONetworkMessagedefault OrientDBdefault OrientDBopen(OAuthenticationInfo authenticationInfo, OrientDBConfig config) Open a database specified by name using the authentication info provided, with specific configurationOpen a database specified by name using the username and password if neededopen(String name, String user, String password, OrientDBConfig config) Open a database specified by name using the username and password if needed, with specific configurationopenNoAuthenticate(String iDbUrl, String user) openNoAuthorization(String name) Open a pool of databases, similar to open but with multiple instances.openPool(String name, String user, String password, OrientDBConfig config) Open a pool of databases, similar to open but with multiple instances.poolOpen(String name, String user, String password, ODatabasePoolInternal pool) Internal api for request to open a database with a poolstatic OrientDBInternalremote(String[] hosts, OrientDBConfig configuration) Create a new remote factoryvoidremovePool(ODatabasePoolInternal toRemove) Internal API for pool closevoidvoidrestore(String name, InputStream in, Map<String, Object> options, Callable<Object> callable, OCommandOutputListener iListener) voidrestore(String name, String user, String password, ODatabaseType type, String path, OrientDBConfig config) default voidstartCommand(Optional<Long> timeout) Methods inherited from interface com.orientechnologies.orient.core.db.OSchedulerInternal
schedule, scheduleOnce
-
Method Details
-
fromUrl
Create a new factory from a given url.possible kind of urls 'embedded','remote', for the case of remote and distributed can be specified multiple nodes using comma.
- Parameters:
url- the url for the specific factory.configuration- configuration for the specific factory for the list of option .- Returns:
- the new Orient Factory.
-
newOrientDB
-
newOrientDBNoClose
-
remote
Create a new remote factory- Parameters:
hosts- array of hostsconfiguration- configuration for the specific factory for the list of option .- Returns:
- a new remote databases factory
-
embedded
Create a new Embedded factory- Parameters:
directoryPath- base path where the database are hostedconfig- configuration for the specific factory for the list of option- Returns:
- a new embedded databases factory
-
distributed
-
open
Open a database specified by name using the username and password if needed- Parameters:
name- of the database to openuser- the username allowed to open the databasepassword- related to the specified username- Returns:
- the opened database
-
open
Open a database specified by name using the username and password if needed, with specific configuration- Parameters:
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.- Returns:
- the opened database
-
open
Open a database specified by name using the authentication info provided, with specific configuration- Parameters:
authenticationInfo- authentication informations provided for the authentication.config- database specific configuration that override the factory global settings where needed.- Returns:
- the opened database
-
create
Create a new database- Parameters:
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 memory
-
create
Create a new database- Parameters:
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 memory
-
exists
Check if a database exists- Parameters:
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 user- Returns:
- boolean true if exist false otherwise.
-
drop
Drop a database- Parameters:
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 user
-
listDatabases
List of database exiting in the current environment- Parameters:
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 user- Returns:
- a set of databases names.
-
openPool
Open a pool of databases, similar to open but with multiple instances.- Parameters:
name- database nameuser- the username allowed to open the databasepassword- the password relative to the user- Returns:
- a new pool of databases.
-
openPool
Open a pool of databases, similar to open but with multiple instances.- Parameters:
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.- Returns:
- a new pool of databases.
-
cachedPool
-
cachedPool
ODatabasePoolInternal cachedPool(String database, String user, String password, OrientDBConfig config) -
poolOpen
ODatabaseDocumentInternal poolOpen(String name, String user, String password, ODatabasePoolInternal pool) Internal api for request to open a database with a pool -
restore
void restore(String name, String user, String password, ODatabaseType type, String path, OrientDBConfig config) -
restore
void restore(String name, InputStream in, Map<String, Object> options, Callable<Object> callable, OCommandOutputListener iListener) -
close
void close()Close the factory with all related databases and pools.- Specified by:
closein interfaceAutoCloseable
-
internalClose
void internalClose()Should be called only by shutdown listeners -
removePool
Internal API for pool close -
isOpen
boolean isOpen()Check if the current instance is open -
isEmbedded
boolean isEmbedded() -
isMemoryOnly
default boolean isMemoryOnly() -
extract
-
extractUser
-
openNoAuthenticate
-
openNoAuthorization
-
initCustomStorage
-
loadAllDatabases
void loadAllDatabases() -
removeShutdownHook
void removeShutdownHook() -
getStorages
Collection<OStorage> getStorages() -
forceDatabaseClose
-
execute
-
execute
-
execute
-
executeNoAuthorization
-
fullSync
-
deltaSync
-
getScriptManager
-
networkRestore
-
executeServerStatement
-
executeServerStatement
-
getSystemDatabase
-
getBasePath
-
internalDrop
-
distributedSetOnline
-
create
void create(String name, String user, String password, ODatabaseType type, OrientDBConfig config, ODatabaseTask<Void> createOps) -
getConfigurations
OrientDBConfig getConfigurations() -
getSecuritySystem
OSecuritySystem getSecuritySystem() -
listLodadedDatabases
-
getConnectionUrl
String getConnectionUrl() -
startCommand
-
endCommand
default void endCommand() -
newNetworkMessage
-