Examples of ODirectMemoryPointer


Examples of com.orientechnologies.common.directmemory.ODirectMemoryPointer

    while (keys.size() < 2 * OSBTreeBonsaiBucket.MAX_BUCKET_SIZE_BYTES / OLongSerializer.LONG_SIZE) {
      keys.add(random.nextLong());
    }

    ODirectMemoryPointer pointer = new ODirectMemoryPointer(ODurablePage.MAX_PAGE_SIZE_BYTES);
    OCachePointer cachePointer = new OCachePointer(pointer, new OLogSequenceNumber(0, 0));
    OCacheEntry cacheEntry = new OCacheEntry(0, 0, cachePointer, false);

    cachePointer.incrementReferrer();

View Full Code Here

Examples of com.orientechnologies.common.directmemory.ODirectMemoryPointer

    while (keys.size() < 2 * OSBTreeBonsaiBucket.MAX_BUCKET_SIZE_BYTES / OLongSerializer.LONG_SIZE) {
      keys.add(random.nextLong());
    }

    ODirectMemoryPointer pointer = new ODirectMemoryPointer(ODurablePage.MAX_PAGE_SIZE_BYTES);
    OCachePointer cachePointer = new OCachePointer(pointer, new OLogSequenceNumber(0, 0));
    cachePointer.incrementReferrer();

    OCacheEntry cacheEntry = new OCacheEntry(0, 0, cachePointer, false);

View Full Code Here

Examples of com.orientechnologies.common.directmemory.ODirectMemoryPointer

    cachePointer.decrementReferrer();
  }

  public void testSetLeftSibling() throws Exception {
    ODirectMemoryPointer pointer = new ODirectMemoryPointer(ODurablePage.MAX_PAGE_SIZE_BYTES);
    OCachePointer cachePointer = new OCachePointer(pointer, new OLogSequenceNumber(0, 0));
    cachePointer.incrementReferrer();

    OCacheEntry cacheEntry = new OCacheEntry(0, 0, cachePointer, false);
View Full Code Here

Examples of com.orientechnologies.common.directmemory.ODirectMemoryPointer

    cachePointer.decrementReferrer();
  }

  public void testSetRightSibling() throws Exception {
    ODirectMemoryPointer pointer = new ODirectMemoryPointer(ODurablePage.MAX_PAGE_SIZE_BYTES);
    OCachePointer cachePointer = new OCachePointer(pointer, new OLogSequenceNumber(0, 0));
    cachePointer.incrementReferrer();

    OCacheEntry cacheEntry = new OCacheEntry(0, 0, cachePointer, false);
View Full Code Here

Examples of com.orientechnologies.common.directmemory.ODirectMemoryPointer

* @since 12.08.13
*/
@Test
public class OSBTreeBonsaiNonLeafBucketTest {
  public void testInitialization() throws Exception {
    ODirectMemoryPointer pointer = new ODirectMemoryPointer(ODurablePage.MAX_PAGE_SIZE_BYTES);
    OCachePointer cachePointer = new OCachePointer(pointer, new OLogSequenceNumber(0, 0));
    cachePointer.incrementReferrer();
    OCacheEntry cacheEntry = new OCacheEntry(0, 0, cachePointer, false);

    OSBTreeBonsaiBucket<Long, OIdentifiable> treeBucket = new OSBTreeBonsaiBucket<Long, OIdentifiable>(cacheEntry, 0, false,
View Full Code Here

Examples of com.orientechnologies.common.directmemory.ODirectMemoryPointer

    while (keys.size() < 2 * OSBTreeBonsaiBucket.MAX_BUCKET_SIZE_BYTES / OLongSerializer.LONG_SIZE) {
      keys.add(random.nextLong());
    }

    ODirectMemoryPointer pointer = new ODirectMemoryPointer(ODurablePage.MAX_PAGE_SIZE_BYTES);
    OCachePointer cachePointer = new OCachePointer(pointer, new OLogSequenceNumber(0, 0));
    OCacheEntry cacheEntry = new OCacheEntry(0, 0, cachePointer, false);

    OSBTreeBonsaiBucket<Long, OIdentifiable> treeBucket = new OSBTreeBonsaiBucket<Long, OIdentifiable>(cacheEntry, 0, false,
        OLongSerializer.INSTANCE, OLinkSerializer.INSTANCE, ODurablePage.TrackMode.FULL);
View Full Code Here

Examples of com.orientechnologies.common.directmemory.ODirectMemoryPointer

    while (keys.size() < 2 * OSBTreeBonsaiBucket.MAX_BUCKET_SIZE_BYTES / OLongSerializer.LONG_SIZE) {
      keys.add(random.nextLong());
    }

    ODirectMemoryPointer pointer = new ODirectMemoryPointer(ODurablePage.MAX_PAGE_SIZE_BYTES);
    OCachePointer cachePointer = new OCachePointer(pointer, new OLogSequenceNumber(0, 0));
    OCacheEntry cacheEntry = new OCacheEntry(0, 0, cachePointer, false);

    OSBTreeBonsaiBucket<Long, OIdentifiable> treeBucket = new OSBTreeBonsaiBucket<Long, OIdentifiable>(cacheEntry, 0, false,
        OLongSerializer.INSTANCE, OLinkSerializer.INSTANCE, ODurablePage.TrackMode.FULL);
View Full Code Here

Examples of com.orientechnologies.common.directmemory.ODirectMemoryPointer

  }

  public void testNativeDirectMemoryCompatibility() {
    booleanSerializer.serializeNative(OBJECT_TRUE, stream, 0);

    ODirectMemoryPointer pointer = new ODirectMemoryPointer(stream);
    try {
      Assert.assertEquals(booleanSerializer.deserializeFromDirectMemoryObject(pointer, 0), OBJECT_TRUE);
    } finally {
      pointer.free();
    }

    booleanSerializer.serializeNative(OBJECT_FALSE, stream, 0);
    pointer = new ODirectMemoryPointer(stream);
    try {
      Assert.assertEquals(booleanSerializer.deserializeFromDirectMemoryObject(pointer, 0), OBJECT_FALSE);
    } finally {
      pointer.free();
    }
  }
View Full Code Here

Examples of com.orientechnologies.common.directmemory.ODirectMemoryPointer

    Assert.assertEquals(doubleSerializer.deserializeNative(stream, 0), OBJECT);
  }

  public void testNativeDirectMemoryCompatibility() {
    doubleSerializer.serializeNative(OBJECT, stream, 0);
    ODirectMemoryPointer pointer = new ODirectMemoryPointer(stream);

    try {
      Assert.assertEquals(doubleSerializer.deserializeFromDirectMemory(pointer, 0), OBJECT);
    } finally {
      pointer.free();
    }
  }
View Full Code Here

Examples of com.orientechnologies.common.directmemory.ODirectMemoryPointer

  }

  public void testNativeDirectMemoryCompatibility() {
    integerSerializer.serializeNative(OBJECT, stream, 0);

    ODirectMemoryPointer pointer = new ODirectMemoryPointer(stream);
    try {
      Assert.assertEquals(integerSerializer.deserializeFromDirectMemoryObject(pointer, 0), OBJECT);
    } finally {
      pointer.free();
    }
  }
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.