Package com.orientechnologies.orient.core.index

Examples of com.orientechnologies.orient.core.index.OIndexManagerProxy.reload()


    final OIndex result = indexManager.createIndex("simplekey", OClass.INDEX_TYPE.UNIQUE.toString(), new OSimpleKeyIndexDefinition(
        OType.INTEGER), null, null, null);

    assertEquals(result.getName(), "simplekey");

    indexManager.reload();
    assertNull(database.getMetadata().getIndexManager().getClassIndex(CLASS_NAME, "simplekey"));
    assertEquals(database.getMetadata().getIndexManager().getIndex("simplekey").getName(), result.getName());
  }

  @Test
View Full Code Here


    final OIndexManagerProxy indexManager = database.getMetadata().getIndexManager();

    final OIndex result = indexManager.createIndex("nullkey", OClass.INDEX_TYPE.UNIQUE.toString(), null, null, null, null);

    assertEquals(result.getName(), "nullkey");
    indexManager.reload();

    assertNull(database.getMetadata().getIndexManager().getClassIndex(CLASS_NAME, "nullkey"));
    assertEquals(database.getMetadata().getIndexManager().getIndex("nullkey").getName(), result.getName());
  }
View Full Code Here

        new OPropertyIndexDefinition(CLASS_NAME, "fOne", OType.INTEGER), new int[] { database.getClusterIdByName(CLASS_NAME) },
        null, null);

    assertEquals(result.getName(), "propertyone");

    indexManager.reload();
    assertEquals(database.getMetadata().getIndexManager().getClassIndex(CLASS_NAME, "propertyone").getName(), result.getName());

  }

  @Test
View Full Code Here

        )), new int[] { database.getClusterIdByName(CLASS_NAME) }, null, null);

    assertEquals(result.getName(), "compositeone");

    indexManager.reload();
    assertEquals(database.getMetadata().getIndexManager().getClassIndex(CLASS_NAME, "compositeone").getName(), result.getName());
  }

  @Test
  public void createCompositeIndexTestWithListener() {
View Full Code Here

        )), new int[] { database.getClusterIdByName(CLASS_NAME) }, progressListener, null);

    assertEquals(result.getName(), "compositetwo");
    assertEquals(atomicInteger.get(), 2);

    indexManager.reload();
    assertEquals(database.getMetadata().getIndexManager().getClassIndex(CLASS_NAME, "compositetwo").getName(), result.getName());

  }

  @Test(dependsOnMethods = { "createCompositeIndexTestWithListener", "createCompositeIndexTestWithoutListener",
View Full Code Here

    ODocument doc = new ODocument();

    OIndexManagerProxy indexManager = database.getMetadata().getIndexManager();
    // FORCE RELOADING
    indexManager.reload();

    int n = 0;
    do {
      jsonReader.readNext(OJSONReader.BEGIN_OBJECT);
View Full Code Here

  private void importIndexes() throws IOException, ParseException {
    listener.onMessage("\nImporting indexes ...");

    OIndexManagerProxy indexManager = database.getMetadata().getIndexManager();
    indexManager.reload();

    jsonReader.readNext(OJSONReader.BEGIN_COLLECTION);

    int n = 0;
    while (jsonReader.lastChar() != ']') {
View Full Code Here

  private void exportIndexDefinitions() throws IOException {
    listener.onMessage("\nExporting index info...");
    writer.beginCollection(1, true, "indexes");

    final OIndexManagerProxy indexManager = database.getMetadata().getIndexManager();
    indexManager.reload();

    final Collection<? extends OIndex<?>> indexes = indexManager.getIndexes();

    for (OIndex<?> index : indexes) {
      if (index.getName().equals(ODatabaseImport.EXPORT_IMPORT_MAP_NAME))
View Full Code Here

  @SuppressWarnings({ "rawtypes", "unchecked" })
  private void exportManualIndexes() throws IOException {
    listener.onMessage("\nExporting manual indexes content...");

    final OIndexManagerProxy indexManager = database.getMetadata().getIndexManager();
    indexManager.reload();

    final Collection<? extends OIndex<?>> indexes = indexManager.getIndexes();

    ODocument exportEntry = new ODocument();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.