geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [15/38] incubator-geode git commit: merge now compiles
Date Sat, 05 Mar 2016 00:51:15 GMT
merge now compiles


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6faa9348
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6faa9348
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6faa9348

Branch: refs/heads/feature/GEODE-982
Commit: 6faa9348965bee0ff7a332512634ec277213ed1d
Parents: 6ec6842
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Tue Mar 1 15:01:34 2016 -0800
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Tue Mar 1 15:01:34 2016 -0800

----------------------------------------------------------------------
 .../internal/offheap/FreeListManagerTest.java   | 20 ++++++------
 .../offheap/TinyMemoryBlockJUnitTest.java       | 34 ++++++++++----------
 2 files changed, 27 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6faa9348/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
index 2d78af8..442adaf 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
@@ -742,8 +742,8 @@ public class FreeListManagerTest {
   
   @Test
   public void fragmentationShouldBeZeroIfNumberOfFragmentsIsZero() {
-    UnsafeMemoryChunk chunk = new UnsafeMemoryChunk(10);
-    this.freeListManager = createFreeListManager(ma, new UnsafeMemoryChunk[] {chunk});
+    SlabImpl chunk = new SlabImpl(10);
+    this.freeListManager = createFreeListManager(ma, new Slab[] {chunk});
     
     FreeListManager spy = spy(this.freeListManager);
     
@@ -754,8 +754,8 @@ public class FreeListManagerTest {
   
   @Test
   public void fragmentationShouldBeZeroIfNumberOfFragmentsIsOne() {
-    UnsafeMemoryChunk chunk = new UnsafeMemoryChunk(10);
-    this.freeListManager = createFreeListManager(ma, new UnsafeMemoryChunk[] {chunk});
+    SlabImpl chunk = new SlabImpl(10);
+    this.freeListManager = createFreeListManager(ma, new Slab[] {chunk});
     
     FreeListManager spy = spy(this.freeListManager);
     
@@ -766,8 +766,8 @@ public class FreeListManagerTest {
   
   @Test
   public void fragmentationShouldBeZeroIfUsedMemoryIsZero() {
-    UnsafeMemoryChunk chunk = new UnsafeMemoryChunk(10);
-    this.freeListManager = createFreeListManager(ma, new UnsafeMemoryChunk[] {chunk});
+    SlabImpl chunk = new SlabImpl(10);
+    this.freeListManager = createFreeListManager(ma, new Slab[] {chunk});
     
     FreeListManager spy = spy(this.freeListManager);
     
@@ -778,8 +778,8 @@ public class FreeListManagerTest {
   
   @Test
   public void fragmentationShouldBe100IfAllFreeMemoryIsFragmentedAsMinChunks() {
-    UnsafeMemoryChunk chunk = new UnsafeMemoryChunk(10);
-    this.freeListManager = createFreeListManager(ma, new UnsafeMemoryChunk[] {chunk});
+    SlabImpl chunk = new SlabImpl(10);
+    this.freeListManager = createFreeListManager(ma, new Slab[] {chunk});
     
     FreeListManager spy = spy(this.freeListManager);
     
@@ -792,8 +792,8 @@ public class FreeListManagerTest {
   
   @Test
   public void fragmentationShouldBeRoundedToNearestInteger() {
-    UnsafeMemoryChunk chunk = new UnsafeMemoryChunk(10);
-    this.freeListManager = createFreeListManager(ma, new UnsafeMemoryChunk[] {chunk});
+    SlabImpl chunk = new SlabImpl(10);
+    this.freeListManager = createFreeListManager(ma, new Slab[] {chunk});
     
     FreeListManager spy = spy(this.freeListManager);
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6faa9348/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 1626a15..fceb8d6 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
@@ -43,14 +43,14 @@ public class TinyMemoryBlockJUnitTest {
   private OutOfOffHeapMemoryListener ooohml;
   private OffHeapMemoryStats stats;
 
-  private AddressableMemoryChunk[] slabs = {
-      new UnsafeMemoryChunk((int)OffHeapStorage.MIN_SLAB_SIZE),
-      new UnsafeMemoryChunk((int)OffHeapStorage.MIN_SLAB_SIZE),
-      new UnsafeMemoryChunk((int)OffHeapStorage.MIN_SLAB_SIZE)
+  private Slab[] slabs = {
+      new SlabImpl((int)OffHeapStorage.MIN_SLAB_SIZE),
+      new SlabImpl((int)OffHeapStorage.MIN_SLAB_SIZE),
+      new SlabImpl((int)OffHeapStorage.MIN_SLAB_SIZE)
   };
 
   private static class TestableFreeListManager extends FreeListManager {
-    TestableFreeListManager(SimpleMemoryAllocatorImpl ma, final AddressableMemoryChunk[]
slabs) {
+    TestableFreeListManager(SimpleMemoryAllocatorImpl ma, final Slab[] slabs) {
       super (ma, slabs);
     }
   }
@@ -85,17 +85,17 @@ public class TinyMemoryBlockJUnitTest {
     return Long.valueOf(Long.MAX_VALUE);
   }
 
-  private MemoryChunkWithRefCount createChunk(byte[] v, boolean isSerialized, boolean isCompressed)
{
-    MemoryChunkWithRefCount chunk = (MemoryChunkWithRefCount) ma.allocateAndInitialize(v,
isSerialized, isCompressed);
+  private ObjectStoredOffHeap createChunk(byte[] v, boolean isSerialized, boolean isCompressed)
{
+    ObjectStoredOffHeap chunk = (ObjectStoredOffHeap) ma.allocateAndInitialize(v, isSerialized,
isCompressed);
     return chunk;
   }
 
-  private MemoryChunkWithRefCount createValueAsSerializedStoredObject(Object value, boolean
isCompressed) {
+  private ObjectStoredOffHeap createValueAsSerializedStoredObject(Object value, boolean isCompressed)
{
     byte[] valueInSerializedByteArray = EntryEventImpl.serialize(value);
 
     boolean isSerialized = true;
 
-    MemoryChunkWithRefCount createdObject = createChunk(valueInSerializedByteArray, isSerialized,
isCompressed);
+    ObjectStoredOffHeap createdObject = createChunk(valueInSerializedByteArray, isSerialized,
isCompressed);
     return createdObject;
   }
 
@@ -103,7 +103,7 @@ public class TinyMemoryBlockJUnitTest {
     return ByteBuffer.allocate(Long.SIZE / Byte.SIZE).putLong((Long) value).array();
   }
 
-  private MemoryChunkWithRefCount createValueAsUnserializedStoredObject(Object value, boolean
isCompressed) {
+  private ObjectStoredOffHeap createValueAsUnserializedStoredObject(Object value, boolean
isCompressed) {
     byte[] valueInByteArray;
     if (value instanceof Long) {
       valueInByteArray = convertValueToByteArray(value);
@@ -113,7 +113,7 @@ public class TinyMemoryBlockJUnitTest {
 
     boolean isSerialized = false;
 
-    MemoryChunkWithRefCount createdObject = createChunk(valueInByteArray, isSerialized, isCompressed);
+    ObjectStoredOffHeap createdObject = createChunk(valueInByteArray, isSerialized, isCompressed);
     return createdObject;
   }
 
@@ -180,7 +180,7 @@ public class TinyMemoryBlockJUnitTest {
     Object obj = getValue();
     boolean compressed = false;
 
-    MemoryChunkWithRefCount storedObject0 = createValueAsSerializedStoredObject(obj, compressed);
+    ObjectStoredOffHeap storedObject0 = createValueAsSerializedStoredObject(obj, compressed);
     MemoryBlock mb = new TestableFreeListManager.TinyMemoryBlock(((MemoryBlock)storedObject0).getMemoryAddress(),
0);
     softly.assertThat(mb.getDataType()).isEqualTo("N/A");
   }
@@ -190,7 +190,7 @@ public class TinyMemoryBlockJUnitTest {
     Object obj = getValue();
     boolean compressed = false;
 
-    MemoryChunkWithRefCount storedObject0 = createValueAsSerializedStoredObject(obj, compressed);
+    ObjectStoredOffHeap storedObject0 = createValueAsSerializedStoredObject(obj, compressed);
     MemoryBlock mb = new TestableFreeListManager.TinyMemoryBlock(((MemoryBlock)storedObject0).getMemoryAddress(),
0);
     softly.assertThat(mb.getDataValue()).isNull();
   }
@@ -200,8 +200,8 @@ public class TinyMemoryBlockJUnitTest {
     Object obj = getValue();
     boolean compressed = false;
 
-    MemoryChunkWithRefCount storedObject0 = createValueAsSerializedStoredObject(obj, compressed);
-    MemoryChunkWithRefCount storedObject1 = createValueAsUnserializedStoredObject(obj, compressed);
+    ObjectStoredOffHeap storedObject0 = createValueAsSerializedStoredObject(obj, compressed);
+    ObjectStoredOffHeap storedObject1 = createValueAsUnserializedStoredObject(obj, compressed);
     MemoryBlock mb0 = new TestableFreeListManager.TinyMemoryBlock(((MemoryBlock)storedObject0).getMemoryAddress(),
0);
     MemoryBlock mb1 = new TestableFreeListManager.TinyMemoryBlock(((MemoryBlock)storedObject1).getMemoryAddress(),
0);
     softly.assertThat(mb0.isSerialized()).isFalse();
@@ -212,8 +212,8 @@ public class TinyMemoryBlockJUnitTest {
   public void isCompressedReturnsFalse() {
     Object obj = getValue();
     boolean compressed = false;
-    MemoryChunkWithRefCount storedObject0 = createValueAsUnserializedStoredObject(obj, compressed);
-    MemoryChunkWithRefCount storedObject1 = createValueAsUnserializedStoredObject(obj, compressed
= true);
+    ObjectStoredOffHeap storedObject0 = createValueAsUnserializedStoredObject(obj, compressed);
+    ObjectStoredOffHeap storedObject1 = createValueAsUnserializedStoredObject(obj, compressed
= true);
     MemoryBlock mb0 = new TestableFreeListManager.TinyMemoryBlock(((MemoryBlock)storedObject0).getMemoryAddress(),
0);
     MemoryBlock mb1 = new TestableFreeListManager.TinyMemoryBlock(((MemoryBlock)storedObject1).getMemoryAddress(),
0);
     softly.assertThat(mb0.isCompressed()).isFalse();


Mime
View raw message