Interface OrientDBInternal

All Superinterfaces:
AutoCloseable, OSchedulerInternal
All Known Implementing Classes:
OrientDBDistributed, OrientDBEmbedded, OrientDBRemote

public interface OrientDBInternal extends AutoCloseable, OSchedulerInternal
Created by tglman on 27/03/16.
  • Method Details

    • fromUrl

      static OrientDBInternal fromUrl(String url, OrientDBConfig configuration)
      Create a new factory from a given url.

      possible kind of urls 'embedded','remote', for the case of remote and distributed can be specified multiple nodes using comma.

      Parameters:
      url - the url for the specific factory.
      configuration - configuration for the specific factory for the list of option .
      Returns:
      the new Orient Factory.
    • newOrientDB

      default OrientDB newOrientDB()
    • newOrientDBNoClose

      default OrientDB newOrientDBNoClose()
    • remote

      static OrientDBInternal remote(String[] hosts, OrientDBConfig configuration)
      Create a new remote factory
      Parameters:
      hosts - array of hosts
      configuration - configuration for the specific factory for the list of option .
      Returns:
      a new remote databases factory
    • embedded

      static OrientDBInternal embedded(String directoryPath, OrientDBConfig config)
      Create a new Embedded factory
      Parameters:
      directoryPath - base path where the database are hosted
      config - configuration for the specific factory for the list of option
      Returns:
      a new embedded databases factory
    • distributed

      static OrientDBInternal distributed(String directoryPath, OrientDBConfig configuration)
    • open

      ODatabaseDocumentInternal open(String name, String user, String password)
      Open a database specified by name using the username and password if needed
      Parameters:
      name - of the database to open
      user - the username allowed to open the database
      password - related to the specified username
      Returns:
      the opened database
    • open

      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
      Parameters:
      name - of the database to open
      user - the username allowed to open the database
      password - related to the specified username
      config - database specific configuration that override the factory global settings where needed.
      Returns:
      the opened database
    • open

      Open a database specified by name using the authentication info provided, with specific configuration
      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

      void create(String name, String user, String password, ODatabaseType type)
      Create a new database
      Parameters:
      name - database name
      user - the username of a user allowed to create a database, in case of remote is a server user for embedded it can be left empty
      password - the password relative to the user
      type - can be plocal or memory
    • create

      void create(String name, String user, String password, ODatabaseType type, OrientDBConfig config)
      Create a new database
      Parameters:
      name - database name
      user - the username of a user allowed to create a database, in case of remote is a server user for embedded it can be left empty
      password - the password relative to the user
      config - database specific configuration that override the factory global settings where needed.
      type - can be plocal or memory
    • exists

      boolean exists(String name, String user, String password)
      Check if a database exists
      Parameters:
      name - database name to check
      user - 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

      void drop(String name, String user, String password)
      Drop a database
      Parameters:
      name - database name
      user - the username of a user allowed to drop a database, in case of remote is a server user for embedded it can be left empty
      password - the password relative to the user
    • listDatabases

      Set<String> listDatabases(String user, String password)
      List of database exiting in the current environment
      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 empty
      password - the password relative to the user
      Returns:
      a set of databases names.
    • openPool

      ODatabasePoolInternal openPool(String name, String user, String password)
      Open a pool of databases, similar to open but with multiple instances.
      Parameters:
      name - database name
      user - the username allowed to open the database
      password - the password relative to the user
      Returns:
      a new pool of databases.
    • openPool

      ODatabasePoolInternal openPool(String name, String user, String password, OrientDBConfig config)
      Open a pool of databases, similar to open but with multiple instances.
      Parameters:
      name - database name
      user - the username allowed to open the database
      password - the password relative to the user
      config - database specific configuration that override the factory global settings where needed.
      Returns:
      a new pool of databases.
    • cachedPool

      ODatabasePoolInternal cachedPool(String database, String user, String password)
    • cachedPool

      ODatabasePoolInternal cachedPool(String database, String user, String password, OrientDBConfig config)
    • poolOpen

      ODatabaseDocumentInternal poolOpen(String name, String user, String password, ODatabasePoolInternal pool)
      Internal api for request to open a database with a pool
    • restore

      void restore(String name, String user, String password, ODatabaseType type, String path, OrientDBConfig config)
    • restore

      void restore(String name, InputStream in, Map<String,Object> options, Callable<Object> callable, OCommandOutputListener iListener)
    • close

      void close()
      Close the factory with all related databases and pools.
      Specified by:
      close in interface AutoCloseable
    • internalClose

      void internalClose()
      Should be called only by shutdown listeners
    • removePool

      void removePool(ODatabasePoolInternal toRemove)
      Internal API for pool close
    • isOpen

      boolean isOpen()
      Check if the current instance is open
    • isEmbedded

      boolean isEmbedded()
    • isMemoryOnly

      default boolean isMemoryOnly()
    • extract

      static OrientDBInternal extract(OrientDB orientDB)
    • extractUser

      static String extractUser(OrientDB orientDB)
    • openNoAuthenticate

      ODatabaseDocumentInternal openNoAuthenticate(String iDbUrl, String user)
    • openNoAuthorization

      ODatabaseDocumentInternal openNoAuthorization(String name)
    • initCustomStorage

      void initCustomStorage(String name, String baseUrl, String userName, String userPassword)
    • loadAllDatabases

      void loadAllDatabases()
    • removeShutdownHook

      void removeShutdownHook()
    • getStorages

      Collection<OStorage> getStorages()
    • forceDatabaseClose

      void forceDatabaseClose(String databaseName)
    • execute

      Future<?> execute(Runnable task)
    • execute

      <X> Future<X> execute(Callable<X> task)
    • execute

      <X> Future<X> execute(String database, String user, ODatabaseTask<X> task)
    • executeNoAuthorization

      <X> Future<X> executeNoAuthorization(String database, ODatabaseTask<X> task)
    • fullSync

      default void fullSync(String dbName, InputStream backupStream, OrientDBConfig config)
    • deltaSync

      default boolean deltaSync(String dbName, InputStream backupStream, OrientDBConfig config)
    • getScriptManager

      default OScriptManager getScriptManager()
    • networkRestore

      default void networkRestore(String databaseName, InputStream in, Callable<Object> callback)
    • executeServerStatement

      default OResultSet executeServerStatement(String script, String user, String pw, Map<String,Object> params)
    • executeServerStatement

      default OResultSet executeServerStatement(String script, String user, String pw, Object... params)
    • getSystemDatabase

      default OSystemDatabase getSystemDatabase()
    • getBasePath

      default String getBasePath()
    • internalDrop

      void internalDrop(String database)
    • distributedSetOnline

      default void distributedSetOnline(String database)
    • create

      void create(String name, String user, String password, ODatabaseType type, OrientDBConfig config, ODatabaseTask<Void> createOps)
    • getConfigurations

      OrientDBConfig getConfigurations()
    • getSecuritySystem

      OSecuritySystem getSecuritySystem()
    • listLodadedDatabases

      default Set<String> listLodadedDatabases()
    • getConnectionUrl

      String getConnectionUrl()
    • startCommand

      default void startCommand(Optional<Long> timeout)
    • endCommand

      default void endCommand()
    • newNetworkMessage

      default ONetworkMessage newNetworkMessage()