Examples of OTransactionRecordEntry


Examples of com.orientechnologies.orient.core.tx.OTransactionRecordEntry

              + servers.field("owner"));
        }
        break;

      case AFTER_CREATE:
        manager.distributeRequest(new OTransactionRecordEntry((ORecordInternal<?>) iRecord, OTransactionRecordEntry.CREATED, null));
        break;

      case AFTER_UPDATE:
        manager.distributeRequest(new OTransactionRecordEntry((ORecordInternal<?>) iRecord, OTransactionRecordEntry.UPDATED, null));
        break;

      case AFTER_DELETE:
        manager.distributeRequest(new OTransactionRecordEntry((ORecordInternal<?>) iRecord, OTransactionRecordEntry.DELETED, null));
        break;
      }
    } catch (IOException e) {
      throw new ODistributedSynchronizationException("Error on distribution of the record to the configured cluster", e);
    }
View Full Code Here

Examples of com.orientechnologies.orient.core.tx.OTransactionRecordEntry

      if (rid.isNew()) {
        // SAVE AT THE FLY AND STORE THE NEW RID
        final ORecord<?> record = rid.getRecord();

        if (record.getDatabase().getTransaction().isActive()) {
          final OTransactionRecordEntry recordEntry = record.getDatabase().getTransaction().getRecordEntry(rid);
          if (recordEntry != null)
            // GET THE CLUSTER SPECIFIED
            record.getDatabase().save((ORecordInternal<?>) record, recordEntry.clusterName);
          else
            // USE THE DEFAULT CLUSTER
View Full Code Here

Examples of com.orientechnologies.orient.core.tx.OTransactionRecordEntry

        bufferedChanges.clear();
        databases.clear();
      } else {
        try {
          // CHECK IF ANOTHER REQUEST FOR THE SAME RECORD ID HAS BEEN ALREADY BUFFERED
          OTransactionRecordEntry entry;
          for (int i = 0; i < bufferedChanges.size(); ++i) {
            entry = bufferedChanges.get(i);

            if (entry.getRecord().getIdentity().equals(iRequest.getRecord().getIdentity())) {
              // FOUND: REPLACE IT
              bufferedChanges.set(i, iRequest);
              return;
            }
          }
View Full Code Here

Examples of com.orientechnologies.orient.core.tx.OTransactionRecordEntry

              + servers.field("owner"));
        }
        break;

      case AFTER_CREATE:
        manager.distributeRequest(new OTransactionRecordEntry((ORecordInternal<?>) iRecord, OTransactionRecordEntry.CREATED, null));
        break;

      case AFTER_UPDATE:
        manager.distributeRequest(new OTransactionRecordEntry((ORecordInternal<?>) iRecord, OTransactionRecordEntry.UPDATED, null));
        break;

      case AFTER_DELETE:
        manager.distributeRequest(new OTransactionRecordEntry((ORecordInternal<?>) iRecord, OTransactionRecordEntry.DELETED, null));
        break;
      }
    } catch (IOException e) {
      throw new ODistributedSynchronizationException("Error on distribution of the record to the configured cluster", e);
    }
View Full Code Here

Examples of com.orientechnologies.orient.core.tx.OTransactionRecordEntry

        bufferedChanges.clear();
        databases.clear();
      } else {
        try {
          // CHECK IF ANOTHER REQUEST FOR THE SAME RECORD ID HAS BEEN ALREADY BUFFERED
          OTransactionRecordEntry entry;
          for (int i = 0; i < bufferedChanges.size(); ++i) {
            entry = bufferedChanges.get(i);

            if (entry.getRecord().getIdentity().equals(iRequest.getRecord().getIdentity())) {
              // FOUND: REPLACE IT
              bufferedChanges.set(i, iRequest);
              return;
            }
          }
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.