You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2016/03/05 01:51:30 UTC

[30/38] incubator-geode git commit: renamed ObjectStoredInMemory to OffHeapStoredObject

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b6eca046/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
index 4fb5263..cc791fc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
@@ -189,10 +189,10 @@ public class SimpleMemoryAllocatorJUnitTest {
   @Test
   public void testBasics() {
     int BATCH_SIZE = 1;
-    int TINY_MULTIPLE = com.gemstone.gemfire.internal.offheap.FreeListManager.TINY_MULTIPLE;
-    int HUGE_MULTIPLE = com.gemstone.gemfire.internal.offheap.FreeListManager.HUGE_MULTIPLE;
-    int perObjectOverhead = com.gemstone.gemfire.internal.offheap.ObjectStoredInMemory.HEADER_SIZE;
-    int maxTiny = com.gemstone.gemfire.internal.offheap.FreeListManager.MAX_TINY-perObjectOverhead;
+    int TINY_MULTIPLE = FreeListManager.TINY_MULTIPLE;
+    int HUGE_MULTIPLE = FreeListManager.HUGE_MULTIPLE;
+    int perObjectOverhead = OffHeapStoredObject.HEADER_SIZE;
+    int maxTiny = FreeListManager.MAX_TINY-perObjectOverhead;
     int minHuge = maxTiny+1;
     int TOTAL_MEM = (maxTiny+perObjectOverhead)*BATCH_SIZE /*+ (maxBig+perObjectOverhead)*BATCH_SIZE*/ + round(TINY_MULTIPLE, minHuge+1+perObjectOverhead)*BATCH_SIZE + (TINY_MULTIPLE+perObjectOverhead)*BATCH_SIZE /*+ (MIN_BIG_SIZE+perObjectOverhead)*BATCH_SIZE*/ + round(TINY_MULTIPLE, minHuge+perObjectOverhead+1);
     SlabImpl slab = new SlabImpl(TOTAL_MEM);
@@ -273,7 +273,7 @@ public class SimpleMemoryAllocatorJUnitTest {
         bb.put((byte) i);
       }
       bb.position(0);
-      ObjectStoredInMemory c = (ObjectStoredInMemory) ma.allocateAndInitialize(bb.array(), false, false);
+      OffHeapStoredObject c = (OffHeapStoredObject) ma.allocateAndInitialize(bb.array(), false, false);
       assertEquals(1024, c.getDataSize());
       if (!Arrays.equals(bb.array(), c.getRawBytes())) {
         fail("arrays are not equal. Expected " + Arrays.toString(bb.array()) + " but found: " + Arrays.toString(c.getRawBytes()));
@@ -427,7 +427,7 @@ public class SimpleMemoryAllocatorJUnitTest {
   
   @Test
   public void testCompaction() {
-    final int perObjectOverhead = com.gemstone.gemfire.internal.offheap.ObjectStoredInMemory.HEADER_SIZE;
+    final int perObjectOverhead = OffHeapStoredObject.HEADER_SIZE;
     final int BIG_ALLOC_SIZE = 150000;
     final int SMALL_ALLOC_SIZE = BIG_ALLOC_SIZE/2;
     final int TOTAL_MEM = BIG_ALLOC_SIZE;
@@ -543,7 +543,7 @@ public class SimpleMemoryAllocatorJUnitTest {
   boolean memoryUsageEventReceived;
   @Test
   public void testUsageEventListener() {
-    final int perObjectOverhead = com.gemstone.gemfire.internal.offheap.ObjectStoredInMemory.HEADER_SIZE;
+    final int perObjectOverhead = OffHeapStoredObject.HEADER_SIZE;
     final int SMALL_ALLOC_SIZE = 1000;
     SlabImpl slab = new SlabImpl(3000);
     try {
@@ -596,7 +596,7 @@ public class SimpleMemoryAllocatorJUnitTest {
   
   @Test
   public void testOutOfOffHeapMemory() {
-    final int perObjectOverhead = com.gemstone.gemfire.internal.offheap.ObjectStoredInMemory.HEADER_SIZE;
+    final int perObjectOverhead = OffHeapStoredObject.HEADER_SIZE;
     final int BIG_ALLOC_SIZE = 150000;
     final int SMALL_ALLOC_SIZE = BIG_ALLOC_SIZE/2;
     final int TOTAL_MEM = BIG_ALLOC_SIZE;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b6eca046/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/StoredObjectTestSuite.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/StoredObjectTestSuite.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/StoredObjectTestSuite.java
index 35d5cc2..4bd2850 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/StoredObjectTestSuite.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/StoredObjectTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.runners.Suite;
 
 @Suite.SuiteClasses({
 	TinyStoredObjectJUnitTest.class,
-	ObjectChunkJUnitTest.class,
+	OffHeapStoredObjectJUnitTest.class,
 	ObjectChunkWithHeapFormJUnitTest.class,
 	ObjectChunkSliceJUnitTest.class,
 })

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b6eca046/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SyncChunkStackJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SyncChunkStackJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SyncChunkStackJUnitTest.java
index e24ff9f..e8c82b7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SyncChunkStackJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SyncChunkStackJUnitTest.java
@@ -107,7 +107,7 @@ public class SyncChunkStackJUnitTest {
     SlabImpl slab = new SlabImpl(1024);
     try {
       SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      ObjectStoredInMemory chunk = (ObjectStoredInMemory) ma.allocate(100);
+      OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
 
       SyncChunkStack stack = new SyncChunkStack(chunk.getAddress());
       assertEquals(false, stack.isEmpty());
@@ -121,7 +121,7 @@ public class SyncChunkStackJUnitTest {
     SlabImpl slab = new SlabImpl(1024);
     try {
       SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      ObjectStoredInMemory chunk = (ObjectStoredInMemory) ma.allocate(100);
+      OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
 
       SyncChunkStack stack = new SyncChunkStack();
       stack.offer(chunk.getAddress());
@@ -136,7 +136,7 @@ public class SyncChunkStackJUnitTest {
     SlabImpl slab = new SlabImpl(1024);
     try {
       SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      ObjectStoredInMemory chunk = (ObjectStoredInMemory) ma.allocate(100);
+      OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
 
       long addr = chunk.getAddress();
       SyncChunkStack stack = new SyncChunkStack();
@@ -163,7 +163,7 @@ public class SyncChunkStackJUnitTest {
     SlabImpl slab = new SlabImpl(1024);
     try {
       SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      ObjectStoredInMemory chunk = (ObjectStoredInMemory) ma.allocate(100);
+      OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
 
       long addr = chunk.getAddress();
       SyncChunkStack stack = new SyncChunkStack();
@@ -181,7 +181,7 @@ public class SyncChunkStackJUnitTest {
     SlabImpl slab = new SlabImpl(1024);
     try {
       SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      ObjectStoredInMemory chunk = (ObjectStoredInMemory) ma.allocate(100);
+      OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
 
       long addr = chunk.getAddress();
       SyncChunkStack stack = new SyncChunkStack();
@@ -199,7 +199,7 @@ public class SyncChunkStackJUnitTest {
     SlabImpl slab = new SlabImpl(1024);
     try {
       SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      ObjectStoredInMemory chunk = (ObjectStoredInMemory) ma.allocate(100);
+      OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
       int chunkSize = chunk.getSize();
 
       long addr = chunk.getAddress();
@@ -217,7 +217,7 @@ public class SyncChunkStackJUnitTest {
     SlabImpl slab = new SlabImpl(1024);
     try {
       SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      ObjectStoredInMemory chunk = (ObjectStoredInMemory) ma.allocate(100);
+      OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
       int chunkSize = chunk.getSize();
 
       long addr = chunk.getAddress();
@@ -242,7 +242,7 @@ public class SyncChunkStackJUnitTest {
     protected void testHookDoConcurrentModification() {
       if (doConcurrentMod) {
         doConcurrentMod = false;
-        ObjectStoredInMemory chunk2 = (ObjectStoredInMemory) ma.allocate(50);
+        OffHeapStoredObject chunk2 = (OffHeapStoredObject) ma.allocate(50);
         this.chunk2Size = chunk2.getSize();
         this.offer(chunk2.getAddress());
       }
@@ -253,7 +253,7 @@ public class SyncChunkStackJUnitTest {
     SlabImpl slab = new SlabImpl(1024);
     try {
       SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      ObjectStoredInMemory chunk = (ObjectStoredInMemory) ma.allocate(100);
+      OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
       int chunkSize = chunk.getSize();
 
       long addr = chunk.getAddress();
@@ -272,7 +272,7 @@ public class SyncChunkStackJUnitTest {
     SlabImpl slab = new SlabImpl(1024);
     try {
       SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      ObjectStoredInMemory chunk = (ObjectStoredInMemory) ma.allocate(100);
+      OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
       int chunkSize = chunk.getSize();
 
       long addr = chunk.getAddress();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b6eca046/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java
index a4caa9e..d444865 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java
@@ -137,7 +137,7 @@ public class TinyMemoryBlockJUnitTest {
 
   @Test
   public void getBlockSizeReturnsReturnsSizeOfUnderlyingChunk() {
-    MemoryBlock mb = new TestableFreeListManager.TinyMemoryBlock(new ObjectStoredInMemory(slabs[0].getMemoryAddress(), slabs[0].getSize()).getAddress(), 0);
+    MemoryBlock mb = new TestableFreeListManager.TinyMemoryBlock(new OffHeapStoredObject(slabs[0].getMemoryAddress(), slabs[0].getSize()).getAddress(), 0);
     softly.assertThat(mb.getBlockSize()).isEqualTo(slabs[0].getSize());
   }
 
@@ -145,7 +145,7 @@ public class TinyMemoryBlockJUnitTest {
   public void getNextBlockThrowsUnsupportedOperationException() {
     expectedException.expect(UnsupportedOperationException.class);
 
-    MemoryBlock mb = new TestableFreeListManager.TinyMemoryBlock(new ObjectStoredInMemory(slabs[0].getMemoryAddress(), slabs[0].getSize()).getAddress(), 0);
+    MemoryBlock mb = new TestableFreeListManager.TinyMemoryBlock(new OffHeapStoredObject(slabs[0].getMemoryAddress(), slabs[0].getSize()).getAddress(), 0);
     mb.getNextBlock();
     fail("getNextBlock failed to throw UnsupportedOperationException");
   }
@@ -154,23 +154,23 @@ public class TinyMemoryBlockJUnitTest {
   public void getSlabIdThrowsUnsupportedOperationException() {
     expectedException.expect(UnsupportedOperationException.class);
 
-    MemoryBlock mb = new TestableFreeListManager.TinyMemoryBlock(new ObjectStoredInMemory(slabs[0].getMemoryAddress(), slabs[0].getSize()).getAddress(), 0);
+    MemoryBlock mb = new TestableFreeListManager.TinyMemoryBlock(new OffHeapStoredObject(slabs[0].getMemoryAddress(), slabs[0].getSize()).getAddress(), 0);
     mb.getSlabId();
     fail("getSlabId failed to throw UnsupportedOperationException");
   }
 
   @Test
   public void getFreeListIdReturnsIdBlockWasConstructedWith() {
-    MemoryBlock mb0 = new TestableFreeListManager.TinyMemoryBlock(new ObjectStoredInMemory(slabs[0].getMemoryAddress(), slabs[0].getSize()).getAddress(), 0);
-    MemoryBlock mb1 = new TestableFreeListManager.TinyMemoryBlock(new ObjectStoredInMemory(slabs[1].getMemoryAddress(), slabs[1].getSize()).getAddress(), 1);
+    MemoryBlock mb0 = new TestableFreeListManager.TinyMemoryBlock(new OffHeapStoredObject(slabs[0].getMemoryAddress(), slabs[0].getSize()).getAddress(), 0);
+    MemoryBlock mb1 = new TestableFreeListManager.TinyMemoryBlock(new OffHeapStoredObject(slabs[1].getMemoryAddress(), slabs[1].getSize()).getAddress(), 1);
     softly.assertThat(mb0.getFreeListId()).isEqualTo(0);
     softly.assertThat(mb1.getFreeListId()).isEqualTo(1);
   }
 
   @Test
   public void getRefCountReturnsZero() {
-    MemoryBlock mb0 = new TestableFreeListManager.TinyMemoryBlock(new ObjectStoredInMemory(slabs[0].getMemoryAddress(), slabs[0].getSize()).getAddress(), 0);
-    MemoryBlock mb1 = new TestableFreeListManager.TinyMemoryBlock(new ObjectStoredInMemory(slabs[1].getMemoryAddress(), slabs[1].getSize()).getAddress(), 1);
+    MemoryBlock mb0 = new TestableFreeListManager.TinyMemoryBlock(new OffHeapStoredObject(slabs[0].getMemoryAddress(), slabs[0].getSize()).getAddress(), 0);
+    MemoryBlock mb1 = new TestableFreeListManager.TinyMemoryBlock(new OffHeapStoredObject(slabs[1].getMemoryAddress(), slabs[1].getSize()).getAddress(), 1);
     softly.assertThat(mb0.getRefCount()).isEqualTo(0);
     softly.assertThat(mb1.getRefCount()).isEqualTo(0);
   }
@@ -238,7 +238,7 @@ public class TinyMemoryBlockJUnitTest {
   @Test
   public void hashCodeReturnsHashOfUnderlyingMemory() {
     MemoryBlock mb = new TestableFreeListManager.TinyMemoryBlock(slabs[0].getMemoryAddress(), 0);
-    softly.assertThat(mb.hashCode()).isEqualTo(new ObjectStoredInMemory(slabs[0].getMemoryAddress(), slabs[0].getSize()).hashCode());
+    softly.assertThat(mb.hashCode()).isEqualTo(new OffHeapStoredObject(slabs[0].getMemoryAddress(), slabs[0].getSize()).hashCode());
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b6eca046/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
index fc7f124..9ded958 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
@@ -36,7 +36,7 @@ import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.offheap.ObjectStoredInMemory;
+import com.gemstone.gemfire.internal.offheap.OffHeapStoredObject;
 import com.gemstone.gemfire.internal.offheap.OffHeapMemoryStats;
 import com.gemstone.gemfire.internal.offheap.OffHeapStorage;
 import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
@@ -240,7 +240,7 @@ public class OffHeapManagementDUnitTest extends CacheTestCase {
       
       // After allocating large chunk (equal to total memory) 
       // we should still have no fragmentation
-      int largeChunk = (int) TOTAL_MEMORY - ObjectStoredInMemory.HEADER_SIZE;
+      int largeChunk = (int) TOTAL_MEMORY - OffHeapStoredObject.HEADER_SIZE;
       doPutOnVm(vm, KEY, new byte[largeChunk], OFF_HEAP_REGION_NAME, false);
       // No compaction has run, so fragmentation should be zero
       assertFragmentationStatOnVm(vm,0,ASSERT_OP.EQUAL);
@@ -255,7 +255,7 @@ public class OffHeapManagementDUnitTest extends CacheTestCase {
       assertFragmentationStatOnVm(vm,0,ASSERT_OP.EQUAL);
       
       // Allocate HALF_TOTAL_MEMORY twice and release one to create one fragment
-      int halfChunk = HALF_TOTAL_MEMORY - ObjectStoredInMemory.HEADER_SIZE;
+      int halfChunk = HALF_TOTAL_MEMORY - OffHeapStoredObject.HEADER_SIZE;
       doPutOnVm(vm, KEY + "0", new byte[halfChunk], OFF_HEAP_REGION_NAME, false);
       doPutOnVm(vm, KEY + "1", new byte[halfChunk], OFF_HEAP_REGION_NAME, false);
       doDestroyOnVm(vm, KEY + "0", OFF_HEAP_REGION_NAME);
@@ -267,7 +267,7 @@ public class OffHeapManagementDUnitTest extends CacheTestCase {
       
       // Consume the available fragment as below
       // [16][262120][16][262120][16] = [524288] (HALF_TOTAL_MEMORY)
-      int smallChunk = ObjectStoredInMemory.MIN_CHUNK_SIZE - ObjectStoredInMemory.HEADER_SIZE;
+      int smallChunk = OffHeapStoredObject.MIN_CHUNK_SIZE - OffHeapStoredObject.HEADER_SIZE;
       int mediumChunk = 262112; //(262120 - ObjectChunk.OFF_HEAP_HEADER_SIZE)
       doPutOnVm(vm, KEY + "S1", new byte[smallChunk], OFF_HEAP_REGION_NAME, false);
       doPutOnVm(vm, KEY + "M1", new byte[mediumChunk], OFF_HEAP_REGION_NAME, false);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b6eca046/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java
index 0e80f85..8380f57 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java
@@ -22,7 +22,7 @@ import java.nio.ByteBuffer;
 
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.internal.offheap.ObjectStoredInMemory;
+import com.gemstone.gemfire.internal.offheap.OffHeapStoredObject;
 import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream.ByteSource;
@@ -35,8 +35,8 @@ public class OffHeapByteBufferByteSourceJUnitTest extends OffHeapByteSourceJUnit
   @Override
   protected ByteSource createByteSource(byte[] bytes) {
     StoredObject so = SimpleMemoryAllocatorImpl.getAllocator().allocateAndInitialize(bytes, false, false);
-    if (so instanceof ObjectStoredInMemory) {
-      ObjectStoredInMemory c = (ObjectStoredInMemory) so;
+    if (so instanceof OffHeapStoredObject) {
+      OffHeapStoredObject c = (OffHeapStoredObject) so;
       ByteBuffer bb = c.createDirectByteBuffer();
       if (bb == null) {
         fail("could not create a direct ByteBuffer for an off-heap Chunk");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b6eca046/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
index 33fe1d9..2111f79 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
@@ -20,7 +20,7 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.internal.offheap.ObjectStoredInMemory;
+import com.gemstone.gemfire.internal.offheap.OffHeapStoredObject;
 import com.gemstone.gemfire.internal.offheap.NullOffHeapMemoryStats;
 import com.gemstone.gemfire.internal.offheap.NullOutOfOffHeapMemoryListener;
 import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
@@ -52,7 +52,7 @@ public class OffHeapByteSourceJUnitTest extends ByteSourceJUnitTest {
   @Override
   protected ByteSource createByteSource(byte[] bytes) {
     StoredObject so = SimpleMemoryAllocatorImpl.getAllocator().allocateAndInitialize(bytes, false, false);
-    if (so instanceof ObjectStoredInMemory) {
+    if (so instanceof OffHeapStoredObject) {
       // bypass the factory to make sure that OffHeapByteSource is tested
       return new OffHeapByteSource(so);
     } else {