Package com.orientechnologies.common.directmemory

Examples of com.orientechnologies.common.directmemory.ODirectMemoryPointer


  @Test
  public void testAddElevenRemoveLRU() {
    OCachePointer[] cachePointers = new OCachePointer[11];

    for (int i = 0; i < 11; i++) {
      ODirectMemoryPointer directMemoryPointer = new ODirectMemoryPointer(1);

      cachePointers[i] = new OCachePointer(directMemoryPointer, new OLogSequenceNumber(0, 0));
      lruList.putToMRU(new OCacheEntry(1, i * 10, cachePointers[i], false));
    }

View Full Code Here


  @Test
  public void testAddElevenRemoveMiddle() {
    OCachePointer[] cachePointers = new OCachePointer[11];

    for (int i = 0; i < 11; i++) {
      ODirectMemoryPointer directMemoryPointer = new ODirectMemoryPointer(1);

      cachePointers[i] = new OCachePointer(directMemoryPointer, new OLogSequenceNumber(0, 0));
      lruList.putToMRU(new OCacheEntry(1, i * 10, cachePointers[i], false));
    }

View Full Code Here

  @Test
  public void testAddElevenGetMiddle() {
    OCachePointer[] cachePointers = new OCachePointer[11];

    for (int i = 0; i < 11; i++) {
      ODirectMemoryPointer directMemoryPointer = new ODirectMemoryPointer(1);

      cachePointers[i] = new OCachePointer(directMemoryPointer, new OLogSequenceNumber(0, 0));
      lruList.putToMRU(new OCacheEntry(1, i * 10, cachePointers[i], false));
    }

View Full Code Here

  @Test
  public void testAdd9128() {
    OCachePointer[] cachePointers = new OCachePointer[9128];

    for (int i = 0; i < 9128; i++) {
      ODirectMemoryPointer directMemoryPointer = new ODirectMemoryPointer(1);
      cachePointers[i] = new OCachePointer(directMemoryPointer, new OLogSequenceNumber(0, 0));
      lruList.putToMRU(new OCacheEntry(1, i * 10, cachePointers[i], false));
    }

    Assert.assertEquals(lruList.size(), 9128);
View Full Code Here

  @Test
  public void testAdd9128Get() {
    OCachePointer[] cachePointers = new OCachePointer[9128];

    for (int i = 0; i < 9128; i++) {
      ODirectMemoryPointer directMemoryPointer = new ODirectMemoryPointer(1);
      cachePointers[i] = new OCachePointer(directMemoryPointer, new OLogSequenceNumber(0, 0));
      lruList.putToMRU(new OCacheEntry(1, i * 10, cachePointers[i], false));
    }

    Assert.assertEquals(lruList.size(), 9128);
View Full Code Here

  @Test
  public void testAdd9128Remove4564() {
    OCachePointer[] cachePointers = new OCachePointer[9128];

    for (int i = 0; i < 9128; i++) {
      ODirectMemoryPointer directMemoryPointer = new ODirectMemoryPointer(1);
      cachePointers[i] = new OCachePointer(directMemoryPointer, new OLogSequenceNumber(0, 0));
      lruList.putToMRU(new OCacheEntry(1, i * 10, cachePointers[i], false));
    }

    for (int i = 4564; i < 9128; i++)
View Full Code Here

  @Test
  public void testAdd9128PutLastAndMiddleToTop() {
    OCachePointer[] cachePointers = new OCachePointer[9128];

    for (int i = 0; i < 9128; i++) {
      ODirectMemoryPointer directMemoryPointer = new ODirectMemoryPointer(1);
      cachePointers[i] = new OCachePointer(directMemoryPointer, new OLogSequenceNumber(0, 0));
      lruList.putToMRU(new OCacheEntry(1, i * 10, cachePointers[i], false));
    }

    lruList.putToMRU(new OCacheEntry(1, 0, cachePointers[0], false));
View Full Code Here

    this.dataPointer = dataPointer;
  }

  public OCachePointer(byte[] data, OLogSequenceNumber lastFlushedLsn) {
    this.lastFlushedLsn = lastFlushedLsn;
    dataPointer = new ODirectMemoryPointer(data);
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.common.directmemory.ODirectMemoryPointer

Copyright © 2018 www.massapicom. 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.