Examples of acquireExclusiveLock()


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

          return null;

        V removed = null;

        OCacheEntry cacheEntry = diskCache.load(nullBucketFileId, 0, false);
        cacheEntry.acquireExclusiveLock();
        try {
          final ONullBucket<V> nullBucket = new ONullBucket<V>(cacheEntry, getTrackMode(), valueSerializer, false);

          removed = nullBucket.getValue();
          if (removed != null) {
View Full Code Here

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

      buddyLevel = getFileLevel(buddyPointer);
      buddyIndex = getPageIndex(buddyPointer);
    }

    OCacheEntry buddyCacheEntry = loadPageEntry(buddyIndex, buddyLevel);
    buddyCacheEntry.acquireExclusiveLock();
    try {
      diskCache.loadPinnedPage(hashStateEntry);
      hashStateEntry.acquireExclusiveLock();
      try {
        buddyBucket = new OHashIndexBucket<K, V>(buddyCacheEntry, keySerializer, valueSerializer, keyTypes, getTrackMode());
View Full Code Here

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

        long newBuddyIndex = buddyBucket.getSplitHistory(newBuddyLevel);

        metadataPage.setBucketsCount(buddyLevel, metadataPage.getBucketsCount(buddyLevel) + 1);

        final OCacheEntry newBuddyCacheEntry = loadPageEntry(newBuddyIndex, newBuddyLevel);
        newBuddyCacheEntry.acquireExclusiveLock();
        try {
          final OHashIndexBucket<K, V> newBuddyBucket = new OHashIndexBucket<K, V>(bucketDepth - 1, newBuddyCacheEntry,
              keySerializer, valueSerializer, keyTypes, getTrackMode());

          for (OHashIndexBucket.Entry<K, V> entry : buddyBucket)
View Full Code Here

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

      } else {
        cacheEntry = diskCache.load(nullBucketFileId, 0, false);
        isNew = false;
      }

      cacheEntry.acquireExclusiveLock();
      try {
        ONullBucket<V> nullBucket = new ONullBucket<V>(cacheEntry, getTrackMode(), valueSerializer, isNew);
        if (nullBucket.getValue() != null)
          sizeDiff--;
View Full Code Here

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

        nullBucketFileId = diskCache.openFile(name + nullFileExtension);

      initDurableComponent(storageLocal);

      OCacheEntry rootCacheEntry = diskCache.load(fileId, ROOT_INDEX, false);
      rootCacheEntry.acquireExclusiveLock();
      try {
        super.startAtomicOperation();

        OSBTreeBucket<K, V> rootBucket = new OSBTreeBucket<K, V>(rootCacheEntry, true, keySerializer, keyTypes, valueSerializer,
            getTrackMode());
View Full Code Here

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

          final OSBTreeValue<V> treeValue = new OSBTreeValue<V>(createLinkToTheValue, valueLink, createLinkToTheValue ? null
              : value);
          BucketSearchResult bucketSearchResult = findBucket(key);

          OCacheEntry keyBucketCacheEntry = diskCache.load(fileId, bucketSearchResult.getLastPathItem(), false);
          keyBucketCacheEntry.acquireExclusiveLock();
          OSBTreeBucket<K, V> keyBucket = new OSBTreeBucket<K, V>(keyBucketCacheEntry, keySerializer, keyTypes, valueSerializer,
              getTrackMode());

          int insertionIndex;
          int sizeDiff;
View Full Code Here

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

            bucketSearchResult = splitBucket(bucketSearchResult.path, insertionIndex, key);

            insertionIndex = bucketSearchResult.itemIndex;

            keyBucketCacheEntry = diskCache.load(fileId, bucketSearchResult.getLastPathItem(), false);
            keyBucketCacheEntry.acquireExclusiveLock();

            keyBucket = new OSBTreeBucket<K, V>(keyBucketCacheEntry, keySerializer, keyTypes, valueSerializer, getTrackMode());
          }

          logPageChanges(keyBucket, fileId, bucketSearchResult.getLastPathItem(), false);
View Full Code Here

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

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

        OCacheEntry cacheEntry = diskCache.load(fileId, pageIndex, true);
        OCachePointer cachePointer = cacheEntry.getCachePointer();
        cachePointer.acquireExclusiveLock();
        try {
          ODurablePage durablePage = new ODurablePage(cacheEntry, ODurablePage.TrackMode.NONE);

          OPageChanges pageChanges = updatePageRecord.getChanges();
          durablePage.revertChanges(pageChanges);
View Full Code Here

Examples of com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.acquireExclusiveLock()

        OLogManager.instance().info(this, "Sending distributed configuration for database '%s' to the connected client %s...",
            iDatabaseName, ch.socket.getRemoteSocketAddress());

        try {
          ch.acquireExclusiveLock();

          try {
            ch.writeByte(OChannelBinaryProtocol.PUSH_DATA);
            ch.writeInt(Integer.MIN_VALUE);
            ch.writeByte(OChannelDistributedProtocol.PUSH_DISTRIBUTED_CONFIG);
View Full Code Here

Examples of com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.acquireExclusiveLock()

          final ONetworkProtocolBinary p = (ONetworkProtocolBinary) c.protocol;
          final OChannelBinary channel = (OChannelBinary) p.getChannel();

          if (c.database != null && c.database.getName().equals(dbName))
            synchronized (c.records2Push) {
              channel.acquireExclusiveLock();
              try {
                channel.writeByte(OChannelBinaryProtocol.PUSH_DATA);
                channel.writeInt(Integer.MIN_VALUE);
                channel.writeByte(OChannelBinaryProtocol.REQUEST_PUSH_RECORD);
                p.writeIdentifiable(iRecord);
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.