This class allows you to embed and manage a server instance within your application. Once you start the server, you can interact with it and manage data the same as you would standard instances of the OrientDB Server.
In order to operate on an OrientDB database, you first need to establish a connection with the server. You have two options in this: you can connect to a running OrientDB Server using
OrientDB or you can embed the server within your application using this class. It can be found at
com.orientechnologies.orient.server. For instance,
/* Import OrientDB Classes */ import com.orientechnologies.orient.server.OServer;
Once you've imported the class to your application, you can use one of the constructors to build a particular instance in your code.
This class provides two constructors to create instances of
OServer in your application. The first takes no arguments and the second takes a single boolean argument, which defines whether you want to shut the server down on exit.
// CONSTRUCTOR 1 OServer() // CONSTRUCTOR 2 OServer(boolean shutdownEngineOnExit)
This class throws the following exceptions.
Once you've initialized the class in your application, you can call the following methods on your instance.
|Retrieves a server instance by ID.|
|Retrieve a server instance by its path.|
|Checks whether server is active.|
|Restarts the server.|
|Shuts down the server.|
|Starts the server.|
|Retrieves the root database directory.|
|Opens the given database.|
|Determines whether storage path exists.|
|Retrieves a map of available storage types.|
|Retrieves the storage path.|
|Adds a temporary user to the server.|
|Adds a user to the server.|
|Authenticates a user on the server.|
|Removes user from the server.|
|Checks whether user can access a given resource.|