getActiveServers();
-
- /**
- * Returns the cluster-wide time in milliseconds.
- *
- * Cluster tries to keep a cluster-wide time which might be different than the member's own
- * system time. Cluster-wide time is -almost- the same on all members of the cluster.
- */
- long getClusterTime();
-
- File getDefaultDatabaseConfigFile();
-
- ODistributedLockManager getLockManagerRequester();
-
- ODistributedLockManager getLockManagerExecutor();
-
- /**
- * Executes an operation protected by a distributed lock (one per database).
- *
- * @param Return type
- * @param databaseName Database name
- * @param timeoutLocking
- * @param iCallback Operation @return The operation's result of type T
- */
- T executeInDistributedDatabaseLock(
- String databaseName,
- long timeoutLocking,
- OModifiableDistributedConfiguration lastCfg,
- OCallable iCallback);
-
- /**
- * Returns true if the quorum is present in terms of number of available nodes for full
- * replication only. With sharding, instead, the quorum may depend on the involved clusters.
- *
- * @return
- */
- boolean isWriteQuorumPresent(String databaseName);
-
- void notifyClients(String databaseName);
-
- default void messageReceived(ODistributedRequest request) {}
-
- default void messagePartitionCalculate(
- ODistributedRequest request, Set involvedWorkerQueues) {}
-
- default void messageBeforeOp(String op, ODistributedRequestId requestId) {}
-
- default void messageAfterOp(String op, ODistributedRequestId requestId) {}
-
- default void messageCurrentPayload(ODistributedRequestId requestId, Object responsePayload) {}
-
- default void messageProcessStart(ODistributedRequest message) {}
-
- default void messageProcessEnd(ODistributedRequest iRequest, Object responsePayload) {}
-}
+/*
+ *
+ * * Copyright 2016 Orient Technologies LTD (info(at)orientdb.com)
+ * *
+ * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * you may not use this file except in compliance with the License.
+ * * You may obtain a copy of the License at
+ * *
+ * * http://www.apache.org/licenses/LICENSE-2.0
+ * *
+ * * Unless required by applicable law or agreed to in writing, software
+ * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * See the License for the specific language governing permissions and
+ * * limitations under the License.
+ * *
+ * * For more information: http://www.orientdb.com
+ *
+ */
+package com.orientechnologies.orient.server.distributed;
+
+import com.orientechnologies.common.util.OCallable;
+import com.orientechnologies.orient.core.db.ODatabaseDocumentInternal;
+import com.orientechnologies.orient.core.record.impl.ODocument;
+import com.orientechnologies.orient.server.OServer;
+import com.orientechnologies.orient.server.distributed.ODistributedRequest.EXECUTION_MODE;
+import com.orientechnologies.orient.server.distributed.task.ORemoteTask;
+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Server cluster interface to abstract cluster behavior.
+ *
+ * @author Luca Garulli (l.garulli--at--orientdb.com)
+ */
+public interface ODistributedServerManager {
+ String FILE_DISTRIBUTED_DB_CONFIG = "distributed-config.json";
+
+ /** Server status. */
+ enum NODE_STATUS {
+ /** The server was never started or the shutdown is complete. */
+ OFFLINE,
+
+ /** The server is STARTING. */
+ STARTING,
+
+ /** The server is ONLINE. */
+ ONLINE,
+
+ /** The server starts to merge to another cluster. */
+ MERGING,
+
+ /** The server is shutting down. */
+ SHUTTINGDOWN
+ };
+
+ /** Database status. */
+ enum DB_STATUS {
+ /** The database is not installed. In this status the server does not receive any request. */
+ NOT_AVAILABLE,
+
+ /**
+ * The database has been put in OFFLINE status. In this status the server does not receive any
+ * request.
+ */
+ OFFLINE,
+
+ /**
+ * The database is in synchronization status. This status is set when a synchronization (full or
+ * delta) is requested. The node tha accepts the synchronization, is in SYNCHRONIZING mode too.
+ * During this status the server receive requests that will be enqueue until the database is
+ * ready. Server in SYNCHRONIZING status do not concur in the quorum.
+ */
+ SYNCHRONIZING,
+
+ /**
+ * The database is ONLINE as fully operative. During this status the server is considered in the
+ * quorum (if the server's role is MASTER)
+ */
+ ONLINE,
+
+ /** The database is ONLINE, but is not involved in the quorum. */
+ BACKUP
+ }
+
+ /**
+ * Checks the node status if it's one of the statuses received as argument.
+ *
+ * @param iNodeName Node name
+ * @param iDatabaseName Database name
+ * @param statuses vararg of statuses
+ * @return true if the node's status is equals to one of the passed statuses, otherwise false
+ */
+ boolean isNodeStatusEqualsTo(String iNodeName, String iDatabaseName, DB_STATUS... statuses);
+
+ boolean isNodeAvailable(String iNodeName);
+
+ Set getAvailableNodeNames(String databaseName);
+
+ @Deprecated
+ String getCoordinatorServer();
+
+ String getLockManagerServer();
+
+ void waitUntilNodeOnline() throws InterruptedException;
+
+ void waitUntilNodeOnline(String nodeName, String databaseName) throws InterruptedException;
+
+ OServer getServerInstance();
+
+ boolean isEnabled();
+
+ ODistributedServerManager registerLifecycleListener(ODistributedLifecycleListener iListener);
+
+ ODistributedServerManager unregisterLifecycleListener(ODistributedLifecycleListener iListener);
+
+ Object executeOnLocalNode(
+ ODistributedRequestId reqId, ORemoteTask task, ODatabaseDocumentInternal database);
+
+ void executeOnLocalNodeFromRemote(ODistributedRequest request);
+
+ ORemoteServerController getRemoteServer(String nodeName) throws IOException;
+
+ Map getConfigurationMap();
+
+ long getLastClusterChangeOn();
+
+ NODE_STATUS getNodeStatus();
+
+ void setNodeStatus(NODE_STATUS iStatus);
+
+ boolean checkNodeStatus(NODE_STATUS status);
+
+ void removeServer(String nodeLeftName, boolean removeOnlyDynamicServers);
+
+ DB_STATUS getDatabaseStatus(String iNode, String iDatabaseName);
+
+ void setDatabaseStatus(String iNode, String iDatabaseName, DB_STATUS iStatus);
+
+ int getNodesWithStatus(Collection iNodes, String databaseName, DB_STATUS... statuses);
+
+ ODistributedMessageService getMessageService();
+
+ ODistributedStrategy getDistributedStrategy();
+
+ void setDistributedStrategy(ODistributedStrategy streatgy);
+
+ // This is always used with deployToCluster=true!
+ boolean updateCachedDatabaseConfiguration(
+ String iDatabaseName, OModifiableDistributedConfiguration cfg, boolean iDeployToCluster);
+
+ long getNextMessageIdCounter();
+
+ String getNodeUuidByName(String name);
+
+ void updateLastClusterChange();
+
+ void reassignClustersOwnership(
+ String iNode,
+ String databaseName,
+ OModifiableDistributedConfiguration cfg,
+ boolean canCreateNewClusters);
+
+ /** Available means not OFFLINE, so ONLINE or SYNCHRONIZING. */
+ boolean isNodeAvailable(String iNodeName, String databaseName);
+
+ /** Returns true if the node status is ONLINE. */
+ boolean isNodeOnline(String iNodeName, String databaseName);
+
+ int getTotalNodes(String iDatabaseName);
+
+ int getAvailableNodes(String iDatabaseName);
+
+ int getAvailableNodes(Collection iNodes, String databaseName);
+
+ boolean isOffline();
+
+ int getLocalNodeId();
+
+ String getLocalNodeName();
+
+ ODocument getClusterConfiguration();
+
+ String getNodeNameById(int id);
+
+ int getNodeIdByName(String node);
+
+ ODocument getNodeConfigurationByUuid(String iNode, boolean useCache);
+
+ ODocument getLocalNodeConfiguration();
+
+ ODistributedConfiguration getDatabaseConfiguration(String iDatabaseName);
+
+ ODistributedConfiguration getDatabaseConfiguration(
+ String iDatabaseName, boolean createIfNotPresent);
+
+ /**
+ * Sends a distributed request against multiple servers.
+ *
+ * @param iDatabaseName
+ * @param iClusterNames
+ * @param iTargetNodeNames
+ * @param iTask
+ * @param messageId Message Id as long
+ * @param iExecutionMode
+ * @param localResult It's the result of the request executed locally
+ * @return
+ */
+ ODistributedResponse sendRequest(
+ String iDatabaseName,
+ Collection iClusterNames,
+ Collection iTargetNodeNames,
+ ORemoteTask iTask,
+ long messageId,
+ EXECUTION_MODE iExecutionMode,
+ Object localResult);
+
+ ODistributedResponse sendRequest(
+ String iDatabaseName,
+ Collection iClusterNames,
+ Collection iTargetNodeNames,
+ ORemoteTask iTask,
+ long messageId,
+ EXECUTION_MODE iExecutionMode,
+ Object localResult,
+ ODistributedResponseManagerFactory responseManagerFactory);
+
+ ODocument getStats();
+
+ Throwable convertException(Throwable original);
+
+ List getOnlineNodes(String iDatabaseName);
+
+ boolean installDatabase(
+ boolean iStartup, String databaseName, boolean forceDeployment, boolean tryWithDeltaFirst);
+
+ /**
+ * Returns the task factory manager. During first connect the minor version of the protocol is
+ * used.
+ */
+ ORemoteTaskFactoryManager getTaskFactoryManager();
+
+ Set getActiveServers();
+
+ /**
+ * Returns the cluster-wide time in milliseconds.
+ *
+ * Cluster tries to keep a cluster-wide time which might be different than the member's own
+ * system time. Cluster-wide time is -almost- the same on all members of the cluster.
+ */
+ long getClusterTime();
+
+ File getDefaultDatabaseConfigFile();
+
+ ODistributedLockManager getLockManagerRequester();
+
+ ODistributedLockManager getLockManagerExecutor();
+
+ /**
+ * Executes an operation protected by a distributed lock (one per database).
+ *
+ * @param Return type
+ * @param databaseName Database name
+ * @param timeoutLocking
+ * @param iCallback Operation @return The operation's result of type T
+ */
+ T executeInDistributedDatabaseLock(
+ String databaseName,
+ long timeoutLocking,
+ OModifiableDistributedConfiguration lastCfg,
+ OCallable iCallback);
+
+ /**
+ * Returns true if the quorum is present in terms of number of available nodes for full
+ * replication only. With sharding, instead, the quorum may depend on the involved clusters.
+ *
+ * @return
+ */
+ boolean isWriteQuorumPresent(String databaseName);
+
+ void notifyClients(String databaseName);
+
+ default void messageReceived(ODistributedRequest request) {}
+
+ default void messagePartitionCalculate(
+ ODistributedRequest request, Set involvedWorkerQueues) {}
+
+ default void messageBeforeOp(String op, ODistributedRequestId requestId) {}
+
+ default void messageAfterOp(String op, ODistributedRequestId requestId) {}
+
+ default void messageCurrentPayload(ODistributedRequestId requestId, Object responsePayload) {}
+
+ default void messageProcessStart(ODistributedRequest message) {}
+
+ default void messageProcessEnd(ODistributedRequest iRequest, Object responsePayload) {}
+}
diff --git a/server/src/main/java/com/orientechnologies/orient/server/distributed/task/OAbstractRemoteTask.java b/server/src/main/java/com/orientechnologies/orient/server/distributed/task/OAbstractRemoteTask.java
index 9b1f10e5cb0..b7a215a8e91 100644
--- a/server/src/main/java/com/orientechnologies/orient/server/distributed/task/OAbstractRemoteTask.java
+++ b/server/src/main/java/com/orientechnologies/orient/server/distributed/task/OAbstractRemoteTask.java
@@ -1,133 +1,133 @@
-/*
- *
- * * Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
- * *
- * * Licensed under the Apache License, Version 2.0 (the "License");
- * * you may not use this file except in compliance with the License.
- * * You may obtain a copy of the License at
- * *
- * * http://www.apache.org/licenses/LICENSE-2.0
- * *
- * * Unless required by applicable law or agreed to in writing, software
- * * distributed under the License is distributed on an "AS IS" BASIS,
- * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * * See the License for the specific language governing permissions and
- * * limitations under the License.
- * *
- * * For more information: http://orientdb.com
- *
- */
-package com.orientechnologies.orient.server.distributed.task;
-
-import com.orientechnologies.orient.core.command.OCommandDistributedReplicateRequest;
-import com.orientechnologies.orient.core.config.OGlobalConfiguration;
-import com.orientechnologies.orient.core.db.ODatabaseDocumentInternal;
-import com.orientechnologies.orient.server.OServer;
-import com.orientechnologies.orient.server.distributed.ODistributedRequestId;
-import com.orientechnologies.orient.server.distributed.ODistributedServerManager;
-import com.orientechnologies.orient.server.distributed.ORemoteTaskFactory;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-/**
- * Base class for Tasks to be executed remotely.
- *
- * @author Luca Garulli (l.garulli--at--orientdb.com)
- */
-public abstract class OAbstractRemoteTask implements ORemoteTask {
- public static final int[] ALL = new int[] {-1};
- protected static final int[] ANY = new int[] {-2};
- protected static final int[] FAST_NOLOCK = new int[] {-4};
-
- protected transient String nodeSource;
-
- /** Constructor used from unmarshalling. */
- public OAbstractRemoteTask() {}
-
- @Override
- public abstract String getName();
-
- public abstract OCommandDistributedReplicateRequest.QUORUM_TYPE getQuorumType();
-
- @Override
- public abstract Object execute(
- ODistributedRequestId requestId,
- OServer iServer,
- ODistributedServerManager iManager,
- ODatabaseDocumentInternal database)
- throws Exception;
-
- @Override
- public int[] getPartitionKey() {
- return ANY;
- }
-
- @Override
- public long getDistributedTimeout() {
- return OGlobalConfiguration.DISTRIBUTED_CRUD_TASK_SYNCH_TIMEOUT.getValueAsLong();
- }
-
- @Override
- public long getSynchronousTimeout(final int iSynchNodes) {
- if (iSynchNodes <= 0) return getDistributedTimeout();
-
- return getDistributedTimeout() * iSynchNodes;
- }
-
- @Override
- public void checkIsValid(final ODistributedServerManager dManager) {}
-
- @Override
- public long getTotalTimeout(final int iTotalNodes) {
- if (iTotalNodes <= 0) return getDistributedTimeout();
-
- return getDistributedTimeout() * iTotalNodes;
- }
-
- @Override
- public boolean hasResponse() {
- return true;
- }
-
- @Override
- public RESULT_STRATEGY getResultStrategy() {
- return RESULT_STRATEGY.ANY;
- }
-
- @Override
- public String toString() {
- return getName();
- }
-
- @Override
- public String getNodeSource() {
- return nodeSource;
- }
-
- @Override
- public void setNodeSource(String nodeSource) {
- this.nodeSource = nodeSource;
- }
-
- @Override
- public boolean isIdempotent() {
- return true;
- }
-
- @Override
- public boolean isNodeOnlineRequired() {
- return true;
- }
-
- @Override
- public boolean isUsingDatabase() {
- return true;
- }
-
- @Override
- public void toStream(DataOutput out) throws IOException {}
-
- @Override
- public void fromStream(DataInput in, ORemoteTaskFactory factory) throws IOException {}
-}
+/*
+ *
+ * * Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
+ * *
+ * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * you may not use this file except in compliance with the License.
+ * * You may obtain a copy of the License at
+ * *
+ * * http://www.apache.org/licenses/LICENSE-2.0
+ * *
+ * * Unless required by applicable law or agreed to in writing, software
+ * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * See the License for the specific language governing permissions and
+ * * limitations under the License.
+ * *
+ * * For more information: http://orientdb.com
+ *
+ */
+package com.orientechnologies.orient.server.distributed.task;
+
+import com.orientechnologies.orient.core.command.OCommandDistributedReplicateRequest;
+import com.orientechnologies.orient.core.config.OGlobalConfiguration;
+import com.orientechnologies.orient.core.db.ODatabaseDocumentInternal;
+import com.orientechnologies.orient.server.OServer;
+import com.orientechnologies.orient.server.distributed.ODistributedRequestId;
+import com.orientechnologies.orient.server.distributed.ODistributedServerManager;
+import com.orientechnologies.orient.server.distributed.ORemoteTaskFactory;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+/**
+ * Base class for Tasks to be executed remotely.
+ *
+ * @author Luca Garulli (l.garulli--at--orientdb.com)
+ */
+public abstract class OAbstractRemoteTask implements ORemoteTask {
+ public static final int[] ALL = new int[] {-1};
+ protected static final int[] ANY = new int[] {-2};
+ protected static final int[] FAST_NOLOCK = new int[] {-4};
+
+ protected transient String nodeSource;
+
+ /** Constructor used from unmarshalling. */
+ public OAbstractRemoteTask() {}
+
+ @Override
+ public abstract String getName();
+
+ public abstract OCommandDistributedReplicateRequest.QUORUM_TYPE getQuorumType();
+
+ @Override
+ public abstract Object execute(
+ ODistributedRequestId requestId,
+ OServer iServer,
+ ODistributedServerManager iManager,
+ ODatabaseDocumentInternal database)
+ throws Exception;
+
+ @Override
+ public int[] getPartitionKey() {
+ return ANY;
+ }
+
+ @Override
+ public long getDistributedTimeout() {
+ return OGlobalConfiguration.DISTRIBUTED_CRUD_TASK_SYNCH_TIMEOUT.getValueAsLong();
+ }
+
+ @Override
+ public long getSynchronousTimeout(final int iSynchNodes) {
+ if (iSynchNodes <= 0) return getDistributedTimeout();
+
+ return getDistributedTimeout() * iSynchNodes;
+ }
+
+ @Override
+ public void checkIsValid(final ODistributedServerManager dManager) {}
+
+ @Override
+ public long getTotalTimeout(final int iTotalNodes) {
+ if (iTotalNodes <= 0) return getDistributedTimeout();
+
+ return getDistributedTimeout() * iTotalNodes;
+ }
+
+ @Override
+ public boolean hasResponse() {
+ return true;
+ }
+
+ @Override
+ public RESULT_STRATEGY getResultStrategy() {
+ return RESULT_STRATEGY.ANY;
+ }
+
+ @Override
+ public String toString() {
+ return getName();
+ }
+
+ @Override
+ public String getNodeSource() {
+ return nodeSource;
+ }
+
+ @Override
+ public void setNodeSource(String nodeSource) {
+ this.nodeSource = nodeSource;
+ }
+
+ @Override
+ public boolean isIdempotent() {
+ return true;
+ }
+
+ @Override
+ public boolean isNodeOnlineRequired() {
+ return true;
+ }
+
+ @Override
+ public boolean isUsingDatabase() {
+ return true;
+ }
+
+ @Override
+ public void toStream(DataOutput out) throws IOException {}
+
+ @Override
+ public void fromStream(DataInput in, ORemoteTaskFactory factory) throws IOException {}
+}
diff --git a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpRequestException.java b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpRequestException.java
index 7693963d700..3e804b9b8c4 100755
--- a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpRequestException.java
+++ b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpRequestException.java
@@ -1,35 +1,35 @@
-/*
- *
- * * Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
- * *
- * * Licensed under the Apache License, Version 2.0 (the "License");
- * * you may not use this file except in compliance with the License.
- * * You may obtain a copy of the License at
- * *
- * * http://www.apache.org/licenses/LICENSE-2.0
- * *
- * * Unless required by applicable law or agreed to in writing, software
- * * distributed under the License is distributed on an "AS IS" BASIS,
- * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * * See the License for the specific language governing permissions and
- * * limitations under the License.
- * *
- * * For more information: http://orientdb.com
- *
- */
-package com.orientechnologies.orient.server.network.protocol.http;
-
-import com.orientechnologies.common.exception.OSystemException;
-
-public class OHttpRequestException extends OSystemException {
-
- private static final long serialVersionUID = 12132321321321L;
-
- public OHttpRequestException(OHttpRequestException exception) {
- super(exception);
- }
-
- public OHttpRequestException(String message) {
- super(message);
- }
-}
+/*
+ *
+ * * Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
+ * *
+ * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * you may not use this file except in compliance with the License.
+ * * You may obtain a copy of the License at
+ * *
+ * * http://www.apache.org/licenses/LICENSE-2.0
+ * *
+ * * Unless required by applicable law or agreed to in writing, software
+ * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * See the License for the specific language governing permissions and
+ * * limitations under the License.
+ * *
+ * * For more information: http://orientdb.com
+ *
+ */
+package com.orientechnologies.orient.server.network.protocol.http;
+
+import com.orientechnologies.common.exception.OSystemException;
+
+public class OHttpRequestException extends OSystemException {
+
+ private static final long serialVersionUID = 12132321321321L;
+
+ public OHttpRequestException(OHttpRequestException exception) {
+ super(exception);
+ }
+
+ public OHttpRequestException(String message) {
+ super(message);
+ }
+}
diff --git a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/OServerCommand.java b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/OServerCommand.java
index 9e134ffa568..6f53888bfaa 100644
--- a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/OServerCommand.java
+++ b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/OServerCommand.java
@@ -1,56 +1,56 @@
-/*
- *
- * * Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
- * *
- * * Licensed under the Apache License, Version 2.0 (the "License");
- * * you may not use this file except in compliance with the License.
- * * You may obtain a copy of the License at
- * *
- * * http://www.apache.org/licenses/LICENSE-2.0
- * *
- * * Unless required by applicable law or agreed to in writing, software
- * * distributed under the License is distributed on an "AS IS" BASIS,
- * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * * See the License for the specific language governing permissions and
- * * limitations under the License.
- * *
- * * For more information: http://orientdb.com
- *
- */
-package com.orientechnologies.orient.server.network.protocol.http.command;
-
-import com.orientechnologies.orient.server.OServer;
-import com.orientechnologies.orient.server.network.protocol.http.OHttpRequest;
-import com.orientechnologies.orient.server.network.protocol.http.OHttpResponse;
-
-/**
- * Generic interface for server-side commands.
- *
- * @author Luca Garulli (l.garulli--(at)--orientdb.com)
- */
-public interface OServerCommand {
- /**
- * Called before to execute. Useful to make checks.
- *
- * @param iResponse TODO
- */
- public boolean beforeExecute(OHttpRequest iRequest, OHttpResponse iResponse) throws Exception;
-
- /**
- * Called after to execute. Useful to free resources.
- *
- * @param iResponse TODO
- */
- public boolean afterExecute(OHttpRequest iRequest, OHttpResponse iResponse) throws Exception;
-
- /**
- * Executes the command requested.
- *
- * @return boolean value that indicates if this command is part of a chain
- */
- public boolean execute(OHttpRequest iRequest, OHttpResponse iResponse) throws Exception;
-
- public String[] getNames();
-
- public void configure(OServer server);
-}
+/*
+ *
+ * * Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
+ * *
+ * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * you may not use this file except in compliance with the License.
+ * * You may obtain a copy of the License at
+ * *
+ * * http://www.apache.org/licenses/LICENSE-2.0
+ * *
+ * * Unless required by applicable law or agreed to in writing, software
+ * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * See the License for the specific language governing permissions and
+ * * limitations under the License.
+ * *
+ * * For more information: http://orientdb.com
+ *
+ */
+package com.orientechnologies.orient.server.network.protocol.http.command;
+
+import com.orientechnologies.orient.server.OServer;
+import com.orientechnologies.orient.server.network.protocol.http.OHttpRequest;
+import com.orientechnologies.orient.server.network.protocol.http.OHttpResponse;
+
+/**
+ * Generic interface for server-side commands.
+ *
+ * @author Luca Garulli (l.garulli--(at)--orientdb.com)
+ */
+public interface OServerCommand {
+ /**
+ * Called before to execute. Useful to make checks.
+ *
+ * @param iResponse TODO
+ */
+ public boolean beforeExecute(OHttpRequest iRequest, OHttpResponse iResponse) throws Exception;
+
+ /**
+ * Called after to execute. Useful to free resources.
+ *
+ * @param iResponse TODO
+ */
+ public boolean afterExecute(OHttpRequest iRequest, OHttpResponse iResponse) throws Exception;
+
+ /**
+ * Executes the command requested.
+ *
+ * @return boolean value that indicates if this command is part of a chain
+ */
+ public boolean execute(OHttpRequest iRequest, OHttpResponse iResponse) throws Exception;
+
+ public String[] getNames();
+
+ public void configure(OServer server);
+}
diff --git a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandConfigurableAbstract.java b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandConfigurableAbstract.java
index 47da9e6711e..755a6903ec7 100644
--- a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandConfigurableAbstract.java
+++ b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandConfigurableAbstract.java
@@ -1,39 +1,39 @@
-/*
- *
- * * Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
- * *
- * * Licensed under the Apache License, Version 2.0 (the "License");
- * * you may not use this file except in compliance with the License.
- * * You may obtain a copy of the License at
- * *
- * * http://www.apache.org/licenses/LICENSE-2.0
- * *
- * * Unless required by applicable law or agreed to in writing, software
- * * distributed under the License is distributed on an "AS IS" BASIS,
- * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * * See the License for the specific language governing permissions and
- * * limitations under the License.
- * *
- * * For more information: http://orientdb.com
- *
- */
-package com.orientechnologies.orient.server.network.protocol.http.command.get;
-
-import com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAbstract;
-
-public abstract class OServerCommandConfigurableAbstract extends OServerCommandAbstract {
- private final String[] pattern;
-
- public OServerCommandConfigurableAbstract(final String iPattern) {
- pattern = iPattern.split(" ");
- }
-
- public OServerCommandConfigurableAbstract(final String[] iPattern) {
- pattern = iPattern;
- }
-
- @Override
- public String[] getNames() {
- return pattern;
- }
-}
+/*
+ *
+ * * Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
+ * *
+ * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * you may not use this file except in compliance with the License.
+ * * You may obtain a copy of the License at
+ * *
+ * * http://www.apache.org/licenses/LICENSE-2.0
+ * *
+ * * Unless required by applicable law or agreed to in writing, software
+ * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * See the License for the specific language governing permissions and
+ * * limitations under the License.
+ * *
+ * * For more information: http://orientdb.com
+ *
+ */
+package com.orientechnologies.orient.server.network.protocol.http.command.get;
+
+import com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAbstract;
+
+public abstract class OServerCommandConfigurableAbstract extends OServerCommandAbstract {
+ private final String[] pattern;
+
+ public OServerCommandConfigurableAbstract(final String iPattern) {
+ pattern = iPattern.split(" ");
+ }
+
+ public OServerCommandConfigurableAbstract(final String[] iPattern) {
+ pattern = iPattern;
+ }
+
+ @Override
+ public String[] getNames() {
+ return pattern;
+ }
+}
diff --git a/server/src/main/resources/META-INF/MANIFEST.MF b/server/src/main/resources/META-INF/MANIFEST.MF
index 9c256828519..6c5a02410eb 100644
--- a/server/src/main/resources/META-INF/MANIFEST.MF
+++ b/server/src/main/resources/META-INF/MANIFEST.MF
@@ -1,2 +1,2 @@
-Manifest-Version: 1.0
+Manifest-Version: 1.0
Class-Path: orient-database-enterprise.jar
\ No newline at end of file
diff --git a/server/src/site/clientaccesspolicy.xml b/server/src/site/clientaccesspolicy.xml
index 85597c5bbbd..d222377bc35 100644
--- a/server/src/site/clientaccesspolicy.xml
+++ b/server/src/site/clientaccesspolicy.xml
@@ -1,33 +1,33 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/server/src/site/crossdomain.xml b/server/src/site/crossdomain.xml
index 72f10d4a914..7870d9ed9ce 100644
--- a/server/src/site/crossdomain.xml
+++ b/server/src/site/crossdomain.xml
@@ -1,25 +1,25 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/server/src/site/index.htm b/server/src/site/index.htm
index ebd9e0e8c77..8eb8ee06d70 100644
--- a/server/src/site/index.htm
+++ b/server/src/site/index.htm
@@ -1,37 +1,37 @@
-
-
-
-
-
- Redirecting to OrientDB Studio...
-
-
-
-
-
- Redirecting to OrientDB Studio...
-
-
+
+
+
+
+
+ Redirecting to OrientDB Studio...
+
+
+
+
+
+ Redirecting to OrientDB Studio...
+
+
diff --git a/server/src/site/robots.txt b/server/src/site/robots.txt
index 70c2374d7b6..1f53798bb4f 100644
--- a/server/src/site/robots.txt
+++ b/server/src/site/robots.txt
@@ -1,2 +1,2 @@
-User-agent: *
-Disallow: /
+User-agent: *
+Disallow: /
diff --git a/tests/src/main/java/emptyfile b/tests/src/main/java/emptyfile
index d3f5a12faa9..8b137891791 100644
--- a/tests/src/main/java/emptyfile
+++ b/tests/src/main/java/emptyfile
@@ -1 +1 @@
-
+
diff --git a/tests/src/main/resources/emptyfile b/tests/src/main/resources/emptyfile
index d3f5a12faa9..8b137891791 100644
--- a/tests/src/main/resources/emptyfile
+++ b/tests/src/main/resources/emptyfile
@@ -1 +1 @@
-
+
diff --git a/tests/src/test/java/com/orientechnologies/orient/test/database/auto/BinaryTest.java b/tests/src/test/java/com/orientechnologies/orient/test/database/auto/BinaryTest.java
index 8d4147f97b9..6e68f955a78 100644
--- a/tests/src/test/java/com/orientechnologies/orient/test/database/auto/BinaryTest.java
+++ b/tests/src/test/java/com/orientechnologies/orient/test/database/auto/BinaryTest.java
@@ -1,77 +1,77 @@
-/*
- * Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.orientechnologies.orient.test.database.auto;
-
-import com.orientechnologies.orient.core.id.ORID;
-import com.orientechnologies.orient.core.metadata.schema.OType;
-import com.orientechnologies.orient.core.record.impl.OBlob;
-import com.orientechnologies.orient.core.record.impl.ODocument;
-import com.orientechnologies.orient.core.record.impl.ORecordBytes;
-import org.testng.Assert;
-import org.testng.annotations.Optional;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Test;
-
-public class BinaryTest extends DocumentDBBaseTest {
- private ORID rid;
-
- @Parameters(value = "url")
- public BinaryTest(@Optional String url) {
- super(url);
- }
-
- @Test
- public void testMixedCreateEmbedded() {
- ODocument doc = new ODocument();
- doc.field("binary", "Binary data".getBytes());
-
- doc.save(database.getClusterNameById(database.getDefaultClusterId()));
-
- doc.reload();
- Assert.assertEquals(new String((byte[]) doc.field("binary", OType.BINARY)), "Binary data");
- }
-
- @Test
- public void testBasicCreateExternal() {
- OBlob record = new ORecordBytes(database, "This is a test".getBytes());
- record.save();
- rid = record.getIdentity();
- }
-
- @Test(dependsOnMethods = "testBasicCreateExternal")
- public void testBasicReadExternal() {
- OBlob record = database.load(rid);
-
- Assert.assertEquals("This is a test", new String(record.toStream()));
- }
-
- @Test(dependsOnMethods = "testBasicReadExternal")
- public void testMixedCreateExternal() {
- ODocument doc = new ODocument();
- doc.field("binary", new ORecordBytes(database, "Binary data".getBytes()));
-
- doc.save(database.getClusterNameById(database.getDefaultClusterId()));
- rid = doc.getIdentity();
- }
-
- @Test(dependsOnMethods = "testMixedCreateExternal")
- public void testMixedReadExternal() {
- ODocument doc = new ODocument(rid);
- doc.reload();
-
- Assert.assertEquals("Binary data", new String(((OBlob) doc.field("binary")).toStream()));
- }
-}
+/*
+ * Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.orientechnologies.orient.test.database.auto;
+
+import com.orientechnologies.orient.core.id.ORID;
+import com.orientechnologies.orient.core.metadata.schema.OType;
+import com.orientechnologies.orient.core.record.impl.OBlob;
+import com.orientechnologies.orient.core.record.impl.ODocument;
+import com.orientechnologies.orient.core.record.impl.ORecordBytes;
+import org.testng.Assert;
+import org.testng.annotations.Optional;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+public class BinaryTest extends DocumentDBBaseTest {
+ private ORID rid;
+
+ @Parameters(value = "url")
+ public BinaryTest(@Optional String url) {
+ super(url);
+ }
+
+ @Test
+ public void testMixedCreateEmbedded() {
+ ODocument doc = new ODocument();
+ doc.field("binary", "Binary data".getBytes());
+
+ doc.save(database.getClusterNameById(database.getDefaultClusterId()));
+
+ doc.reload();
+ Assert.assertEquals(new String((byte[]) doc.field("binary", OType.BINARY)), "Binary data");
+ }
+
+ @Test
+ public void testBasicCreateExternal() {
+ OBlob record = new ORecordBytes(database, "This is a test".getBytes());
+ record.save();
+ rid = record.getIdentity();
+ }
+
+ @Test(dependsOnMethods = "testBasicCreateExternal")
+ public void testBasicReadExternal() {
+ OBlob record = database.load(rid);
+
+ Assert.assertEquals("This is a test", new String(record.toStream()));
+ }
+
+ @Test(dependsOnMethods = "testBasicReadExternal")
+ public void testMixedCreateExternal() {
+ ODocument doc = new ODocument();
+ doc.field("binary", new ORecordBytes(database, "Binary data".getBytes()));
+
+ doc.save(database.getClusterNameById(database.getDefaultClusterId()));
+ rid = doc.getIdentity();
+ }
+
+ @Test(dependsOnMethods = "testMixedCreateExternal")
+ public void testMixedReadExternal() {
+ ODocument doc = new ODocument(rid);
+ doc.reload();
+
+ Assert.assertEquals("Binary data", new String(((OBlob) doc.field("binary")).toStream()));
+ }
+}
diff --git a/tests/src/test/java/com/orientechnologies/orient/test/database/auto/benchmark/LineResultData.java b/tests/src/test/java/com/orientechnologies/orient/test/database/auto/benchmark/LineResultData.java
index 720cb40bb7f..e7471e559d4 100755
--- a/tests/src/test/java/com/orientechnologies/orient/test/database/auto/benchmark/LineResultData.java
+++ b/tests/src/test/java/com/orientechnologies/orient/test/database/auto/benchmark/LineResultData.java
@@ -1,33 +1,33 @@
-package com.orientechnologies.orient.test.database.auto.benchmark;
-
-import java.util.List;
-
-public class LineResultData {
- private String seriesName;
- private List xData;
- private List yData;
-
- public LineResultData(final String seriesName) {
- this.seriesName = seriesName;
- }
-
- public void addXData(final List xData) {
- this.xData = xData;
- }
-
- public void addYData(final List yData) {
- this.yData = yData;
- }
-
- public String getSeriesName() {
- return this.seriesName;
- }
-
- public List getxData() {
- return xData;
- }
-
- public List getyData() {
- return yData;
- }
-}
+package com.orientechnologies.orient.test.database.auto.benchmark;
+
+import java.util.List;
+
+public class LineResultData {
+ private String seriesName;
+ private List xData;
+ private List yData;
+
+ public LineResultData(final String seriesName) {
+ this.seriesName = seriesName;
+ }
+
+ public void addXData(final List xData) {
+ this.xData = xData;
+ }
+
+ public void addYData(final List yData) {
+ this.yData = yData;
+ }
+
+ public String getSeriesName() {
+ return this.seriesName;
+ }
+
+ public List getxData() {
+ return xData;
+ }
+
+ public List getyData() {
+ return yData;
+ }
+}
diff --git a/tests/src/test/java/com/orientechnologies/orient/test/database/auto/benchmark/Plotter.java b/tests/src/test/java/com/orientechnologies/orient/test/database/auto/benchmark/Plotter.java
index 677c89d66f0..71bf5517071 100755
--- a/tests/src/test/java/com/orientechnologies/orient/test/database/auto/benchmark/Plotter.java
+++ b/tests/src/test/java/com/orientechnologies/orient/test/database/auto/benchmark/Plotter.java
@@ -1,113 +1,113 @@
-package com.orientechnologies.orient.test.database.auto.benchmark;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import org.knowm.xchart.*;
-import org.knowm.xchart.internal.chartpart.Chart;
-import org.knowm.xchart.style.Styler;
-
-public class Plotter {
- public CategoryChart getCategoryChart(
- final String chartName,
- final String xAxisTitle,
- final String yAxisTitle,
- final Styler.LegendPosition position) {
- final CategoryChart chart =
- new CategoryChartBuilder()
- .width(500)
- .height(500)
- .title(chartName)
- .xAxisTitle(xAxisTitle)
- .theme(Styler.ChartTheme.Matlab)
- .yAxisTitle(yAxisTitle)
- .build();
- chart.getStyler().setLegendPosition(position);
- chart.getStyler().setAvailableSpaceFill(.96);
- return chart;
- }
-
- public XYChart getXYChart(
- final String chartName,
- final String xAxisTitle,
- final String yAxisTitle,
- final Styler.LegendPosition position) {
- final XYChart chart =
- new XYChartBuilder()
- .width(500)
- .height(500) // .title(chartName)
- .theme(Styler.ChartTheme.Matlab)
- .xAxisTitle(xAxisTitle)
- .yAxisTitle(yAxisTitle)
- .build();
- chart.getStyler().setChartTitleVisible(true);
- chart.getStyler().setLegendPosition(position);
- chart.getStyler().setYAxisLogarithmic(false);
- chart.getStyler().setDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle.Line);
- chart.getStyler().setXAxisLabelRotation(45);
- return chart;
- }
-
- public Histogram addSeriesToHistogram(final CategoryChart chart) {
- Histogram histogram = new Histogram(getGaussianData(10000), 10, -10, 10);
- chart.addSeries(
- "histogram",
- histogram.getxAxisData(),
- histogram.getyAxisData(),
- getFakeErrorData(histogram.getxAxisData().size()));
- return histogram;
- }
-
- public Histogram addSeriesToHistogram(final CategoryChart chart, final List data) {
- Histogram histogram = new Histogram(data, 10, -10, 10);
- chart.addSeries("histogram", histogram.getxAxisData(), histogram.getyAxisData());
- return histogram;
- }
-
- public Histogram addSeriesToHistogram(
- final CategoryChart chart, final List data, final List errorData) {
- Histogram histogram = new Histogram(data, 10, -10, 10);
- chart.addSeries("histogram", histogram.getxAxisData(), histogram.getyAxisData(), errorData);
- return histogram;
- }
-
- public XYChart addSeriesToLineChart(
- final XYChart chart, final String seriesName, final List xData, final List yData) {
- chart.addSeries(seriesName, xData, yData);
- return chart;
- }
-
- public void addSeriesToLineChart(final XYChart chart, final List seriesData) {
- for (final LineResultData lrd : seriesData) {
- this.addSeriesToLineChart(chart, lrd.getSeriesName(), lrd.getxData(), lrd.getyData());
- }
- }
-
- private List getGaussianData(int count) {
- List data = new ArrayList(count);
- Random r = new Random();
- for (int i = 0; i < count; i++) {
- data.add(r.nextGaussian() * 5);
- }
- return data;
- }
-
- private List getFakeErrorData(int count) {
- final List data = new ArrayList(count);
- Random r = new Random();
- for (int i = 0; i < count; i++) {
- data.add(r.nextDouble() * 200);
- }
- return data;
- }
-
- public void exportChartAsPDF(final Chart chart, final String fileName) throws IOException {
- VectorGraphicsEncoder.saveVectorGraphic(
- chart, fileName, VectorGraphicsEncoder.VectorGraphicsFormat.PDF);
- }
-
- public void exportChartAsPNG(final Chart chart, final String fileName) throws IOException {
- BitmapEncoder.saveBitmap(chart, fileName, BitmapEncoder.BitmapFormat.PNG);
- }
-}
+package com.orientechnologies.orient.test.database.auto.benchmark;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+import org.knowm.xchart.*;
+import org.knowm.xchart.internal.chartpart.Chart;
+import org.knowm.xchart.style.Styler;
+
+public class Plotter {
+ public CategoryChart getCategoryChart(
+ final String chartName,
+ final String xAxisTitle,
+ final String yAxisTitle,
+ final Styler.LegendPosition position) {
+ final CategoryChart chart =
+ new CategoryChartBuilder()
+ .width(500)
+ .height(500)
+ .title(chartName)
+ .xAxisTitle(xAxisTitle)
+ .theme(Styler.ChartTheme.Matlab)
+ .yAxisTitle(yAxisTitle)
+ .build();
+ chart.getStyler().setLegendPosition(position);
+ chart.getStyler().setAvailableSpaceFill(.96);
+ return chart;
+ }
+
+ public XYChart getXYChart(
+ final String chartName,
+ final String xAxisTitle,
+ final String yAxisTitle,
+ final Styler.LegendPosition position) {
+ final XYChart chart =
+ new XYChartBuilder()
+ .width(500)
+ .height(500) // .title(chartName)
+ .theme(Styler.ChartTheme.Matlab)
+ .xAxisTitle(xAxisTitle)
+ .yAxisTitle(yAxisTitle)
+ .build();
+ chart.getStyler().setChartTitleVisible(true);
+ chart.getStyler().setLegendPosition(position);
+ chart.getStyler().setYAxisLogarithmic(false);
+ chart.getStyler().setDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle.Line);
+ chart.getStyler().setXAxisLabelRotation(45);
+ return chart;
+ }
+
+ public Histogram addSeriesToHistogram(final CategoryChart chart) {
+ Histogram histogram = new Histogram(getGaussianData(10000), 10, -10, 10);
+ chart.addSeries(
+ "histogram",
+ histogram.getxAxisData(),
+ histogram.getyAxisData(),
+ getFakeErrorData(histogram.getxAxisData().size()));
+ return histogram;
+ }
+
+ public Histogram addSeriesToHistogram(final CategoryChart chart, final List data) {
+ Histogram histogram = new Histogram(data, 10, -10, 10);
+ chart.addSeries("histogram", histogram.getxAxisData(), histogram.getyAxisData());
+ return histogram;
+ }
+
+ public Histogram addSeriesToHistogram(
+ final CategoryChart chart, final List data, final List errorData) {
+ Histogram histogram = new Histogram(data, 10, -10, 10);
+ chart.addSeries("histogram", histogram.getxAxisData(), histogram.getyAxisData(), errorData);
+ return histogram;
+ }
+
+ public XYChart addSeriesToLineChart(
+ final XYChart chart, final String seriesName, final List xData, final List yData) {
+ chart.addSeries(seriesName, xData, yData);
+ return chart;
+ }
+
+ public void addSeriesToLineChart(final XYChart chart, final List seriesData) {
+ for (final LineResultData lrd : seriesData) {
+ this.addSeriesToLineChart(chart, lrd.getSeriesName(), lrd.getxData(), lrd.getyData());
+ }
+ }
+
+ private List getGaussianData(int count) {
+ List data = new ArrayList(count);
+ Random r = new Random();
+ for (int i = 0; i < count; i++) {
+ data.add(r.nextGaussian() * 5);
+ }
+ return data;
+ }
+
+ private List getFakeErrorData(int count) {
+ final List data = new ArrayList(count);
+ Random r = new Random();
+ for (int i = 0; i < count; i++) {
+ data.add(r.nextDouble() * 200);
+ }
+ return data;
+ }
+
+ public void exportChartAsPDF(final Chart chart, final String fileName) throws IOException {
+ VectorGraphicsEncoder.saveVectorGraphic(
+ chart, fileName, VectorGraphicsEncoder.VectorGraphicsFormat.PDF);
+ }
+
+ public void exportChartAsPNG(final Chart chart, final String fileName) throws IOException {
+ BitmapEncoder.saveBitmap(chart, fileName, BitmapEncoder.BitmapFormat.PNG);
+ }
+}
diff --git a/tests/src/test/java/com/orientechnologies/orient/test/database/auto/benchmark/PlotterTest.java b/tests/src/test/java/com/orientechnologies/orient/test/database/auto/benchmark/PlotterTest.java
index c545beacb8c..84b59e57498 100755
--- a/tests/src/test/java/com/orientechnologies/orient/test/database/auto/benchmark/PlotterTest.java
+++ b/tests/src/test/java/com/orientechnologies/orient/test/database/auto/benchmark/PlotterTest.java
@@ -1,46 +1,46 @@
-package com.orientechnologies.orient.test.database.auto.benchmark;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.knowm.xchart.CategoryChart;
-import org.knowm.xchart.XYChart;
-import org.knowm.xchart.style.Styler;
-
-public class PlotterTest {
- private Plotter plotter;
-
- @Before
- public void setup() {
- plotter = new Plotter();
- }
-
- @Test
- public void histogram() throws Exception {
- final CategoryChart chart =
- plotter.getCategoryChart(
- "Test chart name", "Test x axis", "Test y axis", Styler.LegendPosition.InsideNW);
- plotter.addSeriesToHistogram(chart);
- plotter.exportChartAsPDF(chart, "target/histogram");
- Assert.assertTrue(new File("target/histogram.pdf").exists());
- }
-
- @Test
- public void lineChart() throws Exception {
- final XYChart chart =
- plotter.getXYChart(
- "Test chart name", "Test x axis", "Test y axis", Styler.LegendPosition.InsideNW);
- final List xData = new ArrayList<>();
- final List yData = new ArrayList<>();
- for (int i = -3; i <= 3; i++) {
- xData.add(i);
- yData.add(Math.pow(10, i));
- }
- plotter.addSeriesToLineChart(chart, "10^x", xData, yData);
- plotter.exportChartAsPDF(chart, "target/lineChart");
- Assert.assertTrue(new File("target/lineChart.pdf").exists());
- }
-}
+package com.orientechnologies.orient.test.database.auto.benchmark;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.knowm.xchart.CategoryChart;
+import org.knowm.xchart.XYChart;
+import org.knowm.xchart.style.Styler;
+
+public class PlotterTest {
+ private Plotter plotter;
+
+ @Before
+ public void setup() {
+ plotter = new Plotter();
+ }
+
+ @Test
+ public void histogram() throws Exception {
+ final CategoryChart chart =
+ plotter.getCategoryChart(
+ "Test chart name", "Test x axis", "Test y axis", Styler.LegendPosition.InsideNW);
+ plotter.addSeriesToHistogram(chart);
+ plotter.exportChartAsPDF(chart, "target/histogram");
+ Assert.assertTrue(new File("target/histogram.pdf").exists());
+ }
+
+ @Test
+ public void lineChart() throws Exception {
+ final XYChart chart =
+ plotter.getXYChart(
+ "Test chart name", "Test x axis", "Test y axis", Styler.LegendPosition.InsideNW);
+ final List xData = new ArrayList<>();
+ final List yData = new ArrayList<>();
+ for (int i = -3; i <= 3; i++) {
+ xData.add(i);
+ yData.add(Math.pow(10, i));
+ }
+ plotter.addSeriesToLineChart(chart, "10^x", xData, yData);
+ plotter.exportChartAsPDF(chart, "target/lineChart");
+ Assert.assertTrue(new File("target/lineChart.pdf").exists());
+ }
+}
diff --git a/tests/src/test/java/com/orientechnologies/orient/test/database/base/OrientThreadTest.java b/tests/src/test/java/com/orientechnologies/orient/test/database/base/OrientThreadTest.java
index 72a60ade0f5..ef06d16ffb9 100644
--- a/tests/src/test/java/com/orientechnologies/orient/test/database/base/OrientThreadTest.java
+++ b/tests/src/test/java/com/orientechnologies/orient/test/database/base/OrientThreadTest.java
@@ -1,29 +1,29 @@
-/*
- * Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.orientechnologies.orient.test.database.base;
-
-import com.orientechnologies.common.test.SpeedTestMultiThreads;
-import com.orientechnologies.common.test.SpeedTestThread;
-
-public abstract class OrientThreadTest extends SpeedTestThread {
- protected OrientThreadTest(SpeedTestMultiThreads iParent, int threadId) {
- super(iParent, threadId);
- }
-
- protected OrientThreadTest(SpeedTestMultiThreads iParent, int threadId, long iCycles) {
- super(iParent, threadId, iCycles);
- }
-}
+/*
+ * Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.orientechnologies.orient.test.database.base;
+
+import com.orientechnologies.common.test.SpeedTestMultiThreads;
+import com.orientechnologies.common.test.SpeedTestThread;
+
+public abstract class OrientThreadTest extends SpeedTestThread {
+ protected OrientThreadTest(SpeedTestMultiThreads iParent, int threadId) {
+ super(iParent, threadId);
+ }
+
+ protected OrientThreadTest(SpeedTestMultiThreads iParent, int threadId, long iCycles) {
+ super(iParent, threadId, iCycles);
+ }
+}
diff --git a/tools/META-INF/MANIFEST.MF b/tools/META-INF/MANIFEST.MF
index 1cd1a18f5ee..b822f9bf457 100755
--- a/tools/META-INF/MANIFEST.MF
+++ b/tools/META-INF/MANIFEST.MF
@@ -1,76 +1,76 @@
-Manifest-Version: 1.0
-Export-Package: com.orientechnologies.orient.console;uses:="com.orient
- echnologies.orient.enterprise.command,com.orientechnologies.orient.co
- re.storage.impl.local,com.orientechnologies.orient.core.serialization
- .serializer.record.string,com.orientechnologies.orient.core.tx,com.or
- ientechnologies.orient.core.config,com.orientechnologies.orient.core,
- com.orientechnologies.orient.core.sql,com.orientechnologies.common.io
- ,com.orientechnologies.common.exception,com.orientechnologies.common.
- profiler,com.orientechnologies.common.console,com.orientechnologies.o
- rient.core.db,com.orientechnologies.orient.core.iterator,com.orientec
- hnologies.orient.core.index,com.orientechnologies.orient.core.metadat
- a.schema,com.orientechnologies.orient.core.dictionary,com.orientechno
- logies.orient.core.intent,com.orientechnologies.common.listener,com.o
- rientechnologies.orient.client.remote,com.orientechnologies.orient.co
- re.db.tool,com.orientechnologies.orient.core.command.script,com.orien
- technologies.orient.core.record,com.orientechnologies.orient.core.exc
- eption,com.orientechnologies.orient.core.query,com.orientechnologies.
- orient.core.serialization.serializer.record,com.orientechnologies.ori
- ent.core.db.document,com.orientechnologies.orient.core.cache,com.orie
- ntechnologies.orient.core.storage,com.orientechnologies.orient.core.c
- ommand,com.orientechnologies.orient.core.metadata,com.orientechnologi
- es.orient.core.id,com.orientechnologies.orient.core.record.impl,com.o
- rientechnologies.orient.core.db.record,com.orientechnologies.orient.c
- ore.sql.query,com.orientechnologies.orient.core.storage.memory,c
- om.orientechnologies.common.console.annotation,com.orientechnologies.
- orient.core.type"
-Implementation-Title: OrientDB Tools
-Built-By: =4@59
-Tool: Bnd-1.15.0
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Implementation-Vendor: Orient Technologies
-Implementation-Vendor-Id: com.orientechnologies
-Specification-Title: OrientDB Tools
-Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
-Bundle-SymbolicName: com.orientechnologies.orientdb-tools
-Implementation-Version: 1.0-SNAPSHOT
-Class-Path: orientdb-client-1.0-SNAPSHOT.jar orientdb-enterprise-1.0-S
- NAPSHOT.jar orientdb-core-1.0-SNAPSHOT.jar orient-commons-1.0-SNAPSHO
- T.jar persistence-api-1.0.jar
-Specification-Vendor: Orient Technologies
-Bundle-Name: OrientDB Tools
-Created-By: Apache Maven Bundle Plugin
-Bundle-Vendor: Orient Technologies
-Bundle-Version: 1.0.0.qualifier
-Build-Jdk: 1.6.0_30
-Bnd-LastModified: 1333567019002
-Bundle-ManifestVersion: 2
-Bundle-Description: OrientDB NoSQL document graph dbms
-Bundle-DocURL: http://www.orientechnologies.com
-Import-Package: com.orientechnologies.common.console,com.orientechnolo
- gies.common.console.annotation,com.orientechnologies.common.exception
- ,com.orientechnologies.common.io,com.orientechnologies.common.listene
- r,com.orientechnologies.common.profiler,com.orientechnologies.orient.
- client.remote,com.orientechnologies.orient.core,com.orientechnologies
- .orient.core.cache,com.orientechnologies.orient.core.command,com.orie
- ntechnologies.orient.core.command.script,com.orientechnologies.orient
- .core.config,com.orientechnologies.orient.core.db,com.orientechnologi
- es.orient.core.db.document,com.orientechnologies.orient.core.db.recor
- d,com.orientechnologies.orient.core.db.tool,com.orientechnologies.ori
- ent.core.dictionary,com.orientechnologies.orient.core.exception,com.o
- rientechnologies.orient.core.id,com.orientechnologies.orient.core.ind
- ex,com.orientechnologies.orient.core.intent,com.orientechnologies.ori
- ent.core.iterator,com.orientechnologies.orient.core.metadata,com.orie
- ntechnologies.orient.core.metadata.schema,com.orientechnologies.orien
- t.core.query,com.orientechnologies.orient.core.record,com.orientechno
- logies.orient.core.record.impl,com.orientechnologies.orient.core.seri
- alization.serializer.record,com.orientechnologies.orient.core.seriali
- zation.serializer.record.string,com.orientechnologies.orient.core.sql
- ,com.orientechnologies.orient.core.sql.query,com.orientechnologies.or
- ient.core.storage,com.orientechnologies.orient.core.storage.impl.loca
- l,com.orientechnologies.orient.core.storage.memory,com.orientech
- nologies.orient.core.tx,com.orientechnologies.orient.core.type,com.or
- ientechnologies.orient.enterprise.command
-Specification-Version: 1.0-SNAPSHOT
-Main-Class: com.orientechnologies.orient.console.OConsoleDatabaseApp
-
+Manifest-Version: 1.0
+Export-Package: com.orientechnologies.orient.console;uses:="com.orient
+ echnologies.orient.enterprise.command,com.orientechnologies.orient.co
+ re.storage.impl.local,com.orientechnologies.orient.core.serialization
+ .serializer.record.string,com.orientechnologies.orient.core.tx,com.or
+ ientechnologies.orient.core.config,com.orientechnologies.orient.core,
+ com.orientechnologies.orient.core.sql,com.orientechnologies.common.io
+ ,com.orientechnologies.common.exception,com.orientechnologies.common.
+ profiler,com.orientechnologies.common.console,com.orientechnologies.o
+ rient.core.db,com.orientechnologies.orient.core.iterator,com.orientec
+ hnologies.orient.core.index,com.orientechnologies.orient.core.metadat
+ a.schema,com.orientechnologies.orient.core.dictionary,com.orientechno
+ logies.orient.core.intent,com.orientechnologies.common.listener,com.o
+ rientechnologies.orient.client.remote,com.orientechnologies.orient.co
+ re.db.tool,com.orientechnologies.orient.core.command.script,com.orien
+ technologies.orient.core.record,com.orientechnologies.orient.core.exc
+ eption,com.orientechnologies.orient.core.query,com.orientechnologies.
+ orient.core.serialization.serializer.record,com.orientechnologies.ori
+ ent.core.db.document,com.orientechnologies.orient.core.cache,com.orie
+ ntechnologies.orient.core.storage,com.orientechnologies.orient.core.c
+ ommand,com.orientechnologies.orient.core.metadata,com.orientechnologi
+ es.orient.core.id,com.orientechnologies.orient.core.record.impl,com.o
+ rientechnologies.orient.core.db.record,com.orientechnologies.orient.c
+ ore.sql.query,com.orientechnologies.orient.core.storage.memory,c
+ om.orientechnologies.common.console.annotation,com.orientechnologies.
+ orient.core.type"
+Implementation-Title: OrientDB Tools
+Built-By: =4@59
+Tool: Bnd-1.15.0
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Implementation-Vendor: Orient Technologies
+Implementation-Vendor-Id: com.orientechnologies
+Specification-Title: OrientDB Tools
+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
+Bundle-SymbolicName: com.orientechnologies.orientdb-tools
+Implementation-Version: 1.0-SNAPSHOT
+Class-Path: orientdb-client-1.0-SNAPSHOT.jar orientdb-enterprise-1.0-S
+ NAPSHOT.jar orientdb-core-1.0-SNAPSHOT.jar orient-commons-1.0-SNAPSHO
+ T.jar persistence-api-1.0.jar
+Specification-Vendor: Orient Technologies
+Bundle-Name: OrientDB Tools
+Created-By: Apache Maven Bundle Plugin
+Bundle-Vendor: Orient Technologies
+Bundle-Version: 1.0.0.qualifier
+Build-Jdk: 1.6.0_30
+Bnd-LastModified: 1333567019002
+Bundle-ManifestVersion: 2
+Bundle-Description: OrientDB NoSQL document graph dbms
+Bundle-DocURL: http://www.orientechnologies.com
+Import-Package: com.orientechnologies.common.console,com.orientechnolo
+ gies.common.console.annotation,com.orientechnologies.common.exception
+ ,com.orientechnologies.common.io,com.orientechnologies.common.listene
+ r,com.orientechnologies.common.profiler,com.orientechnologies.orient.
+ client.remote,com.orientechnologies.orient.core,com.orientechnologies
+ .orient.core.cache,com.orientechnologies.orient.core.command,com.orie
+ ntechnologies.orient.core.command.script,com.orientechnologies.orient
+ .core.config,com.orientechnologies.orient.core.db,com.orientechnologi
+ es.orient.core.db.document,com.orientechnologies.orient.core.db.recor
+ d,com.orientechnologies.orient.core.db.tool,com.orientechnologies.ori
+ ent.core.dictionary,com.orientechnologies.orient.core.exception,com.o
+ rientechnologies.orient.core.id,com.orientechnologies.orient.core.ind
+ ex,com.orientechnologies.orient.core.intent,com.orientechnologies.ori
+ ent.core.iterator,com.orientechnologies.orient.core.metadata,com.orie
+ ntechnologies.orient.core.metadata.schema,com.orientechnologies.orien
+ t.core.query,com.orientechnologies.orient.core.record,com.orientechno
+ logies.orient.core.record.impl,com.orientechnologies.orient.core.seri
+ alization.serializer.record,com.orientechnologies.orient.core.seriali
+ zation.serializer.record.string,com.orientechnologies.orient.core.sql
+ ,com.orientechnologies.orient.core.sql.query,com.orientechnologies.or
+ ient.core.storage,com.orientechnologies.orient.core.storage.impl.loca
+ l,com.orientechnologies.orient.core.storage.memory,com.orientech
+ nologies.orient.core.tx,com.orientechnologies.orient.core.type,com.or
+ ientechnologies.orient.enterprise.command
+Specification-Version: 1.0-SNAPSHOT
+Main-Class: com.orientechnologies.orient.console.OConsoleDatabaseApp
+
diff --git a/tools/config/orientdb-client-log.properties b/tools/config/orientdb-client-log.properties
index fd71855db5f..8612e8f687e 100644
--- a/tools/config/orientdb-client-log.properties
+++ b/tools/config/orientdb-client-log.properties
@@ -1,34 +1,34 @@
-#
-# /*
-# * Copyright 2014 Orient Technologies LTD (info(at)orientechnologies.com)
-# *
-# * Licensed under the Apache License, Version 2.0 (the "License");
-# * you may not use this file except in compliance with the License.
-# * You may obtain a copy of the License at
-# *
-# * http://www.apache.org/licenses/LICENSE-2.0
-# *
-# * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# *
-# * For more information: http://www.orientechnologies.com
-# */
-#
-
-# Specify the handlers to create in the root logger
-# (all loggers are children of the root logger)
-# The following creates two handlers
-handlers = java.util.logging.ConsoleHandler
-
-# Set the default logging level for the root logger
-.level = ALL
-com.orientechnologies.orient.server.distributed.level = FINE
-com.orientechnologies.orient.core.level = WARNING
-
-# Set the default logging level for new ConsoleHandler instances
-java.util.logging.ConsoleHandler.level = WARNING
-# Set the default formatter for new ConsoleHandler instances
-java.util.logging.ConsoleHandler.formatter = com.orientechnologies.common.log.OLogFormatter
+#
+# /*
+# * Copyright 2014 Orient Technologies LTD (info(at)orientechnologies.com)
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# *
+# * For more information: http://www.orientechnologies.com
+# */
+#
+
+# Specify the handlers to create in the root logger
+# (all loggers are children of the root logger)
+# The following creates two handlers
+handlers = java.util.logging.ConsoleHandler
+
+# Set the default logging level for the root logger
+.level = ALL
+com.orientechnologies.orient.server.distributed.level = FINE
+com.orientechnologies.orient.core.level = WARNING
+
+# Set the default logging level for new ConsoleHandler instances
+java.util.logging.ConsoleHandler.level = WARNING
+# Set the default formatter for new ConsoleHandler instances
+java.util.logging.ConsoleHandler.formatter = com.orientechnologies.common.log.OLogFormatter
diff --git a/tools/src/main/resources/emptyfile b/tools/src/main/resources/emptyfile
index d3f5a12faa9..8b137891791 100644
--- a/tools/src/main/resources/emptyfile
+++ b/tools/src/main/resources/emptyfile
@@ -1 +1 @@
-
+
diff --git a/upgrade.txt b/upgrade.txt
index f8e9a2d7586..a15a344e9a9 100644
--- a/upgrade.txt
+++ b/upgrade.txt
@@ -1,116 +1,116 @@
- .
- .` `
- , `:.
- `,` ,:`
- .,. :,,
- .,, ,,,
- . .,.::::: ```` ::::::::: :::::::::
- ,` .::,,,,::.,,,,,,`;; .: :::::::::: ::: :::
- `,. ::,,,,,,,:.,,.` ` .: ::: ::: ::: :::
- ,,:,:,,,,,,,,::. ` ` `` .: ::: ::: ::: :::
- ,,:.,,,,,,,,,: `::, ,, ::,::` : :,::` :::: ::: ::: ::: :::
- ,:,,,,,,,,,,::,: ,, :. : :: : .: ::: ::: :::::::
- :,,,,,,,,,,:,:: ,, : : : : .: ::: ::: :::::::::
- ` :,,,,,,,,,,:,::, ,, .:::::::: : : .: ::: ::: ::: :::
- `,...,,:,,,,,,,,,: .:,. ,, ,, : : .: ::: ::: ::: :::
- .,,,,::,,,,,,,: `: , ,, : ` : : .: ::: ::: ::: :::
- ...,::,,,,::.. `: .,, :, : : : .: ::::::::::: ::: :::
- ,::::,,,. `: ,, ::::: : : .: ::::::::: ::::::::::
- ,,:` `,,.
- ,,, .,`
- ,,. `, GRAPH DATABASE
- `` `.
- ``
- `
-***********************************************************************************************************************
- ORIENT DATABASE http://www.orientechnologies.com
-***********************************************************************************************************************
-
- UPGRADE GUIDE
-----------------
-
- Semantic Versioning System
------------------------------
-
-OrientDB uses the Semantic Versioning System (http://semver.org) where given a version number MAJOR.MINOR.PATCH,
-increment the:
-
-- MAJOR version when you make incompatible API changes,
-- MINOR version when you add functionality in a backwards-compatible manner
-- PATCH version when you make backwards-compatible bug fixes.
-
-So between PATCH versions the compatibility is assured (example 1.4.0 -> 1.4.1). Between MINOR and MAJOR versions you
-could export and re-import the database. See below in the column "Database":
-
-
- Compatibility Matrix
- ---------------------------
-
-+--------+-------+--------------------------------------------+-----------+----------+----------+
-| | | API | | BINARY | HTTP |
-| FROM | TO |--------------------------------------------+ DATABASE | NETWORK | NETWORK |
-| | | Blueprints | Document | Object | Nat.Graph | | PROTOCOL | PROTOCOL |
-+--------+-------+------------+----------+--------+-----------+-----------+----------+----------+
-| 1.4.x | 1.5.x | Changed | OK | OK | OK | Automatic | 16, 17 | 10 |
-| | | v. 2.4.x | | | | | | |
-+--------+-------+------------+----------+--------+-----------+-----------+----------+----------+
-| 1.3.x | 1.4.x | Changed | OK | OK | OK | Automatic | 14, 15 | n.a. |
-| | | v. 2.3.x | | | | | | |
-+--------+-------+------------+----------+--------+-----------+-----------+----------+----------+
-| 1.2.x | 1.3.x | Changed | OK | OK | OK | Export & | 12, 13 | n.a. |
-| | | v. 2.2.x | | | | Re-import | | |
-+--------+-------+------------+----------+--------+-----------+-----------+----------+----------+
-
-References:
-
-- Binary Network Protocol: https://github.com/orientechnologies/orientdb/wiki/Network-Binary-Protocol
-- HTTP Network Protocol: https://github.com/orientechnologies/orientdb/wiki/OrientDB-REST
-
-
- Migrate from LOCAL storage engine to PLOCAL
----------------------------------------------
-
-1) Open a new shell (Linux/Mac) or a Command Prompt (Windows)
-
-2) export the database using the console. Example by exporting the database under /temp/db:
-
- > bin/console.sh (or bin/console.bat under Windows)
- orientdb> connect database local:/temp/db admin admin
- orientdb> export database /temp/db.json.gzip
- orientdb> disconnect
-
-3) now always in the console create a new database using the "plocal" engine:
-
- a) on a local filesystem:
-
- orientdb> create database plocal:/temp/newdb admin admin plocal graph
-
- b) on a remote server (use the server's credentials to access):
-
- orientdb> create database remote:localhost/newdb root password plocal graph
-
-4) now always in the console import the old database in the new one:
-
- orientdb> import database /temp/db.json.gzip -preserveClusterIDs=true
- orientdb> quit
-
-
- API history
- ----------------------
- - 1.4.x Blueprints becomes the new standard API for the Graph Database. All the GraphDB APIs are deprecated
-
-
-
- Information
---------------
-
-For more information visit the official website: http://www.orientdb.org.
-
-Remember OrientDB is an Open Source project released with the Apache v2 license,
-so it's always FREE for any purpose. If you're interested to Enterprise tools,
-professional support, training or consultancy contact: info@orientechnologies.com.
-
-Enjoy with Graphs,
-Orient Technologies
-The company behind OrientDB
-(www.orientechnologies.com)
+ .
+ .` `
+ , `:.
+ `,` ,:`
+ .,. :,,
+ .,, ,,,
+ . .,.::::: ```` ::::::::: :::::::::
+ ,` .::,,,,::.,,,,,,`;; .: :::::::::: ::: :::
+ `,. ::,,,,,,,:.,,.` ` .: ::: ::: ::: :::
+ ,,:,:,,,,,,,,::. ` ` `` .: ::: ::: ::: :::
+ ,,:.,,,,,,,,,: `::, ,, ::,::` : :,::` :::: ::: ::: ::: :::
+ ,:,,,,,,,,,,::,: ,, :. : :: : .: ::: ::: :::::::
+ :,,,,,,,,,,:,:: ,, : : : : .: ::: ::: :::::::::
+ ` :,,,,,,,,,,:,::, ,, .:::::::: : : .: ::: ::: ::: :::
+ `,...,,:,,,,,,,,,: .:,. ,, ,, : : .: ::: ::: ::: :::
+ .,,,,::,,,,,,,: `: , ,, : ` : : .: ::: ::: ::: :::
+ ...,::,,,,::.. `: .,, :, : : : .: ::::::::::: ::: :::
+ ,::::,,,. `: ,, ::::: : : .: ::::::::: ::::::::::
+ ,,:` `,,.
+ ,,, .,`
+ ,,. `, GRAPH DATABASE
+ `` `.
+ ``
+ `
+***********************************************************************************************************************
+ ORIENT DATABASE http://www.orientechnologies.com
+***********************************************************************************************************************
+
+ UPGRADE GUIDE
+----------------
+
+ Semantic Versioning System
+-----------------------------
+
+OrientDB uses the Semantic Versioning System (http://semver.org) where given a version number MAJOR.MINOR.PATCH,
+increment the:
+
+- MAJOR version when you make incompatible API changes,
+- MINOR version when you add functionality in a backwards-compatible manner
+- PATCH version when you make backwards-compatible bug fixes.
+
+So between PATCH versions the compatibility is assured (example 1.4.0 -> 1.4.1). Between MINOR and MAJOR versions you
+could export and re-import the database. See below in the column "Database":
+
+
+ Compatibility Matrix
+ ---------------------------
+
++--------+-------+--------------------------------------------+-----------+----------+----------+
+| | | API | | BINARY | HTTP |
+| FROM | TO |--------------------------------------------+ DATABASE | NETWORK | NETWORK |
+| | | Blueprints | Document | Object | Nat.Graph | | PROTOCOL | PROTOCOL |
++--------+-------+------------+----------+--------+-----------+-----------+----------+----------+
+| 1.4.x | 1.5.x | Changed | OK | OK | OK | Automatic | 16, 17 | 10 |
+| | | v. 2.4.x | | | | | | |
++--------+-------+------------+----------+--------+-----------+-----------+----------+----------+
+| 1.3.x | 1.4.x | Changed | OK | OK | OK | Automatic | 14, 15 | n.a. |
+| | | v. 2.3.x | | | | | | |
++--------+-------+------------+----------+--------+-----------+-----------+----------+----------+
+| 1.2.x | 1.3.x | Changed | OK | OK | OK | Export & | 12, 13 | n.a. |
+| | | v. 2.2.x | | | | Re-import | | |
++--------+-------+------------+----------+--------+-----------+-----------+----------+----------+
+
+References:
+
+- Binary Network Protocol: https://github.com/orientechnologies/orientdb/wiki/Network-Binary-Protocol
+- HTTP Network Protocol: https://github.com/orientechnologies/orientdb/wiki/OrientDB-REST
+
+
+ Migrate from LOCAL storage engine to PLOCAL
+---------------------------------------------
+
+1) Open a new shell (Linux/Mac) or a Command Prompt (Windows)
+
+2) export the database using the console. Example by exporting the database under /temp/db:
+
+ > bin/console.sh (or bin/console.bat under Windows)
+ orientdb> connect database local:/temp/db admin admin
+ orientdb> export database /temp/db.json.gzip
+ orientdb> disconnect
+
+3) now always in the console create a new database using the "plocal" engine:
+
+ a) on a local filesystem:
+
+ orientdb> create database plocal:/temp/newdb admin admin plocal graph
+
+ b) on a remote server (use the server's credentials to access):
+
+ orientdb> create database remote:localhost/newdb root password plocal graph
+
+4) now always in the console import the old database in the new one:
+
+ orientdb> import database /temp/db.json.gzip -preserveClusterIDs=true
+ orientdb> quit
+
+
+ API history
+ ----------------------
+ - 1.4.x Blueprints becomes the new standard API for the Graph Database. All the GraphDB APIs are deprecated
+
+
+
+ Information
+--------------
+
+For more information visit the official website: http://www.orientdb.org.
+
+Remember OrientDB is an Open Source project released with the Apache v2 license,
+so it's always FREE for any purpose. If you're interested to Enterprise tools,
+professional support, training or consultancy contact: info@orientechnologies.com.
+
+Enjoy with Graphs,
+Orient Technologies
+The company behind OrientDB
+(www.orientechnologies.com)