Examples of acquireExclusiveLock()


Examples of com.orientechnologies.orient.core.index.hashindex.local.cache.OCacheEntry.acquireExclusiveLock()

            if (!expectedDiskCache.isOpen(fileId))
              expectedDiskCache.openFile(fileId);

            final OCacheEntry cacheEntry = expectedDiskCache.load(fileId, pageIndex, true);
            cacheEntry.acquireExclusiveLock();
            try {
              ODurablePage durablePage = new ODurablePage(cacheEntry, ODurablePage.TrackMode.NONE);
              durablePage.restoreChanges(updatePageRecord.getChanges());
              durablePage.setLsn(updatePageRecord.getLsn());
View Full Code Here

Examples of com.orientechnologies.orient.core.index.hashindex.local.cache.OCacheEntry.acquireExclusiveLock()

      final long pageIndex = getPageIndex(bucketPointer);
      final int fileLevel = getFileLevel(bucketPointer);

      final OCacheEntry cacheEntry = loadPageEntry(pageIndex, fileLevel);
      cacheEntry.acquireExclusiveLock();
      try {
        final OHashIndexBucket<K, V> bucket = new OHashIndexBucket<K, V>(cacheEntry, keySerializer, valueSerializer, keyTypes,
            getTrackMode());
        final int index = bucket.getIndex(hashCode, key);
View Full Code Here

Examples of com.orientechnologies.orient.core.index.hashindex.local.cache.OCacheEntry.acquireExclusiveLock()

        updatedBucketIndex = diskCache.getFilledUpTo(metadataPage.getFileId(newFileLevel));

      final long newBucketIndex = updatedBucketIndex + 1;

      final OCacheEntry updatedBucketCacheEntry = loadPageEntry(updatedBucketIndex, newFileLevel);
      updatedBucketCacheEntry.acquireExclusiveLock();
      try {
        final OCacheEntry newBucketCacheEntry = loadPageEntry(newBucketIndex, newFileLevel);

        newBucketCacheEntry.acquireExclusiveLock();
        try {
View Full Code Here

Examples of com.orientechnologies.orient.core.index.hashindex.local.cache.OCacheEntry.acquireExclusiveLock()

      final OCacheEntry updatedBucketCacheEntry = loadPageEntry(updatedBucketIndex, newFileLevel);
      updatedBucketCacheEntry.acquireExclusiveLock();
      try {
        final OCacheEntry newBucketCacheEntry = loadPageEntry(newBucketIndex, newFileLevel);

        newBucketCacheEntry.acquireExclusiveLock();
        try {
          final OHashIndexBucket<K, V> updatedBucket = new OHashIndexBucket<K, V>(newBucketDepth, updatedBucketCacheEntry,
              keySerializer, valueSerializer, keyTypes, getTrackMode());
          final OHashIndexBucket<K, V> newBucket = new OHashIndexBucket<K, V>(newBucketDepth, newBucketCacheEntry, keySerializer,
              valueSerializer, keyTypes, getTrackMode());
View Full Code Here

Examples of com.orientechnologies.orient.core.index.hashindex.local.cache.OCacheEntry.acquireExclusiveLock()

  }

  private void initHashTreeState() throws IOException {
    for (long pageIndex = 0; pageIndex < MAX_LEVEL_SIZE; pageIndex++) {
      final OCacheEntry cacheEntry = loadPageEntry(pageIndex, 0);
      cacheEntry.acquireExclusiveLock();
      try {
        final OHashIndexBucket<K, V> emptyBucket = new OHashIndexBucket<K, V>(MAX_LEVEL_DEPTH, cacheEntry, keySerializer,
            valueSerializer, keyTypes, getTrackMode());
        cacheEntry.markDirty();
View Full Code Here

Examples of com.orientechnologies.orient.core.index.hashindex.local.cache.OCacheEntry.acquireExclusiveLock()

        lastPage = 0;
        isNewPage = true;
      }

      OCacheEntry cacheEntry = diskCache.load(fileId, lastPage, false);
      cacheEntry.acquireExclusiveLock();
      try {
        startAtomicOperation();

        final ODurablePage.TrackMode trackMode = getTrackMode();
View Full Code Here

Examples of com.orientechnologies.orient.core.index.hashindex.local.cache.OCacheEntry.acquireExclusiveLock()

          diskCache.release(cacheEntry);

          isNewPage = true;
          cacheEntry = diskCache.allocateNewPage(fileId);

          cacheEntry.acquireExclusiveLock();
          bucket = new OClusterPositionMapBucket(cacheEntry, trackMode);
        }

        final long index = bucket.add(pageIndex, recordPosition);
        final OClusterPosition result = OClusterPositionFactory.INSTANCE.valueOf(index + cacheEntry.getPageIndex()
View Full Code Here

Examples of com.orientechnologies.orient.core.index.hashindex.local.cache.OCacheEntry.acquireExclusiveLock()

      long pageIndex = position / OClusterPositionMapBucket.MAX_ENTRIES;
      int index = (int) (position % OClusterPositionMapBucket.MAX_ENTRIES);

      final OCacheEntry cacheEntry = diskCache.load(fileId, pageIndex, false);
      cacheEntry.acquireExclusiveLock();
      try {
        startAtomicOperation();
        final ODurablePage.TrackMode trackMode = getTrackMode();
        final OClusterPositionMapBucket bucket = new OClusterPositionMapBucket(cacheEntry, trackMode);
View Full Code Here

Examples of com.orientechnologies.orient.core.index.hashindex.local.cache.OCacheEntry.acquireExclusiveLock()

          if (!expectedDiskCache.isOpen(fileId))
            expectedDiskCache.openFile(fileId);

          final OCacheEntry cacheEntry = expectedDiskCache.load(fileId, pageIndex, true);
          cacheEntry.acquireExclusiveLock();
          try {
            ODurablePage durablePage = new ODurablePage(cacheEntry, ODurablePage.TrackMode.NONE);
            durablePage.restoreChanges(updatePageRecord.getChanges());
            durablePage.setLsn(updatePageRecord.getLsn());
View Full Code Here

Examples of com.orientechnologies.orient.core.index.hashindex.local.cache.OCacheEntry.acquireExclusiveLock()

        final long pageIndex = getPageIndex(bucketPointer);
        final int fileLevel = getFileLevel(bucketPointer);
        final V removed;

        final OCacheEntry cacheEntry = loadPageEntry(pageIndex, fileLevel);
        cacheEntry.acquireExclusiveLock();
        try {
          final OHashIndexBucket<K, V> bucket = new OHashIndexBucket<K, V>(cacheEntry, keySerializer, valueSerializer, keyTypes,
              getTrackMode());
          final int positionIndex = bucket.getIndex(hashCode, key);
          if (positionIndex < 0) {
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.