Class OrientDBRemote
java.lang.Object
com.orientechnologies.orient.client.remote.OrientDBRemote
- All Implemented Interfaces:
OrientDBInternal,OSchedulerInternal,AutoCloseable
Created by tglman on 08/04/16.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ORemoteConnectionManagerprotected final Map<String,OSharedContextRemote> -
Constructor Summary
ConstructorsConstructorDescriptionOrientDBRemote(String[] hosts, OrientDBConfig configurations, Orient orient) -
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.<T extends OBinaryResponse>
TconnectAndSend(String name, String user, String password, OBinaryRequest<T> request) voidcreate(String name, String user, String password, ODatabaseType databaseType) Create a new databasevoidcreate(String name, String user, String password, ODatabaseType databaseType, OrientDBConfig config) Create a new databasevoidcreate(String name, String user, String password, ODatabaseType type, OrientDBConfig config, ODatabaseTask<Void> createOps) protected OCachedDatabasePoolFactoryvoidDrop a databaseFuture<?><X> Future<X>execute(String database, String user, ODatabaseTask<X> task) <X> Future<X><X> Future<X>executeNoAuthorization(String database, ODatabaseTask<X> task) executeServerStatement(String statement, String user, String pw, Object... params) booleanCheck if a database existsvoidforceDatabaseClose(String databaseName) voidfreezeDatabase(String database, String user, String password) getClusterStatus(String username, String password) getDatabases(String user, String password) getGlobalConfiguration(String username, String password, OGlobalConfiguration config) getGlobalConfigurations(String username, String password) protected OSharedContextRemotegetOrCreateSharedContext(String name, OContextConfiguration config) getServerInfo(String username, String password) voidinitCustomStorage(String name, String baseUrl, String userName, String userPassword) voidShould be called only by shutdown listenersvoidinternalDrop(String database) booleanbooleanisOpen()Check if the current instance is openlistDatabases(String user, String password) List of database exiting in the current environmentvoid<T extends OBinaryResponse>
TnetworkAdminOperation(OBinaryRequest<T> request, ORemoteClientSession session, String errorMessage) <T> TnetworkAdminOperation(ORemoteClientOperation<T> operation, String errorMessage, ORemoteClientSession session) open(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 poolvoidreleaseDatabase(String database, String user, String password) voidInternal 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) voidvoidscheduleOnce(TimerTask task, long delay) voidsetGlobalConfiguration(String username, String password, OGlobalConfiguration config, String iConfigValue) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.db.OrientDBInternal
deltaSync, distributedSetOnline, endCommand, fullSync, getBasePath, getScriptManager, getSystemDatabase, isMemoryOnly, listLodadedDatabases, networkRestore, newNetworkMessage, newOrientDB, newOrientDBNoClose, startCommand
-
Field Details
-
connectionManager
-
Constructor Details
-
OrientDBRemote
-
-
Method Details
-
createCachedDatabasePoolFactory
-
open
Description copied from interface:OrientDBInternalOpen a database specified by name using the username and password if needed- Specified by:
openin interfaceOrientDBInternal- Parameters:
name- of the database to openuser- the username allowed to open the databasepassword- related to the specified username- Returns:
- the opened database
-
open
public ODatabaseDocumentInternal open(String name, String user, String password, OrientDBConfig config) Description copied from interface:OrientDBInternalOpen a database specified by name using the username and password if needed, with specific configuration- Specified by:
openin interfaceOrientDBInternal- 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
public ODatabaseDocumentInternal open(OAuthenticationInfo authenticationInfo, OrientDBConfig config) Description copied from interface:OrientDBInternalOpen a database specified by name using the authentication info provided, with specific configuration- Specified by:
openin interfaceOrientDBInternal- 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
Description copied from interface:OrientDBInternalCreate a new database- Specified by:
createin interfaceOrientDBInternal- 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 userdatabaseType- can be plocal or memory
-
create
public void create(String name, String user, String password, ODatabaseType databaseType, OrientDBConfig config) Description copied from interface:OrientDBInternalCreate a new database- Specified by:
createin interfaceOrientDBInternal- 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 userdatabaseType- can be plocal or memoryconfig- database specific configuration that override the factory global settings where needed.
-
poolOpen
public ODatabaseDocumentRemotePooled poolOpen(String name, String user, String password, ODatabasePoolInternal pool) Description copied from interface:OrientDBInternalInternal api for request to open a database with a pool- Specified by:
poolOpenin interfaceOrientDBInternal
-
getServerInfo
-
getClusterStatus
-
getGlobalConfiguration
-
setGlobalConfiguration
public void setGlobalConfiguration(String username, String password, OGlobalConfiguration config, String iConfigValue) -
getGlobalConfigurations
-
getConnectionManager
-
exists
Description copied from interface:OrientDBInternalCheck if a database exists- Specified by:
existsin interfaceOrientDBInternal- 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
Description copied from interface:OrientDBInternalDrop a database- Specified by:
dropin interfaceOrientDBInternal- 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
-
internalDrop
- Specified by:
internalDropin interfaceOrientDBInternal
-
listDatabases
Description copied from interface:OrientDBInternalList of database exiting in the current environment- Specified by:
listDatabasesin interfaceOrientDBInternal- 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.
-
getDatabases
-
restore
public void restore(String name, String user, String password, ODatabaseType type, String path, OrientDBConfig config) - Specified by:
restorein interfaceOrientDBInternal
-
connectAndSend
public <T extends OBinaryResponse> T connectAndSend(String name, String user, String password, OBinaryRequest<T> request) -
openPool
Description copied from interface:OrientDBInternalOpen a pool of databases, similar to open but with multiple instances.- Specified by:
openPoolin interfaceOrientDBInternal- Parameters:
name- database nameuser- the username allowed to open the databasepassword- the password relative to the user- Returns:
- a new pool of databases.
-
openPool
public ODatabasePoolInternal openPool(String name, String user, String password, OrientDBConfig config) Description copied from interface:OrientDBInternalOpen a pool of databases, similar to open but with multiple instances.- Specified by:
openPoolin interfaceOrientDBInternal- 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
- Specified by:
cachedPoolin interfaceOrientDBInternal
-
cachedPool
public ODatabasePoolInternal cachedPool(String database, String user, String password, OrientDBConfig config) - Specified by:
cachedPoolin interfaceOrientDBInternal
-
removePool
Description copied from interface:OrientDBInternalInternal API for pool close- Specified by:
removePoolin interfaceOrientDBInternal
-
close
public void close()Description copied from interface:OrientDBInternalClose the factory with all related databases and pools.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceOrientDBInternal
-
internalClose
public void internalClose()Description copied from interface:OrientDBInternalShould be called only by shutdown listeners- Specified by:
internalClosein interfaceOrientDBInternal
-
isOpen
public boolean isOpen()Description copied from interface:OrientDBInternalCheck if the current instance is open- Specified by:
isOpenin interfaceOrientDBInternal
-
isEmbedded
public boolean isEmbedded()- Specified by:
isEmbeddedin interfaceOrientDBInternal
-
removeShutdownHook
public void removeShutdownHook()- Specified by:
removeShutdownHookin interfaceOrientDBInternal
-
loadAllDatabases
public void loadAllDatabases()- Specified by:
loadAllDatabasesin interfaceOrientDBInternal
-
openNoAuthenticate
- Specified by:
openNoAuthenticatein interfaceOrientDBInternal
-
initCustomStorage
- Specified by:
initCustomStoragein interfaceOrientDBInternal
-
getStorages
- Specified by:
getStoragesin interfaceOrientDBInternal
-
forceDatabaseClose
- Specified by:
forceDatabaseClosein interfaceOrientDBInternal
-
restore
public void restore(String name, InputStream in, Map<String, Object> options, Callable<Object> callable, OCommandOutputListener iListener) - Specified by:
restorein interfaceOrientDBInternal
-
openNoAuthorization
- Specified by:
openNoAuthorizationin interfaceOrientDBInternal
-
schedule
- Specified by:
schedulein interfaceOSchedulerInternal
-
scheduleOnce
- Specified by:
scheduleOncein interfaceOSchedulerInternal
-
executeNoAuthorization
- Specified by:
executeNoAuthorizationin interfaceOrientDBInternal
-
execute
- Specified by:
executein interfaceOrientDBInternal
-
execute
- Specified by:
executein interfaceOrientDBInternal
-
execute
- Specified by:
executein interfaceOrientDBInternal
-
releaseDatabase
-
freezeDatabase
-
executeServerStatement
public OResultSet executeServerStatement(String statement, String user, String pw, Object... params) - Specified by:
executeServerStatementin interfaceOrientDBInternal
-
executeServerStatement
public OResultSet executeServerStatement(String statement, String user, String pw, Map<String, Object> params) - Specified by:
executeServerStatementin interfaceOrientDBInternal
-
getContextConfiguration
-
networkAdminOperation
public <T extends OBinaryResponse> T networkAdminOperation(OBinaryRequest<T> request, ORemoteClientSession session, String errorMessage) -
networkAdminOperation
public <T> T networkAdminOperation(ORemoteClientOperation<T> operation, String errorMessage, ORemoteClientSession session) -
getConfigurations
- Specified by:
getConfigurationsin interfaceOrientDBInternal
-
getSecuritySystem
- Specified by:
getSecuritySystemin interfaceOrientDBInternal
-
create
public void create(String name, String user, String password, ODatabaseType type, OrientDBConfig config, ODatabaseTask<Void> createOps) - Specified by:
createin interfaceOrientDBInternal
-
getConnectionUrl
- Specified by:
getConnectionUrlin interfaceOrientDBInternal
-