geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [15/16] incubator-geode git commit: renamed off-heap classes with GemFire in their name
Date Fri, 19 Feb 2016 01:05:58 GMT
renamed off-heap classes with GemFire in their name


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

Branch: refs/heads/feature/GEODE-831
Commit: 1a82c80c702520df89ff01db851e38665f09890b
Parents: 436e143
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Thu Feb 18 17:02:51 2016 -0800
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Thu Feb 18 17:02:51 2016 -0800

----------------------------------------------------------------------
 .../internal/GetOperationContextImpl.java       |   6 +-
 .../query/internal/index/AbstractIndex.java     |   8 +-
 .../query/internal/index/DummyQRegion.java      |  14 +-
 .../cache/query/internal/index/HashIndex.java   |   6 +-
 .../internal/cache/AbstractRegionEntry.java     |  12 +-
 .../internal/cache/AbstractRegionMap.java       |   4 +-
 .../cache/BytesAndBitsForCompactor.java         |   8 +-
 .../gemfire/internal/cache/DiskEntry.java       |  20 +-
 .../internal/cache/DistributedRegion.java       |   6 +-
 .../gemfire/internal/cache/EntryEventImpl.java  |  52 +-
 .../gemfire/internal/cache/LocalRegion.java     |   6 +-
 .../internal/cache/PartitionedRegion.java       |   2 +-
 .../internal/cache/tier/sockets/Part.java       |  20 +-
 .../cache/wan/GatewaySenderEventImpl.java       |   8 +-
 .../internal/offheap/ChunkWithHeapForm.java     |   8 +-
 .../gemfire/internal/offheap/Fragment.java      |   2 +-
 .../internal/offheap/FreeListManager.java       | 104 +--
 .../gemfire/internal/offheap/GemFireChunk.java  | 737 -------------------
 .../internal/offheap/GemFireChunkSlice.java     |  44 --
 .../internal/offheap/MemoryBlockNode.java       |  14 +-
 .../gemfire/internal/offheap/ObjectChunk.java   | 737 +++++++++++++++++++
 .../internal/offheap/ObjectChunkSlice.java      |  44 ++
 .../offheap/OffHeapCachedDeserializable.java    |   2 +-
 .../offheap/OffHeapRegionEntryHelper.java       |  10 +-
 .../offheap/SimpleMemoryAllocatorImpl.java      |  38 +-
 .../internal/offheap/SyncChunkStack.java        |  12 +-
 .../internal/tcp/ByteBufferInputStream.java     |  10 +-
 .../tcp/ImmutableByteBufferInputStream.java     |   4 +-
 .../gemfire/internal/util/BlobHelper.java       |   4 +-
 .../gemfire/pdx/internal/PdxInputStream.java    |   4 +-
 .../cache/ChunkValueWrapperJUnitTest.java       |   4 +-
 .../cache/OldValueImporterTestBase.java         |   6 +-
 .../offheap/ChunkWithHeapFormJUnitTest.java     |   8 +-
 .../internal/offheap/FragmentJUnitTest.java     |   2 +-
 .../internal/offheap/FreeListManagerTest.java   | 152 ++--
 .../offheap/FreeListOffHeapRegionJUnitTest.java |   2 +-
 .../internal/offheap/GemFireChunkJUnitTest.java | 180 ++---
 .../offheap/GemFireChunkSliceJUnitTest.java     |  18 +-
 .../offheap/OffHeapHelperJUnitTest.java         |   4 +-
 .../internal/offheap/OffHeapRegionBase.java     |   8 +-
 .../OffHeapRegionEntryHelperJUnitTest.java      |  48 +-
 .../offheap/OffHeapValidationJUnitTest.java     |   4 +-
 .../OffHeapWriteObjectAsByteArrayJUnitTest.java |   4 +-
 .../OldFreeListOffHeapRegionJUnitTest.java      |   2 +-
 ...moryAllocatorFillPatternIntegrationTest.java |   8 +-
 ...mpleMemoryAllocatorFillPatternJUnitTest.java |  16 +-
 .../offheap/SimpleMemoryAllocatorJUnitTest.java |  10 +-
 .../offheap/SyncChunkStackJUnitTest.java        |  20 +-
 .../OffHeapByteBufferByteSourceJUnitTest.java   |   6 +-
 .../gemfire/pdx/OffHeapByteSourceJUnitTest.java |   6 +-
 50 files changed, 1227 insertions(+), 1227 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImpl.java
index 46aace1..11d9248 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImpl.java
@@ -18,7 +18,7 @@ package com.gemstone.gemfire.cache.operations.internal;
 
 import com.gemstone.gemfire.SerializationException;
 import com.gemstone.gemfire.cache.operations.GetOperationContext;
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.Releasable;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
@@ -70,7 +70,7 @@ public class GetOperationContextImpl extends GetOperationContext implements Rele
 
   private void checkForReleasedOffHeapValue(Object v) {
     // Note that we only care about Chunk (instead of all StoredObject) because it is the only one using a refcount
-    if (this.released && v instanceof GemFireChunk) {
+    if (this.released && v instanceof ObjectChunk) {
       throw new IllegalStateException("Attempt to access off-heap value after the OperationContext callback returned.");
     }
   }
@@ -116,7 +116,7 @@ public class GetOperationContextImpl extends GetOperationContext implements Rele
     // our value (since this context did not retain it)
     // but we do make sure that any future attempt to access
     // the off-heap value fails.
-    if (super.getValue() instanceof GemFireChunk) {
+    if (super.getValue() instanceof ObjectChunk) {
       this.released = true;
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
index fe99079..aab99cb 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
@@ -75,7 +75,7 @@ import com.gemstone.gemfire.internal.cache.RegionEntry;
 import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 import com.gemstone.gemfire.pdx.PdxInstance;
@@ -1477,9 +1477,9 @@ public abstract class AbstractIndex implements IndexProtocol
         valueInIndex = verifyAndGetPdxDomainObject(value);
       } else{
         @Released Object val = re.getValueInVM(context.getPartitionedRegion());
-        GemFireChunk valToFree = null;
-        if (val instanceof GemFireChunk) {
-          valToFree = (GemFireChunk)val;
+        ObjectChunk valToFree = null;
+        if (val instanceof ObjectChunk) {
+          valToFree = (ObjectChunk)val;
         }
         try {
         if (val instanceof CachedDeserializable) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java
index 6887e9c..bde948d 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java
@@ -41,7 +41,7 @@ import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.RegionEntry;
 import com.gemstone.gemfire.internal.cache.RegionEntryContext;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 
@@ -134,8 +134,8 @@ public class DummyQRegion extends QRegion {
     }
     valueInList.clear();
     Object val = this.entry.getValueOffHeapOrDiskWithoutFaultIn((LocalRegion) getRegion());
-    if (val instanceof GemFireChunk) {
-      @Retained @Released GemFireChunk ohval = (GemFireChunk) val;
+    if (val instanceof ObjectChunk) {
+      @Retained @Released ObjectChunk ohval = (ObjectChunk) val;
       try {
         // TODO OFFHEAP: val may be off-heap PdxInstance
         val = ohval.getDeserializedValue(getRegion(), this.entry);
@@ -155,8 +155,8 @@ public class DummyQRegion extends QRegion {
       valueInArray = new  Object[1];      
     }   
     Object val = this.entry.getValueOffHeapOrDiskWithoutFaultIn((LocalRegion) getRegion());
-    if (val instanceof GemFireChunk) {      
-      @Retained @Released GemFireChunk ohval = (GemFireChunk) val;
+    if (val instanceof ObjectChunk) {      
+      @Retained @Released ObjectChunk ohval = (ObjectChunk) val;
       try {
         // TODO OFFHEAP: val may be off-heap PdxInstance
         val = ohval.getDeserializedValue(getRegion(), this.entry);
@@ -178,8 +178,8 @@ public class DummyQRegion extends QRegion {
     }
     values.clear();
     Object val = this.entry.getValueOffHeapOrDiskWithoutFaultIn((LocalRegion) getRegion());
-    if (val instanceof GemFireChunk) {
-      @Retained @Released GemFireChunk ohval = (GemFireChunk) val;
+    if (val instanceof ObjectChunk) {
+      @Retained @Released ObjectChunk ohval = (ObjectChunk) val;
       try {
         // TODO OFFHEAP: val may be off-heap PdxInstance
         val = ohval.getDeserializedValue(getRegion(), this.entry);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
index 1e0e8c4..a30a264 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
@@ -79,7 +79,7 @@ import com.gemstone.gemfire.internal.cache.Token;
 import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 import com.gemstone.gemfire.pdx.internal.PdxString;
@@ -876,8 +876,8 @@ public class HashIndex extends AbstractIndex {
     if (this.indexOnValues) {
       Object o = entry.getValueOffHeapOrDiskWithoutFaultIn((LocalRegion) getRegion());
       try {
-        if (o instanceof GemFireChunk) {
-          GemFireChunk ohval = (GemFireChunk) o;
+        if (o instanceof ObjectChunk) {
+          ObjectChunk ohval = (ObjectChunk) o;
           try {
             o = ohval.getDeserializedForReading();
           } finally {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
index 1e65e2f..8910df3 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
@@ -61,9 +61,9 @@ import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.ChunkWithHeapForm;
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.MemoryAllocator;
 import com.gemstone.gemfire.internal.offheap.OffHeapCachedDeserializable;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
@@ -1311,9 +1311,9 @@ public abstract class AbstractRegionEntry implements RegionEntry,
           }
           return prepareValueForCache(r, heapValue, event, isEntryUpdate);
         }
-        if (val instanceof GemFireChunk) {
+        if (val instanceof ObjectChunk) {
           // if the reused guy has a refcount then need to inc it
-          if (!((GemFireChunk)val).retain()) {
+          if (!((ObjectChunk)val).retain()) {
             throw new IllegalStateException("Could not use an off heap value because it was freed");
           }
         }
@@ -1348,8 +1348,8 @@ public abstract class AbstractRegionEntry implements RegionEntry,
         MemoryAllocator ma = SimpleMemoryAllocatorImpl.getAllocator(); // fix for bug 47875
         val = ma.allocateAndInitialize(compressedData, isSerialized, isCompressed); // TODO:KIRK:48068 race happens right after this line
         ReferenceCountHelper.setReferenceCountOwner(null);
-        if (val instanceof GemFireChunk) {
-          val = new com.gemstone.gemfire.internal.offheap.ChunkWithHeapForm((GemFireChunk)val, data);
+        if (val instanceof ObjectChunk) {
+          val = new com.gemstone.gemfire.internal.offheap.ChunkWithHeapForm((ObjectChunk)val, data);
         }
 //        if (val instanceof Chunk && r instanceof LocalRegion) {
 //          Chunk c = (Chunk) val;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
index bbd340e..699de2f 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
@@ -75,7 +75,7 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
 import com.gemstone.gemfire.internal.offheap.OffHeapRegionEntryHelper;
 import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
@@ -955,7 +955,7 @@ public abstract class AbstractRegionMap implements RegionMap {
                   ((ListOfDeltas)oldValue).apply(event);
                   Object preparedNewValue =oldRe.prepareValueForCache(owner,
                       event.getNewValueAsOffHeapDeserializedOrRaw(), true);
-                  if(preparedNewValue instanceof GemFireChunk) {
+                  if(preparedNewValue instanceof ObjectChunk) {
                     event.setNewValue(preparedNewValue);
                   }
                   oldRe.setValue(owner, preparedNewValue, event);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/BytesAndBitsForCompactor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/BytesAndBitsForCompactor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/BytesAndBitsForCompactor.java
index ef93240..cc358f5 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/BytesAndBitsForCompactor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/BytesAndBitsForCompactor.java
@@ -16,7 +16,7 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
 
 /**
@@ -36,7 +36,7 @@ public class BytesAndBitsForCompactor {
    * The dataChunk field is unretained so it can only be used while the RegionEntry is still synced.
    * When done with the dataChunk, null it out if you want to reuse the byte[] later.
    */
-  private @Unretained GemFireChunk dataChunk;
+  private @Unretained ObjectChunk dataChunk;
   private  byte[] data;
   private  byte userBits=0;
   // length of the data present in the byte array 
@@ -56,7 +56,7 @@ public class BytesAndBitsForCompactor {
   }
 
   
-  public final GemFireChunk getDataChunk() {
+  public final ObjectChunk getDataChunk() {
     return this.dataChunk;
   }
   public final byte[] getBytes() {
@@ -87,7 +87,7 @@ public class BytesAndBitsForCompactor {
     this.validLength = validLength;    
     this.isReusable = isReusable;
   }
-  public void setChunkData(GemFireChunk c, byte userBits) {
+  public void setChunkData(ObjectChunk c, byte userBits) {
     this.dataChunk = c;
     this.userBits = userBits;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
index 68ff77c..327279b 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
@@ -40,7 +40,7 @@ import com.gemstone.gemfire.internal.cache.versions.VersionStamp;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
 import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
 import com.gemstone.gemfire.internal.offheap.Releasable;
@@ -208,8 +208,8 @@ public interface DiskEntry extends RegionEntry {
     static Object getValueOnDiskOrBuffer(DiskEntry entry, DiskRegion dr, RegionEntryContext context) {
       @Released Object v = getOffHeapValueOnDiskOrBuffer(entry, dr, context);
       if (v instanceof CachedDeserializable) {
-        if (v instanceof GemFireChunk) {
-          @Released GemFireChunk ohv = (GemFireChunk) v;
+        if (v instanceof ObjectChunk) {
+          @Released ObjectChunk ohv = (ObjectChunk) v;
           try {
             v = ohv.getDeserializedValue(null, null);
             if (v == ohv) {
@@ -688,8 +688,8 @@ public interface DiskEntry extends RegionEntry {
      * Note that this class is only used with uncompressed chunks.
      */
     public static class ChunkValueWrapper implements ValueWrapper {
-      private final @Unretained GemFireChunk chunk;
-      public ChunkValueWrapper(GemFireChunk c) {
+      private final @Unretained ObjectChunk chunk;
+      public ChunkValueWrapper(ObjectChunk c) {
         assert !c.isCompressed();
         this.chunk = c;
       }
@@ -722,7 +722,7 @@ public interface DiskEntry extends RegionEntry {
             return;
           }
         }
-        final long bbAddress = GemFireChunk.getDirectByteBufferAddress(bb);
+        final long bbAddress = ObjectChunk.getDirectByteBufferAddress(bb);
         if (bbAddress != 0L) {
           int bytesRemaining = maxOffset;
           int availableSpace = bb.remaining();
@@ -782,8 +782,8 @@ public interface DiskEntry extends RegionEntry {
         byte[] bytes;
         if (value instanceof CachedDeserializable) {
           CachedDeserializable proxy = (CachedDeserializable)value;
-          if (proxy instanceof GemFireChunk) {
-            return new ChunkValueWrapper((GemFireChunk) proxy);
+          if (proxy instanceof ObjectChunk) {
+            return new ChunkValueWrapper((ObjectChunk) proxy);
           }
           if (proxy instanceof StoredObject) {
             StoredObject ohproxy = (StoredObject) proxy;
@@ -833,8 +833,8 @@ public interface DiskEntry extends RegionEntry {
           // We don't do this for the delta case because getRawNewValue returns delta
           // and we want to write the entire new value to disk.
           rawValue = event.getRawNewValue();
-          if (rawValue instanceof GemFireChunk) {
-            return new ChunkValueWrapper((GemFireChunk) rawValue);
+          if (rawValue instanceof ObjectChunk) {
+            return new ChunkValueWrapper((ObjectChunk) rawValue);
           }
         }
         if (event.getCachedSerializedNewValue() != null) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
index d63dd90..0d20511 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
@@ -121,7 +121,7 @@ import com.gemstone.gemfire.internal.cache.wan.parallel.ConcurrentParallelGatewa
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
@@ -2541,8 +2541,8 @@ public class DistributedRegion extends LocalRegion implements
     }
     //For SQLFire , we need to increment the use count so that returned
     //object has use count 2
-    if( incrementUseCountForSqlf && result instanceof GemFireChunk) {
-      ((GemFireChunk)result).retain();
+    if( incrementUseCountForSqlf && result instanceof ObjectChunk) {
+      ((ObjectChunk)result).retain();
     }
     return result;
     } finally {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
index 8198349..c8c05cf 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
@@ -73,7 +73,7 @@ import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
 import com.gemstone.gemfire.internal.offheap.OffHeapRegionEntryHelper;
 import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
@@ -930,9 +930,9 @@ public class EntryEventImpl
     if (this.offHeapOk) {
       OffHeapHelper.releaseAndTrackOwner(this.newValue, this);
     }
-    if (v instanceof GemFireChunk) {
+    if (v instanceof ObjectChunk) {
       ReferenceCountHelper.setReferenceCountOwner(this);
-      if (!((GemFireChunk) v).retain()) {
+      if (!((ObjectChunk) v).retain()) {
         ReferenceCountHelper.setReferenceCountOwner(null);
         this.newValue = null;
         return;
@@ -946,13 +946,13 @@ public class EntryEventImpl
    * Returns true if this event has a reference to an off-heap new or old value.
    */
   public boolean hasOffHeapValue() {
-    return (this.newValue instanceof GemFireChunk) || (this.oldValue instanceof GemFireChunk);
+    return (this.newValue instanceof ObjectChunk) || (this.oldValue instanceof ObjectChunk);
   }
   
   @Unretained
   protected final Object basicGetNewValue() {
     Object result = this.newValue;
-    if (!this.offHeapOk && result instanceof GemFireChunk) {
+    if (!this.offHeapOk && result instanceof ObjectChunk) {
       //this.region.getCache().getLogger().info("DEBUG new value already freed " + System.identityHashCode(result));
       throw new IllegalStateException("Attempt to access off heap value after the EntryEvent was released.");
     }
@@ -992,7 +992,7 @@ public class EntryEventImpl
     @Released final Object curOldValue = this.oldValue;
     if (v == curOldValue) return;
     if (this.offHeapOk) {
-      if (curOldValue instanceof GemFireChunk) {
+      if (curOldValue instanceof ObjectChunk) {
         if (ReferenceCountHelper.trackReferenceCounts()) {
           OffHeapHelper.releaseAndTrackOwner(curOldValue, new OldValueOwner());
         } else {
@@ -1008,17 +1008,17 @@ public class EntryEventImpl
   private void retainAndSetOldValue(@Retained(ENTRY_EVENT_OLD_VALUE) Object v) {
     if (v == this.oldValue) return;
     
-    if (v instanceof GemFireChunk) {
+    if (v instanceof ObjectChunk) {
       if (ReferenceCountHelper.trackReferenceCounts()) {
         ReferenceCountHelper.setReferenceCountOwner(new OldValueOwner());
-        boolean couldNotRetain = (!((GemFireChunk) v).retain());
+        boolean couldNotRetain = (!((ObjectChunk) v).retain());
         ReferenceCountHelper.setReferenceCountOwner(null);
         if (couldNotRetain) {
           this.oldValue = null;
           return;
         }
       } else {
-        if (!((GemFireChunk) v).retain()) {
+        if (!((ObjectChunk) v).retain()) {
           this.oldValue = null;
           return;
         }
@@ -1031,7 +1031,7 @@ public class EntryEventImpl
   private Object basicGetOldValue() {
     @Unretained(ENTRY_EVENT_OLD_VALUE)
     Object result = this.oldValue;
-    if (!this.offHeapOk && result instanceof GemFireChunk) {
+    if (!this.offHeapOk && result instanceof ObjectChunk) {
       //this.region.getCache().getLogger().info("DEBUG old value already freed " + System.identityHashCode(result));
       throw new IllegalStateException("Attempt to access off heap value after the EntryEvent was released.");
     }
@@ -1360,7 +1360,7 @@ public class EntryEventImpl
       @Unretained(ENTRY_EVENT_NEW_VALUE)
       final StoredObject so = (StoredObject) nv;
       final boolean isSerialized = so.isSerialized();
-      if (nv instanceof GemFireChunk) {
+      if (nv instanceof ObjectChunk) {
         if (importer.isUnretainedNewReferenceOk()) {
           importer.importNewObject(nv, isSerialized);
         } else {
@@ -1447,7 +1447,7 @@ public class EntryEventImpl
     if (ov instanceof StoredObject) {
       final StoredObject so = (StoredObject) ov;
       final boolean isSerialized = so.isSerialized();
-      if (ov instanceof GemFireChunk) {
+      if (ov instanceof ObjectChunk) {
         if (importer.isUnretainedOldReferenceOk()) {
           importer.importOldObject(ov, isSerialized);
         } else {
@@ -1869,8 +1869,8 @@ public class EntryEventImpl
     Object preparedV = reentry.prepareValueForCache(this.region, v, this, this.hasDelta());
     if (preparedV != v) {
       v = preparedV;
-      if (v instanceof GemFireChunk) {
-        if (!((GemFireChunk) v).isCompressed()) { // fix bug 52109
+      if (v instanceof ObjectChunk) {
+        if (!((ObjectChunk) v).isCompressed()) { // fix bug 52109
           // If we put it off heap and it is not compressed then remember that value.
           // Otherwise we want to remember the decompressed value in the event.
           basicSetNewValue(v);
@@ -1931,8 +1931,8 @@ public class EntryEventImpl
       success = true;
     }
     } finally {
-      if (!success && reentry instanceof OffHeapRegionEntry && v instanceof GemFireChunk) {
-        OffHeapRegionEntryHelper.releaseEntry((OffHeapRegionEntry)reentry, (GemFireChunk)v);
+      if (!success && reentry instanceof OffHeapRegionEntry && v instanceof ObjectChunk) {
+        OffHeapRegionEntryHelper.releaseEntry((OffHeapRegionEntry)reentry, (ObjectChunk)v);
       }      
     }
     if (logger.isTraceEnabled()) {
@@ -2232,7 +2232,7 @@ public class EntryEventImpl
    * If a PdxInstance is returned then it will have an unretained reference
    * to Chunk's off-heap address.
    */
-  public static @Unretained Object deserializeChunk(GemFireChunk bytes) {
+  public static @Unretained Object deserializeChunk(ObjectChunk bytes) {
     if (bytes == null)
       return null;
     try {
@@ -2874,7 +2874,7 @@ public class EntryEventImpl
     private final byte[] serializedValue;
     
     SerializedCacheValueImpl(EntryEventImpl event, Region r, RegionEntry re, @Unretained CachedDeserializable cd, byte[] serializedBytes) {
-      if (cd instanceof GemFireChunk) {
+      if (cd instanceof ObjectChunk) {
         this.event = event;
       } else {
         this.event = null;
@@ -3053,14 +3053,14 @@ public class EntryEventImpl
     Object nv = basicGetNewValue();
     this.offHeapOk = false;
     
-    if (ov instanceof GemFireChunk) {
+    if (ov instanceof ObjectChunk) {
       //this.region.getCache().getLogger().info("DEBUG freeing ref to old value on " + System.identityHashCode(ov));
       if (ReferenceCountHelper.trackReferenceCounts()) {
         ReferenceCountHelper.setReferenceCountOwner(new OldValueOwner());
-        ((GemFireChunk) ov).release();
+        ((ObjectChunk) ov).release();
         ReferenceCountHelper.setReferenceCountOwner(null);
       } else {
-        ((GemFireChunk) ov).release();
+        ((ObjectChunk) ov).release();
       }
     }
     OffHeapHelper.releaseAndTrackOwner(nv, this);
@@ -3071,7 +3071,7 @@ public class EntryEventImpl
    * Once this is called on an event it does not need to have release called.
    */
   public void disallowOffHeapValues() {
-    if (this.newValue instanceof GemFireChunk || this.oldValue instanceof GemFireChunk) {
+    if (this.newValue instanceof ObjectChunk || this.oldValue instanceof ObjectChunk) {
       throw new IllegalStateException("This event does not support off-heap values");
     }
     this.offHeapOk = false;
@@ -3085,7 +3085,7 @@ public class EntryEventImpl
   @Released({ENTRY_EVENT_NEW_VALUE, ENTRY_EVENT_OLD_VALUE})
   public void copyOffHeapToHeap() {
     Object ov = basicGetOldValue();
-    if (ov instanceof GemFireChunk) {
+    if (ov instanceof ObjectChunk) {
       if (ReferenceCountHelper.trackReferenceCounts()) {
         ReferenceCountHelper.setReferenceCountOwner(new OldValueOwner());
         this.oldValue = OffHeapHelper.copyAndReleaseIfNeeded(ov);
@@ -3095,19 +3095,19 @@ public class EntryEventImpl
       }
     }
     Object nv = basicGetNewValue();
-    if (nv instanceof GemFireChunk) {
+    if (nv instanceof ObjectChunk) {
       ReferenceCountHelper.setReferenceCountOwner(this);
       this.newValue = OffHeapHelper.copyAndReleaseIfNeeded(nv);
       ReferenceCountHelper.setReferenceCountOwner(null);
     }
-    if (this.newValue instanceof GemFireChunk || this.oldValue instanceof GemFireChunk) {
+    if (this.newValue instanceof ObjectChunk || this.oldValue instanceof ObjectChunk) {
       throw new IllegalStateException("event's old/new value still off-heap after calling copyOffHeapToHeap");
     }
     this.offHeapOk = false;
   }
 
   public boolean isOldValueOffHeap() {
-    return this.oldValue instanceof GemFireChunk;
+    return this.oldValue instanceof ObjectChunk;
   }
   public final boolean isFetchFromHDFS() {
     return fetchFromHDFS;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
index b367072..b6d8c49 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
@@ -203,7 +203,7 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
 import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
@@ -1587,8 +1587,8 @@ public class LocalRegion extends AbstractRegion
           }
           //For sqlf since the deserialized value is nothing but chunk
           // before returning the found value increase its use count
-          if(GemFireCacheImpl.sqlfSystem() && result instanceof GemFireChunk) {
-            if(!((GemFireChunk)result).retain()) {
+          if(GemFireCacheImpl.sqlfSystem() && result instanceof ObjectChunk) {
+            if(!((ObjectChunk)result).retain()) {
               return null;
             }
           }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
index 1218f20..541c453 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
@@ -252,7 +252,7 @@ import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
 import com.gemstone.gemfire.internal.sequencelog.RegionLogger;
 import com.gemstone.gemfire.internal.util.TransformUtils;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Part.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Part.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Part.java
index c401f3d..4968610 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Part.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Part.java
@@ -18,7 +18,7 @@ package com.gemstone.gemfire.internal.cache.tier.sockets;
 
 import com.gemstone.gemfire.internal.*;
 import com.gemstone.gemfire.internal.cache.CachedDeserializable;
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.DataAsAddress;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.UnsafeMemoryChunk;
@@ -136,7 +136,7 @@ public class Part {
     if (so instanceof DataAsAddress) {
       this.part = ((DataAsAddress)so).getRawBytes();
     } else {
-      this.part = (GemFireChunk)so;
+      this.part = (ObjectChunk)so;
     }
   }
   public byte getTypeCode() {
@@ -151,8 +151,8 @@ public class Part {
       return 0;
     } else if (this.part instanceof byte[]) {
       return ((byte[])this.part).length;
-    } else if (this.part instanceof GemFireChunk) {
-      return ((GemFireChunk) this.part).getValueSizeInBytes();
+    } else if (this.part instanceof ObjectChunk) {
+      return ((ObjectChunk) this.part).getValueSizeInBytes();
     } else {
       return ((HeapDataOutputStream)this.part).size();
     }
@@ -294,8 +294,8 @@ public class Part {
       if (this.part instanceof byte[]) {
         byte[] bytes = (byte[])this.part;
         out.write(bytes, 0, bytes.length);
-      } else if (this.part instanceof GemFireChunk) {
-        GemFireChunk c = (GemFireChunk) this.part;
+      } else if (this.part instanceof ObjectChunk) {
+        ObjectChunk c = (ObjectChunk) this.part;
         ByteBuffer cbb = c.createDirectByteBuffer();
         if (cbb != null) {
           HeapDataOutputStream.writeByteBufferToStream(out,  buf, cbb);
@@ -327,8 +327,8 @@ public class Part {
     if (getLength() > 0) {
       if (this.part instanceof byte[]) {
         buf.put((byte[])this.part);
-      } else if (this.part instanceof GemFireChunk) {
-        GemFireChunk c = (GemFireChunk) this.part;
+      } else if (this.part instanceof ObjectChunk) {
+        ObjectChunk c = (ObjectChunk) this.part;
         ByteBuffer bb = c.createDirectByteBuffer();
         if (bb != null) {
           buf.put(bb);
@@ -377,10 +377,10 @@ public class Part {
           }
           buf.clear();
         }
-      } else if (this.part instanceof GemFireChunk) {
+      } else if (this.part instanceof ObjectChunk) {
         // instead of copying the Chunk to buf try to create a direct ByteBuffer and
         // just write it directly to the socket channel.
-        GemFireChunk c = (GemFireChunk) this.part;
+        ObjectChunk c = (ObjectChunk) this.part;
         ByteBuffer bb = c.createDirectByteBuffer();
         if (bb != null) {
           while (bb.remaining() > 0) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
index cff3a6e..1ec6b51 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
@@ -50,7 +50,7 @@ import com.gemstone.gemfire.internal.cache.WrappedCallbackArgument;
 import com.gemstone.gemfire.internal.cache.lru.Sizeable;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerHelper;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.offheap.GemFireChunk;
+import com.gemstone.gemfire.internal.offheap.ObjectChunk;
 import com.gemstone.gemfire.internal.offheap.ChunkWithHeapForm;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
 import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
@@ -549,11 +549,11 @@ public class GatewaySenderEventImpl implements
     Object result = this.value;
     if (result == null) {
       result = this.valueObj;
-      if (result instanceof GemFireChunk) {
+      if (result instanceof ObjectChunk) {
         if (this.valueObjReleased) {
           result = null;
         } else {
-          GemFireChunk ohref = (GemFireChunk) result;
+          ObjectChunk ohref = (ObjectChunk) result;
           if (!ohref.retain()) {
             result = null;
           } else if (this.valueObjReleased) {
@@ -1260,7 +1260,7 @@ public class GatewaySenderEventImpl implements
           return this;
         }
       }
-      if (v instanceof GemFireChunk) {
+      if (v instanceof ObjectChunk) {
         try {
           return makeCopy();
         } catch (IllegalStateException ex) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkWithHeapForm.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkWithHeapForm.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkWithHeapForm.java
index d889610..1b2734f 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkWithHeapForm.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkWithHeapForm.java
@@ -21,10 +21,10 @@ package com.gemstone.gemfire.internal.offheap;
  * This allows the operation to access the serialized heap form instead of copying
  * it from offheap. See bug 48135.
  */
-public class ChunkWithHeapForm extends GemFireChunk {
+public class ChunkWithHeapForm extends ObjectChunk {
   private final byte[] heapForm;
   
-  public ChunkWithHeapForm(GemFireChunk chunk, byte[] heapForm) {
+  public ChunkWithHeapForm(ObjectChunk chunk, byte[] heapForm) {
     super(chunk);
     this.heapForm = heapForm;
   }
@@ -34,7 +34,7 @@ public class ChunkWithHeapForm extends GemFireChunk {
     return this.heapForm;
   }
   
-  public GemFireChunk getChunkWithoutHeapForm() {
-    return new GemFireChunk(this);
+  public ObjectChunk getChunkWithoutHeapForm() {
+    return new ObjectChunk(this);
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
index 186a4e4..d337cfc 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
@@ -30,7 +30,7 @@ import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
  *
  */
 public class Fragment implements MemoryBlock {
-  private static final byte FILL_BYTE = GemFireChunk.FILL_BYTE;
+  private static final byte FILL_BYTE = ObjectChunk.FILL_BYTE;
   private final long baseAddr;
   private final int size;
   @SuppressWarnings("unused")

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1a82c80c/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
index 3fbf526..a716f14 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
@@ -45,30 +45,30 @@ public class FreeListManager {
   
   final private AtomicReferenceArray<SyncChunkStack> tinyFreeLists = new AtomicReferenceArray<SyncChunkStack>(TINY_FREE_LIST_COUNT);
   // hugeChunkSet is sorted by chunk size in ascending order. It will only contain chunks larger than MAX_TINY.
-  private final ConcurrentSkipListSet<GemFireChunk> hugeChunkSet = new ConcurrentSkipListSet<GemFireChunk>();
+  private final ConcurrentSkipListSet<ObjectChunk> hugeChunkSet = new ConcurrentSkipListSet<ObjectChunk>();
   private final AtomicLong allocatedSize = new AtomicLong(0L);
 
   private int getNearestTinyMultiple(int size) {
     return (size-1)/TINY_MULTIPLE;
   }
-  List<GemFireChunk> getLiveChunks() {
-    ArrayList<GemFireChunk> result = new ArrayList<GemFireChunk>();
+  List<ObjectChunk> getLiveChunks() {
+    ArrayList<ObjectChunk> result = new ArrayList<ObjectChunk>();
     for (int i=0; i < slabs.length; i++) {
       getLiveChunks(slabs[i], result);
     }
     return result;
   }
-  private void getLiveChunks(AddressableMemoryChunk slab, List<GemFireChunk> result) {
+  private void getLiveChunks(AddressableMemoryChunk slab, List<ObjectChunk> result) {
     long addr = slab.getMemoryAddress();
-    while (addr <= (slab.getMemoryAddress() + slab.getSize() - GemFireChunk.MIN_CHUNK_SIZE)) {
+    while (addr <= (slab.getMemoryAddress() + slab.getSize() - ObjectChunk.MIN_CHUNK_SIZE)) {
       Fragment f = isAddrInFragmentFreeSpace(addr);
       if (f != null) {
         addr = f.getMemoryAddress() + f.getSize();
       } else {
-        int curChunkSize = GemFireChunk.getSize(addr);
-        int refCount = GemFireChunk.getRefCount(addr);
+        int curChunkSize = ObjectChunk.getSize(addr);
+        int refCount = ObjectChunk.getRefCount(addr);
         if (refCount > 0) {
-          result.add(new GemFireChunk(addr));
+          result.add(new ObjectChunk(addr));
         }
         addr += curChunkSize;
       }
@@ -95,7 +95,7 @@ public class FreeListManager {
     long result = 0;
     for (Fragment f: this.fragmentList) {
       int freeSpace = f.freeSpace();
-      if (freeSpace >= GemFireChunk.MIN_CHUNK_SIZE) {
+      if (freeSpace >= ObjectChunk.MIN_CHUNK_SIZE) {
         result += freeSpace;
       }
     }
@@ -113,7 +113,7 @@ public class FreeListManager {
   }
   long getFreeHugeMemory() {
     long hugeFree = 0;
-    for (GemFireChunk c: this.hugeChunkSet) {
+    for (ObjectChunk c: this.hugeChunkSet) {
       hugeFree += c.getSize();
     }
     return hugeFree;
@@ -178,10 +178,10 @@ public class FreeListManager {
    * @throws IllegalStateException if a chunk can not be allocated.
    */
   @SuppressWarnings("synthetic-access")
-  public GemFireChunk allocate(int size) {
+  public ObjectChunk allocate(int size) {
     assert size > 0;
     
-    GemFireChunk result = basicAllocate(size, true);
+    ObjectChunk result = basicAllocate(size, true);
 
     result.setDataSize(size);
     this.allocatedSize.addAndGet(result.getSize());
@@ -190,13 +190,13 @@ public class FreeListManager {
     return result;
   }
 
-  private GemFireChunk basicAllocate(int size, boolean useSlabs) {
+  private ObjectChunk basicAllocate(int size, boolean useSlabs) {
     if (useSlabs) {
       // Every object stored off heap has a header so we need
       // to adjust the size so that the header gets allocated.
       // If useSlabs is false then the incoming size has already
       // been adjusted.
-      size += GemFireChunk.OFF_HEAP_HEADER_SIZE;
+      size += ObjectChunk.OFF_HEAP_HEADER_SIZE;
     }
     if (size <= MAX_TINY) {
       return allocateTiny(size, useSlabs);
@@ -205,17 +205,17 @@ public class FreeListManager {
     }
   }
 
-  private GemFireChunk allocateFromFragments(int chunkSize) {
+  private ObjectChunk allocateFromFragments(int chunkSize) {
     do {
       final int lastAllocationId = this.lastFragmentAllocation.get();
       for (int i=lastAllocationId; i < this.fragmentList.size(); i++) {
-        GemFireChunk result = allocateFromFragment(i, chunkSize);
+        ObjectChunk result = allocateFromFragment(i, chunkSize);
         if (result != null) {
           return result;
         }
       }
       for (int i=0; i < lastAllocationId; i++) {
-        GemFireChunk result = allocateFromFragment(i, chunkSize);
+        ObjectChunk result = allocateFromFragment(i, chunkSize);
         if (result != null) {
           return result;
         }
@@ -247,7 +247,7 @@ public class FreeListManager {
   }
 
   private void logHugeState(LogWriter lw) {
-    for (GemFireChunk c: this.hugeChunkSet) {
+    for (ObjectChunk c: this.hugeChunkSet) {
       lw.info("Free huge of size " + c.getSize());
     }
   }
@@ -345,10 +345,10 @@ public class FreeListManager {
               } else {
                 // see if we can conflate into sorted[idx]
                 long lowAddr = sorted[idx-1];
-                int lowSize = GemFireChunk.getSize(lowAddr);
+                int lowSize = ObjectChunk.getSize(lowAddr);
                 if (lowAddr + lowSize == addr) {
                   // append the addr chunk to lowAddr
-                  GemFireChunk.setSize(lowAddr, lowSize + GemFireChunk.getSize(addr));
+                  ObjectChunk.setSize(lowAddr, lowSize + ObjectChunk.getSize(addr));
                 } else {
                   if (sortedSize >= sorted.length) {
                     long[] newSorted = new long[sorted.length+SORT_ARRAY_BLOCK_SIZE];
@@ -360,11 +360,11 @@ public class FreeListManager {
                 }
               }
             } else {
-              int addrSize = GemFireChunk.getSize(addr);
+              int addrSize = ObjectChunk.getSize(addr);
               long highAddr = sorted[idx];
               if (addr + addrSize == highAddr) {
                 // append highAddr chunk to addr
-                GemFireChunk.setSize(addr, addrSize + GemFireChunk.getSize(highAddr));
+                ObjectChunk.setSize(addr, addrSize + ObjectChunk.getSize(highAddr));
                 sorted[idx] = addr;
               } else {
                 boolean insert = idx==0;
@@ -374,10 +374,10 @@ public class FreeListManager {
                   //                    long[] tmp = Arrays.copyOf(sorted, sortedSize);
                   //                    throw new IllegalStateException("addr was zero at idx=" + (idx-1) + " sorted="+ Arrays.toString(tmp));
                   //                  }
-                  int lowSize = GemFireChunk.getSize(lowAddr);
+                  int lowSize = ObjectChunk.getSize(lowAddr);
                   if (lowAddr + lowSize == addr) {
                     // append the addr chunk to lowAddr
-                    GemFireChunk.setSize(lowAddr, lowSize + addrSize);
+                    ObjectChunk.setSize(lowAddr, lowSize + addrSize);
                   } else {
                     insert = true;
                   }
@@ -403,10 +403,10 @@ public class FreeListManager {
         for (int i=sortedSize-1; i > 0; i--) {
           long addr = sorted[i];
           long lowAddr = sorted[i-1];
-          int lowSize = GemFireChunk.getSize(lowAddr);
+          int lowSize = ObjectChunk.getSize(lowAddr);
           if (lowAddr + lowSize == addr) {
             // append addr chunk to lowAddr
-            GemFireChunk.setSize(lowAddr, lowSize + GemFireChunk.getSize(addr));
+            ObjectChunk.setSize(lowAddr, lowSize + ObjectChunk.getSize(addr));
             sorted[i] = 0L;
           }
         }
@@ -415,7 +415,7 @@ public class FreeListManager {
         for (int i=sortedSize-1; i >= 0; i--) {
           long addr = sorted[i];
           if (addr == 0L) continue;
-          int addrSize = GemFireChunk.getSize(addr);
+          int addrSize = ObjectChunk.getSize(addr);
           Fragment f = createFragment(addr, addrSize);
           if (addrSize >= chunkSize) {
             result = true;
@@ -508,8 +508,8 @@ public class FreeListManager {
       do {
         offset = f.getFreeIndex();
         diff = f.getSize() - offset;
-      } while (diff >= GemFireChunk.MIN_CHUNK_SIZE && !f.allocate(offset, offset+diff));
-      if (diff < GemFireChunk.MIN_CHUNK_SIZE) {
+      } while (diff >= ObjectChunk.MIN_CHUNK_SIZE && !f.allocate(offset, offset+diff));
+      if (diff < ObjectChunk.MIN_CHUNK_SIZE) {
         // If diff > 0 then that memory will be lost during compaction.
         // This should never happen since we keep the sizes rounded
         // based on MIN_CHUNK_SIZE.
@@ -518,7 +518,7 @@ public class FreeListManager {
         continue;
       }
       long chunkAddr = f.getMemoryAddress()+offset;
-      GemFireChunk.setSize(chunkAddr, diff);
+      ObjectChunk.setSize(chunkAddr, diff);
       result.offer(chunkAddr);
     }
     // All the fragments have been turned in to chunks so now clear them
@@ -540,7 +540,7 @@ public class FreeListManager {
     }
   }
   private void collectFreeHugeChunks(List<SyncChunkStack> l) {
-    GemFireChunk c = this.hugeChunkSet.pollFirst();
+    ObjectChunk c = this.hugeChunkSet.pollFirst();
     SyncChunkStack result = null;
     while (c != null) {
       if (result == null) {
@@ -552,7 +552,7 @@ public class FreeListManager {
     }
   }
 
-  GemFireChunk allocateFromFragment(final int fragIdx, final int chunkSize) {
+  ObjectChunk allocateFromFragment(final int fragIdx, final int chunkSize) {
     if (fragIdx >= this.fragmentList.size()) return null;
     final Fragment fragment;
     try {
@@ -571,7 +571,7 @@ public class FreeListManager {
         // this fragment has room
         int newOffset = oldOffset + chunkSize;
         int extraSize = fragmentSize - newOffset;
-        if (extraSize < GemFireChunk.MIN_CHUNK_SIZE) {
+        if (extraSize < ObjectChunk.MIN_CHUNK_SIZE) {
           // include these last few bytes of the fragment in the allocation.
           // If we don't then they will be lost forever.
           // The extraSize bytes only apply to the first chunk we allocate (not the batch ones).
@@ -582,11 +582,11 @@ public class FreeListManager {
         if (fragment.allocate(oldOffset, newOffset)) {
           // We did the allocate!
           this.lastFragmentAllocation.set(fragIdx);
-          GemFireChunk result = new GemFireChunk(fragment.getMemoryAddress()+oldOffset, chunkSize+extraSize);
+          ObjectChunk result = new ObjectChunk(fragment.getMemoryAddress()+oldOffset, chunkSize+extraSize);
           checkDataIntegrity(result);
           return result;
         } else {
-          GemFireChunk result = basicAllocate(chunkSize, false);
+          ObjectChunk result = basicAllocate(chunkSize, false);
           if (result != null) {
             return result;
           }
@@ -600,15 +600,15 @@ public class FreeListManager {
   private int round(int multiple, int value) {
     return (int) ((((long)value + (multiple-1)) / multiple) * multiple);
   }
-  private GemFireChunk allocateTiny(int size, boolean useFragments) {
+  private ObjectChunk allocateTiny(int size, boolean useFragments) {
     return basicAllocate(getNearestTinyMultiple(size), TINY_MULTIPLE, 0, this.tinyFreeLists, useFragments);
   }
-  private GemFireChunk basicAllocate(int idx, int multiple, int offset, AtomicReferenceArray<SyncChunkStack> freeLists, boolean useFragments) {
+  private ObjectChunk basicAllocate(int idx, int multiple, int offset, AtomicReferenceArray<SyncChunkStack> freeLists, boolean useFragments) {
     SyncChunkStack clq = freeLists.get(idx);
     if (clq != null) {
       long memAddr = clq.poll();
       if (memAddr != 0) {
-        GemFireChunk result = new GemFireChunk(memAddr);
+        ObjectChunk result = new ObjectChunk(memAddr);
         checkDataIntegrity(result);
         result.readyForAllocation();
         return result;
@@ -620,13 +620,13 @@ public class FreeListManager {
       return null;
     }
   }
-  private GemFireChunk allocateHuge(int size, boolean useFragments) {
+  private ObjectChunk allocateHuge(int size, boolean useFragments) {
     // sizeHolder is a fake Chunk used to search our sorted hugeChunkSet.
-    GemFireChunk sizeHolder = new FakeChunk(size);
-    NavigableSet<GemFireChunk> ts = this.hugeChunkSet.tailSet(sizeHolder);
-    GemFireChunk result = ts.pollFirst();
+    ObjectChunk sizeHolder = new FakeChunk(size);
+    NavigableSet<ObjectChunk> ts = this.hugeChunkSet.tailSet(sizeHolder);
+    ObjectChunk result = ts.pollFirst();
     if (result != null) {
-      if (result.getSize() - (HUGE_MULTIPLE - GemFireChunk.OFF_HEAP_HEADER_SIZE) < size) {
+      if (result.getSize() - (HUGE_MULTIPLE - ObjectChunk.OFF_HEAP_HEADER_SIZE) < size) {
         // close enough to the requested size; just return it.
         checkDataIntegrity(result);
         result.readyForAllocation();
@@ -644,7 +644,7 @@ public class FreeListManager {
     }
   }
   
-  private void checkDataIntegrity(GemFireChunk data) {
+  private void checkDataIntegrity(ObjectChunk data) {
     if (this.validateMemoryWithFill) {
       data.validateFill();
     }
@@ -654,7 +654,7 @@ public class FreeListManager {
    * ConcurrentSkipListSet. This is not a real chunk
    * but only used for searching.
    */
-  private static class FakeChunk extends GemFireChunk {
+  private static class FakeChunk extends ObjectChunk {
     private final int size;
     public FakeChunk(int size) {
       super();
@@ -669,14 +669,14 @@ public class FreeListManager {
   @SuppressWarnings("synthetic-access")
   public void free(long addr) {
     if (this.validateMemoryWithFill) {
-      GemFireChunk.fill(addr);
+      ObjectChunk.fill(addr);
     }
     
     free(addr, true);
   }
 
   private void free(long addr, boolean updateStats) {
-    int cSize = GemFireChunk.getSize(addr);
+    int cSize = ObjectChunk.getSize(addr);
     if (updateStats) {
       OffHeapMemoryStats stats = this.ma.getStats();
       stats.incObjects(-1);
@@ -715,7 +715,7 @@ public class FreeListManager {
   }
   
   private void freeHuge(long addr, int cSize) {
-    this.hugeChunkSet.add(new GemFireChunk(addr)); // TODO make this a collection of longs
+    this.hugeChunkSet.add(new ObjectChunk(addr)); // TODO make this a collection of longs
   }
 
   List<MemoryBlock> getOrderedBlocks() {
@@ -739,8 +739,8 @@ public class FreeListManager {
     }
   }
   
-  private void addBlocksFromChunks(Collection<GemFireChunk> src, List<MemoryBlock> dest) {
-    for (GemFireChunk chunk : src) {
+  private void addBlocksFromChunks(Collection<ObjectChunk> src, List<MemoryBlock> dest) {
+    for (ObjectChunk chunk : src) {
       dest.add(new MemoryBlockNode(this.ma, chunk));
     }
   }
@@ -759,7 +759,7 @@ public class FreeListManager {
       long addr = this.tinyFreeLists.get(i).getTopAddress();
       while (addr != 0L) {
         value.add(new MemoryBlockNode(sma, new TinyMemoryBlock(addr, i)));
-        addr = GemFireChunk.getNext(addr);
+        addr = ObjectChunk.getNext(addr);
       }
     }
     return value;
@@ -800,7 +800,7 @@ public class FreeListManager {
 
     @Override
     public int getBlockSize() {
-      return GemFireChunk.getSize(address);
+      return ObjectChunk.getSize(address);
     }
 
     @Override


Mime
View raw message