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
Fields inherited from class com.orientechnologies.orient.core.db.OrientDBEmbedded
basePath, cachedPoolFactory, dbCount, orient, pools, sharedContexts, storages -
Constructor Summary
ConstructorsConstructorDescriptionOrientDBDistributed(String directoryPath, OrientDBConfig config, Orient instance) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()Close the factory with all related databases and pools.<T> TconfigOp(ODistributedConfigurationManager cm, String database, com.orientechnologies.orient.distributed.db.OrientDBDistributed.ConfigOp<T> op) voidvoidcreate(String name, String user, String password, ODatabaseType type, OrientDBConfig config, ODatabaseTask<Void> createOps) protected OSharedContextcreateSharedContext(OStorage storage) booleandeltaSync(String dbName, InputStream backupStream, OrientDBConfig config) distributedOperation(OOperationMessage operation) voiddistributedPauseDatabase(String database) voiddistributedSetOnline(String database) voidDrop a databasestatic voiddropStorageFiles(OStorage storage) voidfirstConnect(ONodeId nodeId, ONodeStateNetwork state) voidfullSync(String dbName, InputStream backupStream, OrientDBConfig config) intgetConfigurationManager(String database) getDatabase(String iDatabaseName) getDefaultDistributedConfiguration(String database) getDistributedConfiguration(String database) getExistingDistributedConfiguration(String database) getOrInitConfigurationManager(String database) getOrInitDistributedConfiguration(String database) voidvoidinternalDrop(String name) protected booleanisDistributedDisabled(String storage) voidprotected ODatabaseDocumentEmbeddednewCreateSessionInstance(OStorage storage, OrientDBConfig config) protected ODatabaseDocumentEmbeddednewPooledSessionInstance(ODatabasePoolInternal pool, OStorage storage, OSharedContext sharedContext) protected ODatabaseDocumentEmbeddednewSessionInstance(OStorage storage, OrientDBConfig config) Open 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 configurationpoolOpen(String name, String user, String password, ODatabasePoolInternal pool) Internal api for request to open a database with a poolvoidvoidregisterNode(ONodeId node, long version) voidsaveDatabaseConfiguration(String database) voidsendMessage(Set<ONodeId> set, OStructuralMessage op) voidsetDistributedConfiguration(String database, OModifiableDistributedConfiguration distributedConfiguration) voidsetPlugin(ODistributedPlugin plugin) booleanunregisterDatabase(String iDatabaseName) Methods inherited from class com.orientechnologies.orient.core.db.OrientDBEmbedded
buildName, cachedPool, cachedPool, checkOpen, create, create, createCachedDatabasePoolFactory, endCommand, execute, execute, execute, executeNoAuthorization, executeNoDb, executeServerStatement, executeServerStatement, exists, forceDatabaseClose, getAndOpenStorage, getBasePath, getConfigurations, getConnectionUrl, getDatabasePath, getDefaultEngine, getEngine, getIoExecutor, getOrCreateSharedContext, getScriptManager, getSecuritySystem, getStorage, getStorages, getSystemDatabase, initAutoClose, initCustomStorage, initEngines, internalClose, internalCreate, isEmbedded, isMemoryOnly, isOpen, listDatabases, listLodadedDatabases, networkRestore, open, openNoAuthenticate, openNoAuthorization, openPool, 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
-
Constructor Details
-
OrientDBDistributed
-
-
Method Details
-
init
- Specified by:
initin interfaceOServerAware
-
loadAllDatabases
public void loadAllDatabases()- Specified by:
loadAllDatabasesin interfaceOrientDBInternal- Overrides:
loadAllDatabasesin classOrientDBEmbedded
-
getPlugin
-
newSessionInstance
- Overrides:
newSessionInstancein classOrientDBEmbedded
-
isDistributedDisabled
-
newCreateSessionInstance
protected ODatabaseDocumentEmbedded newCreateSessionInstance(OStorage storage, OrientDBConfig config) - Overrides:
newCreateSessionInstancein classOrientDBEmbedded
-
setPlugin
-
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
-
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
-
sendMessage
-
receiveMessage
-
open
Description copied from interface:OrientDBInternalOpen a database specified by name using the username and password if needed- 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 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- 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
-
dropStorageFiles
-
getDistributedManager
- Specified by:
getDistributedManagerin interfaceOServerAware
-
deltaSync
- Specified by:
deltaSyncin interfaceOrientDBInternal
-
getNodeName
-
getDatabase
-
unregisterDatabase
-
create
public void create(String name, String user, String password, ODatabaseType type, OrientDBConfig config, ODatabaseTask<Void> createOps) - Specified by:
createin interfaceOrientDBInternal- Overrides:
createin classOrientDBEmbedded
-
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
-
getDefaultDistributedConfiguration
-
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
-
getActiveDatabaseCount
public int getActiveDatabaseCount() -
getMessageService
-
distributedOperation
-
getNodeState
-
newNetworkMessage
- Specified by:
newNetworkMessagein interfaceOrientDBInternal
-
firstConnect
-
connected
-
registerNode
-
cancelRegisterPromise
public void cancelRegisterPromise()
-