Examples of declareIntent()


Examples of com.orientechnologies.orient.core.db.ODatabase.declareIntent()

    }

    // TODO: is this assumption ok?
    // Get the currently open database for this thread and set intent.
    final ODatabase database = ODatabaseRecordThreadLocal.INSTANCE.get();
    database.declareIntent(new OIntentMassiveInsert());

    // Insert File data.
    final long fileSize = file.length();
    final FileInputStream in = new FileInputStream(file);
    try {
View Full Code Here

Examples of com.orientechnologies.orient.core.db.ODatabase.declareIntent()

      final long saveChunkListMs = System.currentTimeMillis() - saveChunkListStartTime;

      // Log the amount of time taken to save the list of chunk RIDs.
      System.out.printf("Saved list of %d chunk RIDs in %d ms.\n", chunkRids.size(), saveChunkListMs);
    } finally {
      database.declareIntent(null);
      in.close();
    }
  }
}
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.declareIntent()

  public static void main(String[] iArgs) throws InstantiationException, IllegalAccessException {
    OProfiler.getInstance().startRecording();

    final ODatabaseDocumentTx database = new ODatabaseDocumentTx(System.getProperty("url")).open("admin", "admin");

    database.declareIntent(new OIntentMassiveInsert());
    database.begin(TXTYPE.NOTX);

    long time = System.currentTimeMillis();

    final ODocument document = new ODocument(database, "Employee");
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.declareIntent()

  public static void main(String[] iArgs) throws InstantiationException, IllegalAccessException {
    OProfiler.getInstance().startRecording();

    final ODatabaseDocumentTx database = new ODatabaseDocumentTx(System.getProperty("url")).open("admin", "admin");

    database.declareIntent(new OIntentMassiveInsert());
    database.begin(TXTYPE.NOTX);

    long time = System.currentTimeMillis();

    final ODocument document = new ODocument(database, "Employee");
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.declareIntent()

      db.open("admin", "admin");
      db.drop();
    }

    db.create();
    db.declareIntent(new OIntentMassiveInsert());

    ODocument document = new ODocument();
    ORidBag ridBag = new ORidBag();
    ridBag.setAutoConvertToRecord(false);
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.declareIntent()

      int addedRecords = 0;

      ODatabaseDocumentTx db = new ODatabaseDocumentTx(URL);
      db.open("admin", "admin");
      db.declareIntent(new OIntentMassiveInsert());

      try {
        while (cont) {
          List<ORID> ridsToAdd = new ArrayList<ORID>();
          for (int i = 0; i < 10; i++) {
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.declareIntent()

      int deletedRecords = 0;

      Random rnd = new Random();
      ODatabaseDocumentTx db = new ODatabaseDocumentTx(URL);
      db.open("admin", "admin");
      db.declareIntent(new OIntentMassiveInsert());

      try {
        while (cont) {
          while (true) {
            ODocument document = db.load(docContainerRid);
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.declareIntent()

  public static void main(String[] iArgs) throws InstantiationException, IllegalAccessException {
    Orient.instance().getProfiler().startRecording();

    final ODatabaseDocumentTx database = new ODatabaseDocumentTx(System.getProperty("url")).open("admin", "admin");

    database.declareIntent(new OIntentMassiveInsert());
    database.begin(TXTYPE.NOTX);

    long time = System.currentTimeMillis();

    final ODocument document = new ODocument("Employee");
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.declareIntent()

    // Declare some Indexes
    cBulk.createIndex("indexField1", INDEX_TYPE.NOTUNIQUE, "fieldString1");
    cBulk.createIndex("indexField2", INDEX_TYPE.UNIQUE, "fieldString2");
    cBulk.createIndex("indexField3", INDEX_TYPE.DICTIONARY, "fieldString3");

    database.declareIntent(new OIntentMassiveInsert());

    for (int i = 0; i < NUM_INSERTLOOPS; i++) {
      database.save(createRandomDocument());

      if (i % 1000 == 0) {
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ODatabaseRecordInternal.declareIntent()

    long currRecord = 0;

    if (progressListener != null)
      progressListener.onBegin(this, totRecords, false);

    database.declareIntent(new OIntentMassiveInsert());
    try {
      // BROWSE ALL THE RECORDS OF THE SOURCE CLASS
      for (ODocument doc : db.browseClass(sourceClass.getName())) {
        value = doc.field(sourceField);
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.