Examples of decrementReferrer()


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

      localPage.setNextPage(1034);
      Assert.assertEquals(localPage.getNextPage(), 1034);

      assertChangesTracking(localPage, pagePointer);
    } finally {
      cachePointer.decrementReferrer();
    }
  }

  public void testSetGetPrevPage() throws Exception {
    ODirectMemoryPointer pagePointer = new ODirectMemoryPointer(new byte[OClusterPage.PAGE_SIZE + ODurablePage.PAGE_PADDING]);
View Full Code Here

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

      localPage.setPrevPage(1034);
      Assert.assertEquals(localPage.getPrevPage(), 1034);

      assertChangesTracking(localPage, pagePointer);
    } finally {
      cachePointer.decrementReferrer();
    }
  }

  public void testReplaceOneRecordWithBiggerSize() throws Exception {
    ODirectMemoryPointer pagePointer = new ODirectMemoryPointer(new byte[OClusterPage.PAGE_SIZE + ODurablePage.PAGE_PADDING]);
View Full Code Here

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

      Assert.assertEquals(localPage.getRecordVersion(index), newRecordVersion);

      assertChangesTracking(localPage, pagePointer);
    } finally {
      cachePointer.decrementReferrer();
    }
  }

  public void testReplaceOneRecordWithEqualSize() throws Exception {
    ODirectMemoryPointer pagePointer = new ODirectMemoryPointer(new byte[OClusterPage.PAGE_SIZE + ODurablePage.PAGE_PADDING]);
View Full Code Here

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

      Assert.assertEquals(localPage.getRecordVersion(index), newRecordVersion);

      assertChangesTracking(localPage, pagePointer);
    } finally {
      cachePointer.decrementReferrer();
    }
  }

  public void testReplaceOneRecordWithSmallerSize() throws Exception {
    ODirectMemoryPointer pagePointer = new ODirectMemoryPointer(new byte[OClusterPage.PAGE_SIZE + ODurablePage.PAGE_PADDING]);
View Full Code Here

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

      Assert.assertEquals(localPage.getRecordVersion(index), newRecordVersion);

      assertChangesTracking(localPage, pagePointer);
    } finally {
      cachePointer.decrementReferrer();
    }
  }

  public void testReplaceOneRecordNoVersionUpdate() throws Exception {
    ODirectMemoryPointer pagePointer = new ODirectMemoryPointer(new byte[OClusterPage.PAGE_SIZE + ODurablePage.PAGE_PADDING]);
View Full Code Here

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

      Assert.assertEquals(localPage.getRecordVersion(index), recordVersion);

      assertChangesTracking(localPage, pagePointer);
    } finally {
      cachePointer.decrementReferrer();
    }
  }

  public void testReplaceOneRecordLowerVersion() throws Exception {
    ODirectMemoryPointer pagePointer = new ODirectMemoryPointer(new byte[OClusterPage.PAGE_SIZE + ODurablePage.PAGE_PADDING]);
View Full Code Here

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

      Assert.assertEquals(localPage.getRecordVersion(index), recordVersion);

      assertChangesTracking(localPage, pagePointer);
    } finally {
      cachePointer.decrementReferrer();
    }
  }

  private void assertChangesTracking(OClusterPage localPage, ODirectMemoryPointer pagePointer) throws IOException {
    ODirectMemoryPointer restoredPagePointer = new ODirectMemoryPointer(new byte[OClusterPage.PAGE_SIZE + ODurablePage.PAGE_PADDING]);
View Full Code Here

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

      restoredPage.revertChanges(changes);

      Assert.assertEquals(restoredPagePointer.get(SYSTEM_OFFSET, OClusterPage.PAGE_SIZE - SYSTEM_OFFSET),
          new byte[OClusterPage.PAGE_SIZE - SYSTEM_OFFSET]);
    } finally {
      cachePointer.decrementReferrer();
    }
  }
}
View Full Code Here

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

    Assert.assertEquals(treeBucket.size(), 0);
    Assert.assertFalse(treeBucket.isLeaf());
    Assert.assertEquals(treeBucket.getLeftSibling().getPageIndex(), -1);
    Assert.assertEquals(treeBucket.getRightSibling().getPageIndex(), -1);

    cachePointer.decrementReferrer();
  }

  public void testSearch() throws Exception {
    long seed = 1381299802658L;// System.currentTimeMillis();
    System.out.println("testSearch seed : " + seed);
View Full Code Here

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

        Assert.assertEquals(entry.rightChild, prevLeft);

      prevLeft = entry.leftChild;
    }

    cachePointer.decrementReferrer();
  }

  public void testShrink() throws Exception {
    long seed = System.currentTimeMillis();
    System.out.println("testShrink seed : " + seed);
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.