geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [76/76] [abbrv] incubator-geode git commit: renamed hasReferenceCount is isOffHeapReference
Date Thu, 15 Sep 2016 21:02:33 GMT
renamed hasReferenceCount is isOffHeapReference


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

Branch: refs/heads/feature/GEODE-1886
Commit: 474eb18d1c98497d64017f7917448b17068e23e6
Parents: 89f9120
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Wed Sep 14 15:46:24 2016 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Thu Sep 15 13:56:51 2016 -0700

----------------------------------------------------------------------
 .../org/apache/geode/internal/cache/EntryEventImpl.java   | 10 +++++-----
 .../org/apache/geode/internal/offheap/StoredObject.java   |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/474eb18d/geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java
index 064a7f6..6a964c0 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java
@@ -799,7 +799,7 @@ public class EntryEventImpl
       if (this.offHeapOk) {
         OffHeapHelper.releaseAndTrackOwner(this.newValue, this);
       }
-      if (StoredObject.hasReferenceCount(v)) {
+      if (StoredObject.isOffHeapReference(v)) {
         ReferenceCountHelper.setReferenceCountOwner(this);
         if (!((StoredObject) v).retain()) {
           ReferenceCountHelper.setReferenceCountOwner(null);
@@ -824,7 +824,7 @@ public class EntryEventImpl
   }
   
   private boolean isOffHeapReference(Object ref) {
-    return mayHaveOffHeapReferences() && StoredObject.hasReferenceCount(ref);
+    return mayHaveOffHeapReferences() && StoredObject.isOffHeapReference(ref);
   }
   
   private class OldValueOwner {
@@ -2828,7 +2828,7 @@ public class EntryEventImpl
     }
     synchronized (this.offHeapLock) {
       Object ov = basicGetOldValue();
-      if (StoredObject.hasReferenceCount(ov)) {
+      if (StoredObject.isOffHeapReference(ov)) {
         if (ReferenceCountHelper.trackReferenceCounts()) {
           ReferenceCountHelper.setReferenceCountOwner(new OldValueOwner());
           this.oldValue = OffHeapHelper.copyAndReleaseIfNeeded(ov);
@@ -2838,12 +2838,12 @@ public class EntryEventImpl
         }
       }
       Object nv = basicGetNewValue();
-      if (StoredObject.hasReferenceCount(nv)) {
+      if (StoredObject.isOffHeapReference(nv)) {
         ReferenceCountHelper.setReferenceCountOwner(this);
         this.newValue = OffHeapHelper.copyAndReleaseIfNeeded(nv);
         ReferenceCountHelper.setReferenceCountOwner(null);
       }
-      if (StoredObject.hasReferenceCount(this.newValue) || StoredObject.hasReferenceCount(this.oldValue))
{
+      if (StoredObject.isOffHeapReference(this.newValue) || StoredObject.isOffHeapReference(this.oldValue))
{
         throw new IllegalStateException("event's old/new value still off-heap after calling
copyOffHeapToHeap");
       }
       this.offHeapOk = false;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/474eb18d/geode-core/src/main/java/org/apache/geode/internal/offheap/StoredObject.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/offheap/StoredObject.java
b/geode-core/src/main/java/org/apache/geode/internal/offheap/StoredObject.java
index e3fd34c..87e2ca5 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/offheap/StoredObject.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/offheap/StoredObject.java
@@ -171,9 +171,9 @@ public interface StoredObject extends Sendable, CachedDeserializable,
Releasable
   public StoredObject getStoredObjectWithoutHeapForm();
 
   /**
-   * Return true if the given "o" is a StoredObject and has a reference count.
+   * Return true if the given "o" is reference to off-heap memory.
    */
-  public static boolean hasReferenceCount(Object o) {
+  public static boolean isOffHeapReference(Object o) {
     return (o instanceof StoredObject) && ((StoredObject)o).hasRefCount();
   }
 }


Mime
View raw message