public class OrientDBRemote extends Object implements OrientDBInternal
Modifier and Type | Field and Description |
---|---|
protected ORemoteConnectionManager |
connectionManager |
protected Map<String,OSharedContext> |
sharedContexts |
Constructor and Description |
---|
OrientDBRemote(String[] hosts,
OrientDBConfig configurations,
Orient orient) |
Modifier and Type | Method and Description |
---|---|
ODatabasePoolInternal |
cachedPool(String database,
String user,
String password) |
ODatabasePoolInternal |
cachedPool(String database,
String user,
String password,
OrientDBConfig config) |
void |
close()
Close the factory with all related databases and pools.
|
void |
closeStorage(OStorageRemote remote) |
void |
create(String name,
String user,
String password,
ODatabaseType databaseType)
Create a new database
|
void |
create(String name,
String user,
String password,
ODatabaseType databaseType,
OrientDBConfig config)
Create a new database
|
protected OCachedDatabasePoolFactory |
createCachedDatabasePoolFactory(OrientDBConfig config) |
void |
drop(String name,
String user,
String password)
Drop a database
|
<X> Future<X> |
execute(String database,
String user,
ODatabaseTask<X> task) |
<X> Future<X> |
executeNoAuthorization(String database,
ODatabaseTask<X> task) |
boolean |
exists(String name,
String user,
String password)
Check if a database exists
|
void |
forceDatabaseClose(String databaseName) |
ODocument |
getClusterStatus(String username,
String password) |
ORemoteConnectionManager |
getConnectionManager() |
String |
getGlobalConfiguration(String username,
String password,
OGlobalConfiguration config) |
Map<String,String> |
getGlobalConfigurations(String username,
String password) |
protected OSharedContext |
getOrCreateSharedContext(OStorage storage) |
ODocument |
getServerInfo(String username,
String password) |
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() |
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.
|
ODatabaseDocumentRemotePooled |
poolOpen(String name,
String user,
String password,
ODatabasePoolInternal pool)
Internal api for request to open a database with a pool
|
void |
removePool(ODatabasePoolInternal pool)
Internal API for pool close
|
void |
removeShutdownHook() |
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) |
void |
schedule(TimerTask task,
long delay,
long period) |
void |
scheduleOnce(TimerTask task,
long delay) |
void |
setGlobalConfiguration(String username,
String password,
OGlobalConfiguration config,
String iConfigValue) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
distributed, embedded, extract, fromUrl, fullSync, getScriptManager, networkRestore, newOrientDB, remote
protected final Map<String,OSharedContext> sharedContexts
protected volatile ORemoteConnectionManager connectionManager
public OrientDBRemote(String[] hosts, OrientDBConfig configurations, Orient orient)
protected OCachedDatabasePoolFactory createCachedDatabasePoolFactory(OrientDBConfig config)
public ODatabaseDocumentInternal open(String name, String user, String password)
OrientDBInternal
open
in interface OrientDBInternal
name
- of the database to openuser
- the username allowed to open the databasepassword
- related to the specified usernamepublic ODatabaseDocumentInternal open(String name, String user, String password, OrientDBConfig config)
OrientDBInternal
open
in interface OrientDBInternal
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.public void create(String name, String user, String password, ODatabaseType databaseType)
OrientDBInternal
create
in interface OrientDBInternal
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 memorypublic void create(String name, String user, String password, ODatabaseType databaseType, OrientDBConfig config)
OrientDBInternal
create
in interface OrientDBInternal
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.public ODatabaseDocumentRemotePooled poolOpen(String name, String user, String password, ODatabasePoolInternal pool)
OrientDBInternal
poolOpen
in interface OrientDBInternal
public void closeStorage(OStorageRemote remote)
public String getGlobalConfiguration(String username, String password, OGlobalConfiguration config)
public void setGlobalConfiguration(String username, String password, OGlobalConfiguration config, String iConfigValue)
public Map<String,String> getGlobalConfigurations(String username, String password)
public ORemoteConnectionManager getConnectionManager()
public boolean exists(String name, String user, String password)
OrientDBInternal
exists
in interface OrientDBInternal
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 userpublic void drop(String name, String user, String password)
OrientDBInternal
drop
in interface OrientDBInternal
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 userpublic Set<String> listDatabases(String user, String password)
OrientDBInternal
listDatabases
in interface OrientDBInternal
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 userpublic void restore(String name, String user, String password, ODatabaseType type, String path, OrientDBConfig config)
restore
in interface OrientDBInternal
public ODatabasePoolInternal openPool(String name, String user, String password)
OrientDBInternal
openPool
in interface OrientDBInternal
name
- database nameuser
- the username allowed to open the databasepassword
- the password relative to the userpublic ODatabasePoolInternal openPool(String name, String user, String password, OrientDBConfig config)
OrientDBInternal
openPool
in interface OrientDBInternal
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.public ODatabasePoolInternal cachedPool(String database, String user, String password)
cachedPool
in interface OrientDBInternal
public ODatabasePoolInternal cachedPool(String database, String user, String password, OrientDBConfig config)
cachedPool
in interface OrientDBInternal
public void removePool(ODatabasePoolInternal pool)
OrientDBInternal
removePool
in interface OrientDBInternal
public void close()
OrientDBInternal
close
in interface OrientDBInternal
close
in interface AutoCloseable
public void internalClose()
OrientDBInternal
internalClose
in interface OrientDBInternal
public boolean isOpen()
OrientDBInternal
isOpen
in interface OrientDBInternal
public boolean isEmbedded()
isEmbedded
in interface OrientDBInternal
public void removeShutdownHook()
removeShutdownHook
in interface OrientDBInternal
public void loadAllDatabases()
loadAllDatabases
in interface OrientDBInternal
public ODatabaseDocumentInternal openNoAuthenticate(String iDbUrl, String user)
openNoAuthenticate
in interface OrientDBInternal
public void initCustomStorage(String name, String baseUrl, String userName, String userPassword)
initCustomStorage
in interface OrientDBInternal
public Collection<OStorage> getStorages()
getStorages
in interface OrientDBInternal
public void forceDatabaseClose(String databaseName)
forceDatabaseClose
in interface OrientDBInternal
public void restore(String name, InputStream in, Map<String,Object> options, Callable<Object> callable, OCommandOutputListener iListener)
restore
in interface OrientDBInternal
public ODatabaseDocumentInternal openNoAuthorization(String name)
openNoAuthorization
in interface OrientDBInternal
protected OSharedContext getOrCreateSharedContext(OStorage storage)
public void schedule(TimerTask task, long delay, long period)
schedule
in interface OSchedulerInternal
public void scheduleOnce(TimerTask task, long delay)
scheduleOnce
in interface OSchedulerInternal
public <X> Future<X> executeNoAuthorization(String database, ODatabaseTask<X> task)
executeNoAuthorization
in interface OrientDBInternal
public <X> Future<X> execute(String database, String user, ODatabaseTask<X> task)
execute
in interface OrientDBInternal
Copyright © 2009–2020 OrientDB. All rights reserved.