geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [10/38] incubator-geode git commit: moved getRefCount back to MemoryChunkWithRefCount
Date Sat, 05 Mar 2016 00:51:10 GMT
moved getRefCount back to MemoryChunkWithRefCount


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

Branch: refs/heads/feature/GEODE-982
Commit: 2f9694bb1a13297972b729d33a4bdeaa24f696ce
Parents: 9afb5b8
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Fri Feb 26 17:11:13 2016 -0800
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Fri Feb 26 17:11:13 2016 -0800

----------------------------------------------------------------------
 .../com/gemstone/gemfire/internal/offheap/DataAsAddress.java | 5 -----
 .../gemfire/internal/offheap/MemoryChunkWithRefCount.java    | 4 ++++
 .../com/gemstone/gemfire/internal/offheap/StoredObject.java  | 4 ----
 .../com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java  | 8 ++++----
 .../gemfire/internal/offheap/OffHeapHelperJUnitTest.java     | 2 +-
 5 files changed, 9 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2f9694bb/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataAsAddress.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataAsAddress.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataAsAddress.java
index c0797d2..96957ac 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataAsAddress.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataAsAddress.java
@@ -128,9 +128,4 @@ public class DataAsAddress extends AbstractStoredObject {
   public void release() {
     // nothing needed
   }
-
-  @Override
-  public int getRefCount() {
-    return 1;
-  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2f9694bb/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryChunkWithRefCount.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryChunkWithRefCount.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryChunkWithRefCount.java
index f532a66..e726433 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryChunkWithRefCount.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryChunkWithRefCount.java
@@ -48,4 +48,8 @@ public interface MemoryChunkWithRefCount extends StoredObject {
    */
   public void copyBytes(int src, int dst, int size);
 
+  /**
+   * Returns the number of users of this memory.
+   */
+  public int getRefCount();
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2f9694bb/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/StoredObject.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/StoredObject.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/StoredObject.java
index 17c8f6f..4d93a07 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/StoredObject.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/StoredObject.java
@@ -44,10 +44,6 @@ public interface StoredObject extends Releasable, Sendable, CachedDeserializable
    */
   @Retained
   public boolean retain();
-  /**
-   * Returns the number of users of this memory.
-   */
-  public int getRefCount();
 
   /**
    * Returns true if the value stored in this memory chunk is a serialized object. Returns
false if it is a byte array.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2f9694bb/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
b/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
index dce68cf..ce2b7c0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
@@ -110,8 +110,8 @@ import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
 import com.gemstone.gemfire.internal.cache.versions.VMRegionVersionVector;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.offheap.MemoryChunkWithRefCount;
 import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
-import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
@@ -2004,7 +2004,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
               LocalRegion reRegion;
               reRegion = (LocalRegion) region;
               RegionEntry re = reRegion.getRegionEntry(key2);
-              StoredObject so = (StoredObject) re._getValue();
+              MemoryChunkWithRefCount so = (MemoryChunkWithRefCount) re._getValue();
               assertEquals(1, so.getRefCount());
               assertEquals(1, ma.getStats().getObjects());
             }
@@ -2091,7 +2091,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
             assertEquals(2, ma.getStats().getObjects());
             LocalRegion reRegion;
             reRegion = (LocalRegion) region;
-            StoredObject so = (StoredObject) reRegion.getRegionEntry(key)._getValue();
+            MemoryChunkWithRefCount so = (MemoryChunkWithRefCount) reRegion.getRegionEntry(key)._getValue();
             assertEquals(1, so.getRefCount());
           }
         }
@@ -2157,7 +2157,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
               assertEquals(2, ma.getStats().getObjects());
               LocalRegion reRegion;
               reRegion = (LocalRegion) region;
-              StoredObject so = (StoredObject) reRegion.getRegionEntry(key)._getValue();
+              MemoryChunkWithRefCount so = (MemoryChunkWithRefCount) reRegion.getRegionEntry(key)._getValue();
               assertEquals(1, so.getRefCount());
             }
           }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2f9694bb/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
index bb8aca6..b1e3af0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
@@ -38,7 +38,7 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class OffHeapHelperJUnitTest extends AbstractStoredObjectTestBase {
 
-  private StoredObject storedObject                 = null;
+  private MemoryChunkWithRefCount storedObject                 = null;
   private Object                  deserializedRegionEntryValue = null;
   private byte[]                  serializedRegionEntryValue   = null;
   private MemoryAllocator         ma;


Mime
View raw message