
public class OServerAdmin extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
clientType |
protected boolean |
collectStats |
protected OStorageRemoteSession |
session |
protected OStorageRemote |
storage |
| Constructor and Description |
|---|
OServerAdmin(OStorageRemote iStorage)
Creates the object starting from an existent remote storage.
|
OServerAdmin(String iURL)
Creates the object passing a remote URL to connect.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connection if open.
|
void |
close(boolean iForce) |
ODocument |
clusterStatus()
Gets the cluster status.
|
OServerAdmin |
connect(String iUserName,
String iUserPassword)
Connects to a remote server.
|
OServerAdmin |
copyDatabase(String databaseName,
String iDatabaseUserName,
String iDatabaseUserPassword,
String iRemoteName,
String iRemoteEngine)
Deprecated.
|
OServerAdmin |
createDatabase(String iStorageMode)
Deprecated.
|
OServerAdmin |
createDatabase(String iDatabaseType,
String iStorageMode)
Creates a database in a remote server.
|
OServerAdmin |
createDatabase(String iDatabaseName,
String iDatabaseType,
String iStorageMode) |
OServerAdmin |
createDatabase(String iDatabaseName,
String iDatabaseType,
String iStorageMode,
String backupPath)
Creates a database in a remote server.
|
OServerAdmin |
deleteDatabase(String storageType)
Deprecated.
|
OServerAdmin |
dropDatabase(String storageType)
Drops a database from a remote server instance.
|
OServerAdmin |
dropDatabase(String iDatabaseName,
String storageType)
Drops a database from a remote server instance.
|
boolean |
existsDatabase()
Checks if a database exists in the remote server.
|
boolean |
existsDatabase(String storageType)
Checks if a database exists in the remote server.
|
boolean |
existsDatabase(String iDatabaseName,
String storageType)
Checks if a database exists in the remote server.
|
OServerAdmin |
freezeCluster(int clusterId,
String storageType)
Freezes a cluster by locking it in exclusive mode.
|
OServerAdmin |
freezeDatabase(String storageType)
Freezes the database by locking it in exclusive mode.
|
String |
getGlobalConfiguration(OGlobalConfiguration config) |
Map<String,String> |
getGlobalConfigurations() |
ODocument |
getServerInfo()
Returns the server information in form of document.
|
int |
getSessionId() |
String |
getStorageName() |
String |
getURL() |
boolean |
isConnected() |
Map<String,String> |
listDatabases()
Returns the list of databases on the connected remote server.
|
protected <T> T |
networkAdminOperation(OStorageRemoteOperation<T> operation,
String errorMessage) |
OServerAdmin |
releaseCluster(int clusterId,
String storageType)
Releases a frozen cluster.
|
OServerAdmin |
releaseDatabase(String storageType)
Releases a frozen database.
|
protected ODocument |
sendRequest(byte iRequest,
ODocument iPayLoad,
String iActivity) |
OServerAdmin |
setGlobalConfiguration(OGlobalConfiguration config,
Object iValue) |
protected OStorageRemote storage
protected OStorageRemoteSession session
protected String clientType
protected boolean collectStats
public OServerAdmin(String iURL) throws IOException
iURL - URL to connect. It supports only the "remote" storage type.IOExceptionpublic OServerAdmin(OStorageRemote iStorage)
public OServerAdmin connect(String iUserName, String iUserPassword) throws IOException
iUserName - Server's user nameiUserPassword - Server's password for the user name usedIOExceptionpublic Map<String,String> listDatabases() throws IOException
IOExceptionpublic ODocument getServerInfo() throws IOException
IOExceptionpublic int getSessionId()
@Deprecated public OServerAdmin createDatabase(String iStorageMode) throws IOException
createDatabase(String, String) instead.IOExceptionpublic OServerAdmin createDatabase(String iDatabaseType, String iStorageMode) throws IOException
iDatabaseType - 'document' or 'graph'iStorageMode - local or memoryIOExceptionpublic String getStorageName()
public OServerAdmin createDatabase(String iDatabaseName, String iDatabaseType, String iStorageMode) throws IOException
IOExceptionpublic OServerAdmin createDatabase(String iDatabaseName, String iDatabaseType, String iStorageMode, String backupPath) throws IOException
iDatabaseName - The database nameiDatabaseType - 'document' or 'graph'iStorageMode - local or memorybackupPath - path to incremental backup which will be used to create database (optional)IOExceptionpublic boolean existsDatabase()
throws IOException
IOExceptionpublic boolean existsDatabase(String iDatabaseName, String storageType) throws IOException
iDatabaseName - The database namestorageType - Storage type between "plocal" or "memory".IOExceptionpublic boolean existsDatabase(String storageType) throws IOException
storageType - Storage type between "plocal" or "memory".IOException@Deprecated public OServerAdmin deleteDatabase(String storageType) throws IOException
storageType - Storage type between "plocal" or "memory".IOExceptiondropDatabase(String)public OServerAdmin dropDatabase(String iDatabaseName, String storageType) throws IOException
iDatabaseName - The database namestorageType - Storage type between "plocal" or "memory".IOExceptionpublic OServerAdmin dropDatabase(String storageType) throws IOException
storageType - Storage type between "plocal" or "memory".IOExceptionpublic OServerAdmin freezeDatabase(String storageType) throws IOException
storageType - Storage type between "plocal" or "memory".IOExceptionreleaseDatabase(String)public OServerAdmin releaseDatabase(String storageType) throws IOException
storageType - Storage type between "plocal" or "memory".IOExceptionfreezeDatabase(String)public OServerAdmin freezeCluster(int clusterId, String storageType) throws IOException
clusterId - Id of cluster to freezestorageType - Storage type between "plocal" or "memory".IOExceptionreleaseCluster(int, String)public OServerAdmin releaseCluster(int clusterId, String storageType) throws IOException
clusterId - Id of cluster to freezestorageType - Storage type between "plocal" or "memory".IOExceptionfreezeCluster(int, String)public ODocument clusterStatus()
@Deprecated public OServerAdmin copyDatabase(String databaseName, String iDatabaseUserName, String iDatabaseUserPassword, String iRemoteName, String iRemoteEngine) throws IOException
IOExceptionpublic Map<String,String> getGlobalConfigurations() throws IOException
IOExceptionpublic String getGlobalConfiguration(OGlobalConfiguration config) throws IOException
IOExceptionpublic OServerAdmin setGlobalConfiguration(OGlobalConfiguration config, Object iValue) throws IOException
IOExceptionpublic void close()
public void close(boolean iForce)
public String getURL()
public boolean isConnected()
protected <T> T networkAdminOperation(OStorageRemoteOperation<T> operation, String errorMessage)
Copyright © 2009–2025 OrientDB. All rights reserved.