You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2016/03/05 01:51:12 UTC
[12/38] incubator-geode git commit: cleaned up ObjectStoredOffHeap
cleaned up ObjectStoredOffHeap
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/e7000592
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/e7000592
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/e7000592
Branch: refs/heads/feature/GEODE-982
Commit: e7000592dc687c322d55367cfbeebd745b100738
Parents: 723612d
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Fri Feb 26 17:19:05 2016 -0800
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Fri Feb 26 17:19:05 2016 -0800
----------------------------------------------------------------------
.../gemstone/gemfire/internal/offheap/ObjectChunk.java | 1 +
.../gemfire/internal/offheap/ObjectStoredOffHeap.java | 12 +++++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e7000592/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ObjectChunk.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ObjectChunk.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ObjectChunk.java
index 4772f41..864389a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ObjectChunk.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ObjectChunk.java
@@ -253,6 +253,7 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
setSize(this.memoryAddress, size);
}
+ @Override
public long getMemoryAddress() {
return this.memoryAddress;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e7000592/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ObjectStoredOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ObjectStoredOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ObjectStoredOffHeap.java
index b7cfaab..946418d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ObjectStoredOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ObjectStoredOffHeap.java
@@ -17,9 +17,10 @@
package com.gemstone.gemfire.internal.offheap;
/**
- * Represents a chunk of allocated memory that is not on the heap.
- * This interface provides methods that let you read and write to the chunk.
- * A reference count is used to determine if the chunk is still allocated.
+ * Represents a stored object that uses off-heap memory.
+ * This interface provides methods that let you read and write the bytes
+ * of off-heap memory used to store the bytes of the object.
+ * A reference count is used to determine if the object is still allocated.
* To increment the count call {@link #retain()}.
* To decrement the count call {@link #release()}.
*
@@ -29,6 +30,11 @@ package com.gemstone.gemfire.internal.offheap;
public interface ObjectStoredOffHeap extends StoredObject {
/**
+ * Returns the off-heap address at which the data is stored.
+ * This address can be used with AddressableMemoryManager.
+ */
+ public long getMemoryAddress();
+ /**
* Returns the size of this memory chunk in bytes.
*/
public int getSize();