Package com.orientechnologies.orient.core.exception

Examples of com.orientechnologies.orient.core.exception.OConfigurationException


  public int addCluster(String clusterName, int requestedId, boolean forceListBased, Object... parameters) {

    lock.acquireExclusiveLock();
    try {
      if (requestedId < 0) {
        throw new OConfigurationException("Cluster id must be positive!");
      }
      if (requestedId < clusters.size() && clusters.get(requestedId) != null) {
        throw new OConfigurationException("Requested cluster ID [" + requestedId + "] is occupied by cluster with name ["
            + clusters.get(requestedId).getName() + "]");
      }

      makeStorageDirty();
      return addClusterInternal(clusterName, requestedId, true, parameters);
View Full Code Here


    long tot = 0;

    for (int iClusterId : iClusterIds) {
      if (iClusterId >= clusters.size())
        throw new OConfigurationException("Cluster id " + iClusterId + " was not found in database '" + name + "'");

      if (iClusterId > -1) {
        final OCluster c = clusters.get(iClusterId);
        if (c != null)
          tot += c.getEntries() - (countTombstones ? 0L : c.getTombstonesCount());
View Full Code Here

    final int id;

    if (cluster != null) {
      // CHECK FOR DUPLICATION OF NAMES
      if (clusterMap.containsKey(cluster.getName().toLowerCase()))
        throw new OConfigurationException("Cannot add cluster '" + cluster.getName()
            + "' because it is already registered in database '" + name + "'");
      // CREATE AND ADD THE NEW REF SEGMENT
      clusterMap.put(cluster.getName().toLowerCase(), cluster);
      id = cluster.getId();
    } else {
View Full Code Here

    }
    if (!file.exists())
      file = new File(OSystemVariableResolver.resolveSystemVariables("${" + Orient.ORIENTDB_HOME
          + "}/config/orientdb-server-config.xml"));
    if (!file.exists())
      throw new OConfigurationException(
          "Cannot load file orientdb-server-config.xml to execute remote tests. Current directory is "
              + new File(".").getAbsolutePath());
    return file;
  }
View Full Code Here

     final ODocument request = new ODocument(channel.readBytes());

     final ODistributedServerManager dManager = server.getDistributedManager();
     if (dManager == null)
       throw new OConfigurationException("No distributed manager configured");

     final String operation = request.field("operation");

     ODocument response = null;
View Full Code Here

        if (record instanceof ODocument) {
          final ODocument doc = (ODocument) record;

          if (indexDefinition == null)
            throw new OConfigurationException("Index '" + name + "' cannot be rebuilt because has no a valid definition ("
                + indexDefinition + ")");

          final Object fieldValue = indexDefinition.getDocumentValueToIndex(doc);

          if (fieldValue != null) {
View Full Code Here

    size = OIntegerSerializer.INSTANCE.deserializeLiteral(inBuffer, offset);
    offset += OIntegerSerializer.INT_SIZE;

    if (size > pageSize)
      throw new OConfigurationException("Loaded index with page size set to " + pageSize + " while the loaded was built with: "
          + size);

    return offset;
  }
View Full Code Here

      boolean oldColor = oldStream.getAsBoolean();
      int oldSize = oldStream.getAsInteger();

      if (oldSize > oldPageSize)
        throw new OConfigurationException("Loaded index with page size set to " + oldPageSize
            + " while the loaded was built with: " + oldSize);

      K[] oldKeys = (K[]) new Object[oldPageSize];
      for (int i = 0; i < oldSize; ++i) {
        oldKeys[i] = (K) ((OMVRBTreeMapProvider<K, V>) treeDataProvider).streamKeySerializer.fromStream(oldStream.getAsByteArray());
View Full Code Here

        return OStreamSerializerSBTreeIndexRIDContainer.INSTANCE;

      else if (iName.equals(OCompositeKeySerializer.NAME))
        return OCompositeKeySerializer.INSTANCE;

      throw new OConfigurationException("Stream Serializer '" + iName + "' not registered");

    } catch (Exception e) {
      throw new OConfigurationException("Error on retrieving of Stream Serializer '" + iName + "'", e);
    }
  }
View Full Code Here

          if (m.getParameterTypes().length > 0)
            m.invoke(iPojo, iDocument);
          else
            m.invoke(iPojo);
        } catch (Exception e) {
          throw new OConfigurationException("Error on executing user callback '" + m.getName() + "' annotated with '"
              + iAnnotation.getSimpleName() + "'", e);
        }
      }
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.exception.OConfigurationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.