Class OrientDBDistributed
java.lang.Object
com.orientechnologies.orient.core.db.OrientDBEmbedded
com.orientechnologies.orient.distributed.db.OrientDBDistributed
- All Implemented Interfaces:
OrientDBInternal,OSchedulerInternal,OServerAware,AutoCloseable
Created by tglman on 08/08/17.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.orientechnologies.orient.core.db.OrientDBEmbedded
OrientDBEmbedded.DatabaseFound -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ConcurrentHashMap<String,ODistributedConfigurationManager> protected final ConcurrentHashMap<String,ODistributedDatabaseImpl> Fields inherited from class com.orientechnologies.orient.core.db.OrientDBEmbedded
basePath, cachedPoolFactory, disk, doubleWriteLogMaxSegSize, maxWALSegmentSize, memory, orient, pools, sharedContexts, storages -
Constructor Summary
ConstructorsConstructorDescriptionOrientDBDistributed(String directoryPath, OrientDBConfig config, Orient instance) -
Method Summary
Modifier and TypeMethodDescriptioncachedPool(String database, String user, String password, OrientDBConfig config) voidclose()Close the factory with all related databases and pools.<T> TconfigOp(ODistributedConfigurationManager cm, String database, com.orientechnologies.orient.distributed.db.OrientDBDistributed.ConfigOp<T> op) voidcoordinatedRequest(OClientConnection connection, int requestType, int clientTxId, OChannelBinary channel) voidcreate(String name, String user, String password, ODatabaseType type, OrientDBConfig config, ODatabaseTask<Void> createOps) protected OSharedContextbooleandeltaSync(String dbName, InputStream backupStream, OrientDBConfig config) voiddistributedPauseDatabase(String database) voiddistributedSetOnline(String database) voidDrop a databasestatic voiddropStorageFiles(OLocalPaginatedStorage storage) fullSync(String dbName, InputStream backupStream, OrientDBConfig config) getConfigurationManager(String database) getDatabase(String iDatabaseName) getDistributedConfiguration(String database) getExistingDistributedConfiguration(String database) getOrInitConfigurationManager(String database) getOrInitDistributedConfiguration(String database) voidvoidinternalDrop(String name) voidprotected ODatabaseDocumentEmbeddednewCreateSessionInstance(OAbstractPaginatedStorage storage, OrientDBConfig config, OSharedContext sharedContext) protected ODatabaseDocumentEmbeddednewPooledSessionInstance(ODatabasePoolInternal pool, OAbstractPaginatedStorage storage, OSharedContext sharedContext) protected ODatabaseDocumentEmbeddednewSessionInstance(OAbstractPaginatedStorage storage, OrientDBConfig config, OSharedContext sharedContext) open(OAuthenticationInfo authenticationInfo, OrientDBConfig config) Open a database specified by name using the authentication info provided, with specific configurationopen(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 name, String user) openNoAuthorization(String name) 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 poolvoidsaveDatabaseConfiguration(String database) voidsetDistributedConfiguration(String database, OModifiableDistributedConfiguration distributedConfiguration) voidsetPlugin(ODistributedPlugin plugin) booleanunregisterDatabase(String iDatabaseName) Methods inherited from class com.orientechnologies.orient.core.db.OrientDBEmbedded
buildName, cachedPool, checkOpen, create, create, createCachedDatabasePoolFactory, endCommand, execute, execute, execute, executeNoAuthorization, executeNoDb, executeServerStatement, executeServerStatement, exists, forceDatabaseClose, generateStorageId, getBasePath, getConfigurations, getConnectionUrl, getDatabasePath, getIoExecutor, getOrCreateSharedContext, getOrInitStorage, getScriptManager, getSecuritySystem, getStorage, getStorages, getSystemDatabase, initAutoClose, initCustomStorage, internalClose, internalCreate, isEmbedded, isMemoryOnly, isOpen, listDatabases, listLodadedDatabases, networkRestore, open, openPool, preClose, removePool, removeShutdownHook, restore, restore, schedule, scheduleOnce, solveConfig, startCommandMethods 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
newOrientDB, newOrientDBNoClose
-
Field Details
-
databases
-
configurations
-
-
Constructor Details
-
OrientDBDistributed
-
-
Method Details
-
init
- Specified by:
initin interfaceOServerAware
-
loadAllDatabases
public void loadAllDatabases()- Specified by:
loadAllDatabasesin interfaceOrientDBInternal- Overrides:
loadAllDatabasesin classOrientDBEmbedded
-
setPlugin
-
getPlugin
-
fullSync
- Specified by:
fullSyncin interfaceOrientDBInternal
-
poolOpen
public ODatabaseDocumentInternal 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- Overrides:
poolOpenin classOrientDBEmbedded
-
create
public void create(String name, String user, String password, ODatabaseType type, OrientDBConfig config, ODatabaseTask<Void> createOps) - Specified by:
createin interfaceOrientDBInternal- Overrides:
createin classOrientDBEmbedded
-
internalDrop
- Specified by:
internalDropin interfaceOrientDBInternal- Overrides:
internalDropin classOrientDBEmbedded
-
drop
Description copied from interface:OrientDBInternalDrop a database- Specified by:
dropin interfaceOrientDBInternal- Overrides:
dropin classOrientDBEmbedded- 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
-
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- Overrides:
openin classOrientDBEmbedded- 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- Overrides:
openin classOrientDBEmbedded- Parameters:
authenticationInfo- authentication informations provided for the authentication.config- database specific configuration that override the factory global settings where needed.- Returns:
- the opened database
-
openNoAuthenticate
- Specified by:
openNoAuthenticatein interfaceOrientDBInternal- Overrides:
openNoAuthenticatein classOrientDBEmbedded
-
openNoAuthorization
- Specified by:
openNoAuthorizationin interfaceOrientDBInternal- Overrides:
openNoAuthorizationin classOrientDBEmbedded
-
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- Overrides:
openPoolin classOrientDBEmbedded- 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
public ODatabasePoolInternal cachedPool(String database, String user, String password, OrientDBConfig config) - Specified by:
cachedPoolin interfaceOrientDBInternal- Overrides:
cachedPoolin classOrientDBEmbedded
-
coordinatedRequest
public void coordinatedRequest(OClientConnection connection, int requestType, int clientTxId, OChannelBinary channel) throws IOException - Specified by:
coordinatedRequestin interfaceOServerAware- Throws:
IOException
-
dropStorageFiles
-
getDistributedManager
- Specified by:
getDistributedManagerin interfaceOServerAware
-
deltaSync
- Specified by:
deltaSyncin interfaceOrientDBInternal
-
getDatabase
-
unregisterDatabase
-
distributedSetOnline
- Specified by:
distributedSetOnlinein interfaceOrientDBInternal
-
distributedPauseDatabase
-
getActiveDatabases
-
getDistributedDatabases
-
getOrInitDistributedConfiguration
-
getOrInitConfigurationManager
-
getConfigurationManager
-
getDistributedConfiguration
-
configOp
public <T> T configOp(ODistributedConfigurationManager cm, String database, com.orientechnologies.orient.distributed.db.OrientDBDistributed.ConfigOp<T> op) -
getExistingDistributedConfiguration
-
getDistributedConfiguration
-
setDistributedConfiguration
public void setDistributedConfiguration(String database, OModifiableDistributedConfiguration distributedConfiguration) -
saveDatabaseConfiguration
-
getOrInitDistributedConfiguration
-
tryUpdatingDatabaseConfigurationLocally
public boolean tryUpdatingDatabaseConfigurationLocally(String database, OModifiableDistributedConfiguration cfg) -
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- Overrides:
closein classOrientDBEmbedded
-