Examples of OLevel1RecordCache


Examples of com.orientechnologies.orient.core.cache.OLevel1RecordCache

    return database;
  }

  public static void updateCacheFromEntries(final OStorage iStorage, final OTransaction iTx,
      final Iterable<? extends OTransactionRecordEntry> iEntries, final boolean iUpdateStrategy) throws IOException {
    final OLevel1RecordCache dbCache = (OLevel1RecordCache) iTx.getDatabase().getLevel1Cache();

    for (OTransactionRecordEntry txEntry : iEntries) {
      if (!iUpdateStrategy)
        // ALWAYS REMOVE THE RECORD FROM CACHE
        dbCache.deleteRecord(txEntry.getRecord().getIdentity());
      else if (txEntry.status == OTransactionRecordEntry.DELETED)
        // DELETION
        dbCache.deleteRecord(txEntry.getRecord().getIdentity());
      else if (txEntry.status == OTransactionRecordEntry.UPDATED || txEntry.status == OTransactionRecordEntry.CREATED)
        // UDPATE OR CREATE
        dbCache.updateRecord(txEntry.getRecord());
    }
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.cache.OLevel1RecordCache

    unmodifiableHooks = Collections.unmodifiableSet(hooks);

    databaseOwner = this;

    recordType = iRecordType;
    level1Cache = new OLevel1RecordCache(this);

    mvcc = OGlobalConfiguration.DB_MVCC.getValueAsBoolean();

    setCurrentDatabaseinThreadLocal();
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.cache.OLevel1RecordCache

    try {
      recordClass = iRecordClass;
    } catch (Throwable t) {
      throw new ODatabaseException("Error on opening database '" + getName() + "'", t);
    }
    level1Cache = new OLevel1RecordCache(this);

    mvcc = OGlobalConfiguration.DB_MVCC.getValueAsBoolean();

    ODatabaseRecordThreadLocal.INSTANCE.set(this);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.cache.OLevel1RecordCache

      throw new OTransactionException("Invalid state of the transaction. The transaction must be begun.");
  }

  public static void updateCacheFromEntries(final OStorage iStorage, final OTransaction iTx,
      final Iterable<? extends OTransactionRecordEntry> iEntries) throws IOException {
    final OLevel1RecordCache dbCache = (OLevel1RecordCache) iTx.getDatabase().getLevel1Cache();

    for (OTransactionRecordEntry txEntry : iEntries) {
      if (txEntry.status == OTransactionRecordEntry.DELETED)
        dbCache.deleteRecord(txEntry.getRecord().getIdentity());
      else if (txEntry.status == OTransactionRecordEntry.UPDATED || txEntry.status == OTransactionRecordEntry.CREATED)
        dbCache.updateRecord(txEntry.getRecord());
    }
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.cache.OLevel1RecordCache

    try {
      recordClass = iRecordClass;
    } catch (Throwable t) {
      throw new ODatabaseException("Error on opening database '" + getName() + "'", t);
    }
    level1Cache = new OLevel1RecordCache(this);

    mvcc = OGlobalConfiguration.DB_MVCC.getValueAsBoolean();

    ODatabaseRecordThreadLocal.INSTANCE.set(this);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.cache.OLevel1RecordCache

    return database;
  }

  public static void updateCacheFromEntries(final OStorage iStorage, final OTransaction iTx,
      final Iterable<? extends OTransactionRecordEntry> iEntries) throws IOException {
    final OLevel1RecordCache dbCache = (OLevel1RecordCache) iTx.getDatabase().getLevel1Cache();

    for (OTransactionRecordEntry txEntry : iEntries) {
      if (txEntry.status == OTransactionRecordEntry.DELETED)
        dbCache.deleteRecord(txEntry.getRecord().getIdentity());
      else if (txEntry.status == OTransactionRecordEntry.UPDATED || txEntry.status == OTransactionRecordEntry.CREATED)
        dbCache.updateRecord(txEntry.getRecord());
    }
  }
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.