public class OServerAdmin extends Object
| 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) |
com.orientechnologies.orient.core.record.impl.ODocument |
clusterAddNode(String iRemoteNode)
Adds a node in the cluster.
|
com.orientechnologies.orient.core.record.impl.ODocument |
clusterRemoveNode(String iRemoteNode)
Removes a node from the cluster.
|
com.orientechnologies.orient.core.record.impl.ODocument |
clusterStatus()
Gets the cluster status.
|
OServerAdmin |
connect(String iUserName,
String iUserPassword)
Connects to a remote server.
|
OServerAdmin |
copyDatabase(String iDatabaseName,
String iDatabaseUserName,
String iDatabaseUserPassword,
String iRemoteName,
String iRemoteEngine)
Copies a database to a remote server instance.
|
OServerAdmin |
createDatabase(String iStorageMode)
Deprecated.
|
OServerAdmin |
createDatabase(String iDatabaseType,
String iStorageMode)
Creates a database in a remote server.
|
OServerAdmin |
deleteDatabase()
Deprecated.
|
OServerAdmin |
dropDatabase()
Drops a database from a remote server instance.
|
boolean |
existsDatabase()
Checks if a database exists in the remote server.
|
String |
getGlobalConfiguration(com.orientechnologies.orient.core.config.OGlobalConfiguration iConfig) |
Map<String,String> |
getGlobalConfigurations() |
com.orientechnologies.orient.core.record.impl.ODocument |
getReplicationConflicts(String iDatabaseName)
Gets the replication conflicts for a database.
|
com.orientechnologies.orient.core.record.impl.ODocument |
getReplicationJournal(String iDatabaseName,
String iRemoteServer)
Gets the replication journal for a database.
|
int |
getSessionId() |
String |
getURL() |
Map<String,String> |
listDatabases()
List the databases on a remote server.
|
OServerAdmin |
replicationAlign(String iDatabaseName,
String iRemoteServer,
String iOptions)
Aligns a database between two servers
|
OServerAdmin |
replicationStart(String iDatabaseName,
String iRemoteServer)
Starts the replication between two servers.
|
OServerAdmin |
replicationStop(String iDatabaseName,
String iRemoteServer)
Stops the replication between two servers.
|
com.orientechnologies.orient.core.record.impl.ODocument |
resetReplicationJournal(String iDatabaseName,
String iRemoteServer)
Resets the replication Journal for a database.
|
protected com.orientechnologies.orient.core.record.impl.ODocument |
sendRequest(byte iRequest,
com.orientechnologies.orient.core.record.impl.ODocument iPayLoad,
String iActivity) |
OServerAdmin |
setGlobalConfiguration(com.orientechnologies.orient.core.config.OGlobalConfiguration iConfig,
Object iValue) |
public OServerAdmin(String iURL) throws IOException
iURL - URL to connect. It supports only the "remote" storage type.IOExceptionpublic OServerAdmin(OStorageRemote iStorage)
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
iUserName - Server's user nameiUserPassword - Server's password for the user name usedIOExceptionpublic 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 boolean existsDatabase()
throws IOException
IOException@Deprecated public OServerAdmin deleteDatabase() throws IOException
IOExceptiondropDatabase()public OServerAdmin dropDatabase() throws IOException
IOExceptionpublic com.orientechnologies.orient.core.record.impl.ODocument clusterStatus()
public com.orientechnologies.orient.core.record.impl.ODocument clusterAddNode(String iRemoteNode)
public com.orientechnologies.orient.core.record.impl.ODocument clusterRemoveNode(String iRemoteNode)
public OServerAdmin replicationStart(String iDatabaseName, String iRemoteServer) throws IOException
iDatabaseName - database name to replicateiRemoteServer - remote server alias as IP+addressIOExceptionpublic OServerAdmin replicationStop(String iDatabaseName, String iRemoteServer) throws IOException
iDatabaseName - database name to replicateiRemoteServer - remote server alias as IP+addressIOExceptionpublic com.orientechnologies.orient.core.record.impl.ODocument getReplicationJournal(String iDatabaseName, String iRemoteServer) throws IOException
iDatabaseName - database name to replicateiRemoteName - IOExceptionpublic com.orientechnologies.orient.core.record.impl.ODocument resetReplicationJournal(String iDatabaseName, String iRemoteServer) throws IOException
iDatabaseName - database name to replicateiRemoteName - IOExceptionpublic com.orientechnologies.orient.core.record.impl.ODocument getReplicationConflicts(String iDatabaseName) throws IOException
iDatabaseName - database name to replicateiRemoteName - IOExceptionpublic OServerAdmin replicationAlign(String iDatabaseName, String iRemoteServer, String iOptions)
iDatabaseName - database name to aligniRemoteServer - remote server alias as IP+addressiOptions - optionsIOExceptionpublic OServerAdmin copyDatabase(String iDatabaseName, String iDatabaseUserName, String iDatabaseUserPassword, String iRemoteName, String iRemoteEngine) throws IOException
iDatabaseName - iDatabaseUserName - iDatabaseUserPassword - iRemoteName - iRemoteEngine - IOExceptionpublic Map<String,String> getGlobalConfigurations() throws IOException
IOExceptionpublic String getGlobalConfiguration(com.orientechnologies.orient.core.config.OGlobalConfiguration iConfig) throws IOException
IOExceptionpublic OServerAdmin setGlobalConfiguration(com.orientechnologies.orient.core.config.OGlobalConfiguration iConfig, Object iValue) throws IOException
IOExceptionpublic void close()
public void close(boolean iForce)
public String getURL()
protected com.orientechnologies.orient.core.record.impl.ODocument sendRequest(byte iRequest,
com.orientechnologies.orient.core.record.impl.ODocument iPayLoad,
String iActivity)
Copyright © 2009-2012 Orient Technologies. All Rights Reserved.