geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sai_boorlaga...@apache.org
Subject [49/55] [abbrv] incubator-geode git commit: GEODE-1356: remove DataAsAddress references
Date Tue, 24 May 2016 18:54:30 GMT
GEODE-1356: remove DataAsAddress references


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

Branch: refs/heads/feature/GEODE-1153
Commit: 4d52260550c18e73382e3b337f464f290ffa4093
Parents: fc943cb
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Tue May 10 14:36:52 2016 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Wed May 11 10:27:52 2016 -0700

----------------------------------------------------------------------
 .../com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java | 2 +-
 .../gemfire/internal/offheap/OffHeapRegionEntryHelper.java       | 4 ++--
 .../internal/offheap/OffHeapRegionEntryHelperJUnitTest.java      | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d522605/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
index 46a851d..481c3be 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
@@ -1281,7 +1281,7 @@ public abstract class AbstractRegionEntry implements RegionEntry,
             throw new IllegalStateException("Could not use an off heap value because it was
freed");
           }
         }
-        // else it is DataAsAddress. This code just returns it as prepared.
+        // else it is has no refCount so just return it as prepared.
       } else {
         byte[] data;
         boolean isSerialized = !(val instanceof byte[]);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d522605/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java
index 158e6fe..8b57c43 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java
@@ -129,7 +129,7 @@ public class OffHeapRegionEntryHelper {
     }
   }
   
-  public static int getSerializedLengthFromDataAsAddress(TinyStoredObject dataAsAddress)
{
+  public static int getSerializedLength(TinyStoredObject dataAsAddress) {
     final long ohAddress = dataAsAddress.getAddress();
     
      if ((ohAddress & ENCODED_BIT) != 0) {     
@@ -307,7 +307,7 @@ public class OffHeapRegionEntryHelper {
     }
     if (decompress && isCompressed) {
       if (!compressedOk) {
-        throw new UnsupportedOperationException("Did not expect DataAsAddress to be compressed");
+        throw new UnsupportedOperationException("Did not expect encoded address to be compressed");
       }
     }
     return bytes;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d522605/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
index 2f33927..b9b3dfc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
@@ -790,7 +790,7 @@ public class OffHeapRegionEntryHelperJUnitTest {
     long address = OffHeapRegionEntryHelper.encodeDataAsAddress(data, isSerialized, isCompressed);
     TinyStoredObject daa = new TinyStoredObject(address);
 
-    int actualLength = OffHeapRegionEntryHelper.getSerializedLengthFromDataAsAddress(daa);
+    int actualLength = OffHeapRegionEntryHelper.getSerializedLength(daa);
 
     assertThat(actualLength).isEqualTo(data.length);
   }
@@ -798,7 +798,7 @@ public class OffHeapRegionEntryHelperJUnitTest {
   @Test
   public void getSerializedLengthFromDataAsAddressShouldReturnZeroForNonEncodedAddress()
{
     TinyStoredObject nonEncodedAddress = new TinyStoredObject(100000L);
-    int actualLength = OffHeapRegionEntryHelper.getSerializedLengthFromDataAsAddress(nonEncodedAddress);
+    int actualLength = OffHeapRegionEntryHelper.getSerializedLength(nonEncodedAddress);
     assertThat(actualLength).isZero();
   }
 


Mime
View raw message