
public class OrientDBEmbedded extends Object implements OrientDBInternal
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
OrientDBEmbedded.DatabaseFound |
static interface |
OrientDBEmbedded.InstanceFactory<T> |
| Modifier and Type | Field and Description |
|---|---|
protected String |
basePath |
protected OCachedDatabasePoolFactory |
cachedPoolFactory |
protected OrientDBConfig |
configurations |
protected OEngine |
disk |
protected long |
doubleWriteLogMaxSegSize |
protected long |
maxWALSegmentSize |
protected OEngine |
memory |
protected Orient |
orient |
protected Set<ODatabasePoolInternal> |
pools |
protected Map<String,OSharedContext> |
sharedContexts |
protected Map<String,OAbstractPaginatedStorage> |
storages |
| Constructor and Description |
|---|
OrientDBEmbedded(String directoryPath,
OrientDBConfig configurations,
Orient orient) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdistributed, embedded, extract, fromUrl, fullSync, newOrientDB, remoteprotected final Map<String,OAbstractPaginatedStorage> storages
protected final Map<String,OSharedContext> sharedContexts
protected final Set<ODatabasePoolInternal> pools
protected final OrientDBConfig configurations
protected final String basePath
protected final OEngine memory
protected final OEngine disk
protected final Orient orient
protected final OCachedDatabasePoolFactory cachedPoolFactory
protected final long maxWALSegmentSize
protected final long doubleWriteLogMaxSegSize
public OrientDBEmbedded(String directoryPath, OrientDBConfig configurations, Orient orient)
protected OCachedDatabasePoolFactory createCachedDatabasePoolFactory(OrientDBConfig config)
public void initAutoClose(long delay)
public ODatabaseDocumentInternal open(String name, String user, String password)
OrientDBInternalopen in interface OrientDBInternalname - of the database to openuser - the username allowed to open the databasepassword - related to the specified usernamepublic ODatabaseDocumentEmbedded openNoAuthenticate(String name, String user)
openNoAuthenticate in interface OrientDBInternalprotected ODatabaseDocumentEmbedded newSessionInstance(OAbstractPaginatedStorage storage)
public ODatabaseDocumentEmbedded openNoAuthorization(String name)
openNoAuthorization in interface OrientDBInternalpublic ODatabaseDocumentInternal open(String name, String user, String password, OrientDBConfig config)
OrientDBInternalopen in interface OrientDBInternalname - 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.protected OrientDBConfig solveConfig(OrientDBConfig config)
public ODatabaseDocumentInternal poolOpen(String name, String user, String password, ODatabasePoolInternal pool)
OrientDBInternalpoolOpen in interface OrientDBInternalprotected ODatabaseDocumentEmbedded newPooledSessionInstance(ODatabasePoolInternal pool, OAbstractPaginatedStorage storage)
protected OAbstractPaginatedStorage getOrInitStorage(String name)
protected final int generateStorageId()
public OAbstractPaginatedStorage getStorage(String name)
public void create(String name, String user, String password, ODatabaseType type)
OrientDBInternalcreate in interface OrientDBInternalname - 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 memorypublic void create(String name, String user, String password, ODatabaseType type, OrientDBConfig config)
OrientDBInternalcreate in interface OrientDBInternalname - 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 memoryconfig - database specific configuration that override the factory global settings where
needed.public void networkRestore(String name, InputStream in, Callable<Object> callable)
networkRestore in interface OrientDBInternalpublic void restore(String name, String user, String password, ODatabaseType type, String path, OrientDBConfig config)
restore in interface OrientDBInternalpublic void restore(String name, InputStream in, Map<String,Object> options, Callable<Object> callable, OCommandOutputListener iListener)
restore in interface OrientDBInternalprotected ODatabaseDocumentEmbedded internalCreate(OrientDBConfig config, OAbstractPaginatedStorage storage)
protected OSharedContext getOrCreateSharedContext(OAbstractPaginatedStorage storage)
protected OSharedContext createSharedContext(OAbstractPaginatedStorage storage)
public boolean exists(String name, String user, String password)
OrientDBInternalexists in interface OrientDBInternalname - 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)
OrientDBInternaldrop in interface OrientDBInternalname - 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)
OrientDBInternallistDatabases in interface OrientDBInternaluser - 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 loadAllDatabases()
loadAllDatabases in interface OrientDBInternalpublic ODatabasePoolInternal openPool(String name, String user, String password)
OrientDBInternalopenPool in interface OrientDBInternalname - 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)
OrientDBInternalopenPool in interface OrientDBInternalname - 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 OrientDBInternalpublic ODatabasePoolInternal cachedPool(String database, String user, String password, OrientDBConfig config)
cachedPool in interface OrientDBInternalpublic void close()
OrientDBInternalclose in interface OrientDBInternalclose in interface AutoCloseablepublic void internalClose()
OrientDBInternalinternalClose in interface OrientDBInternalpublic OrientDBConfig getConfigurations()
public void removePool(ODatabasePoolInternal pool)
OrientDBInternalremovePool in interface OrientDBInternalpublic void initCustomStorage(String name, String path, String userName, String userPassword)
initCustomStorage in interface OrientDBInternalpublic void removeShutdownHook()
removeShutdownHook in interface OrientDBInternalpublic Collection<OStorage> getStorages()
getStorages in interface OrientDBInternalpublic void forceDatabaseClose(String iDatabaseName)
forceDatabaseClose in interface OrientDBInternalprotected void checkOpen()
public boolean isOpen()
OrientDBInternalisOpen in interface OrientDBInternalpublic boolean isEmbedded()
isEmbedded in interface OrientDBInternalpublic void schedule(TimerTask task, long delay, long period)
schedule in interface OSchedulerInternalpublic void scheduleOnce(TimerTask task, long delay)
scheduleOnce in interface OSchedulerInternalpublic <X> Future<X> execute(String database, String user, ODatabaseTask<X> task)
execute in interface OrientDBInternalpublic <X> Future<X> executeNoAuthorization(String database, ODatabaseTask<X> task)
executeNoAuthorization in interface OrientDBInternalpublic OScriptManager getScriptManager()
getScriptManager in interface OrientDBInternalpublic Set<String> listLodadedDatabases()
listLodadedDatabases in interface OrientDBInternalCopyright © 2009–2025 OrientDB. All rights reserved.