You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2017/05/16 19:28:39 UTC
[07/33] geode git commit: GEODE-2929: remove superfluous uses of
final from internal classes
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinLRURegionEntryOffHeapUUIDKey.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinLRURegionEntryOffHeapUUIDKey.java b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinLRURegionEntryOffHeapUUIDKey.java
index 52e1c57..60ac459 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinLRURegionEntryOffHeapUUIDKey.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinLRURegionEntryOffHeapUUIDKey.java
@@ -15,50 +15,78 @@
package org.apache.geode.internal.cache;
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
import java.util.UUID;
+
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
+
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+
import org.apache.geode.cache.EntryEvent;
+
import org.apache.geode.internal.cache.lru.EnableLRU;
+
import org.apache.geode.internal.cache.lru.LRUClockNode;
import org.apache.geode.internal.cache.lru.NewLRUClockHand;
+
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.versions.VersionSource;
import org.apache.geode.internal.cache.versions.VersionStamp;
import org.apache.geode.internal.cache.versions.VersionTag;
+
import org.apache.geode.internal.offheap.OffHeapRegionEntryHelper;
import org.apache.geode.internal.offheap.annotations.Released;
import org.apache.geode.internal.offheap.annotations.Retained;
import org.apache.geode.internal.offheap.annotations.Unretained;
+
import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
// macros whose definition changes this class:
// disk: DISK
-// lru: LRU
+// lru: 1
// stats: STATS
-// versioned: VERSIONED
-// offheap: OFFHEAP
+// versioned: 1
+// offheap: 1
// One of the following key macros must be defined:
// key object: KEY_OBJECT
// key int: KEY_INT
// key long: KEY_LONG
-// key uuid: KEY_UUID
+// key uuid: 1
// key string1: KEY_STRING1
// key string2: KEY_STRING2
+
/**
* Do not modify this class. It was generated. Instead modify LeafRegionEntry.cpp and then run
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinLRURegionEntryOffHeapUUIDKey extends VersionedThinLRURegionEntryOffHeap {
public VersionedThinLRURegionEntryOffHeapUUIDKey(RegionEntryContext context, UUID key,
- @Retained Object value) {
- super(context, value);
+
+ @Retained
+
+ Object value
+
+
+
+ ) {
+ super(context,
+
+
+
+ value
+
+ );
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
this.keyMostSigBits = key.getMostSignificantBits();
this.keyLeastSigBits = key.getLeastSignificantBits();
+
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@@ -67,6 +95,7 @@ public class VersionedThinLRURegionEntryOffHeapUUIDKey extends VersionedThinLRUR
private static final AtomicLongFieldUpdater<VersionedThinLRURegionEntryOffHeapUUIDKey> lastModifiedUpdater =
AtomicLongFieldUpdater.newUpdater(VersionedThinLRURegionEntryOffHeapUUIDKey.class,
"lastModified");
+
/**
* All access done using ohAddrUpdater so it is used even though the compiler can not tell it is.
*/
@@ -98,13 +127,19 @@ public class VersionedThinLRURegionEntryOffHeapUUIDKey extends VersionedThinLRUR
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
@Override
+
@Unretained
protected void setValueField(@Unretained Object v) {
+
+
+
OffHeapRegionEntryHelper.setValue(this, v);
}
@Override
+
@Retained
+
public Object _getValueRetain(RegionEntryContext context, boolean decompress) {
return OffHeapRegionEntryHelper._getValueRetain(this, decompress, context);
}
@@ -120,7 +155,9 @@ public class VersionedThinLRURegionEntryOffHeapUUIDKey extends VersionedThinLRUR
}
@Override
+
@Released
+
public void release() {
OffHeapRegionEntryHelper.releaseEntry(this);
}
@@ -144,7 +181,7 @@ public class VersionedThinLRURegionEntryOffHeapUUIDKey extends VersionedThinLRUR
/**
* @see HashEntry#getEntryHash()
*/
- public final int getEntryHash() {
+ public int getEntryHash() {
return this.hash;
}
@@ -155,114 +192,118 @@ public class VersionedThinLRURegionEntryOffHeapUUIDKey extends VersionedThinLRUR
/**
* @see HashEntry#getNextEntry()
*/
- public final HashEntry<Object, Object> getNextEntry() {
+ public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
/**
* @see HashEntry#setNextEntry
*/
- public final void setNextEntry(final HashEntry<Object, Object> n) {
+ public void setNextEntry(final HashEntry<Object, Object> n) {
this.next = n;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// lru code
@Override
public void setDelayedDiskId(LocalRegion r) {
+
+
+
// nothing needed for LRUs with no disk
+
}
- public final synchronized int updateEntrySize(EnableLRU capacityController) {
+ public synchronized int updateEntrySize(EnableLRU capacityController) {
return updateEntrySize(capacityController, _getValue()); // OFHEAP: _getValue ok w/o incing
// refcount because we are synced and
// only getting the size
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
- public final synchronized int updateEntrySize(EnableLRU capacityController, Object value) {
+
+ public synchronized int updateEntrySize(EnableLRU capacityController, Object value) {
int oldSize = getEntrySize();
int newSize = capacityController.entrySize(getKeyForSizing(), value);
setEntrySize(newSize);
int delta = newSize - oldSize;
- // if ( debug ) log( "updateEntrySize key=" + getKey()
- // + (_getValue() == Token.INVALID ? " invalid" :
- // (_getValue() == Token.LOCAL_INVALID ? "local_invalid" :
- // (_getValue()==null ? " evicted" : " valid")))
- // + " oldSize=" + oldSize
- // + " newSize=" + this.size );
return delta;
}
- public final boolean testRecentlyUsed() {
+ public boolean testRecentlyUsed() {
return areAnyBitsSet(RECENTLY_USED);
}
@Override
- public final void setRecentlyUsed() {
+ public void setRecentlyUsed() {
setBits(RECENTLY_USED);
}
- public final void unsetRecentlyUsed() {
+ public void unsetRecentlyUsed() {
clearBits(~RECENTLY_USED);
}
- public final boolean testEvicted() {
+ public boolean testEvicted() {
return areAnyBitsSet(EVICTED);
}
- public final void setEvicted() {
+ public void setEvicted() {
setBits(EVICTED);
}
- public final void unsetEvicted() {
+ public void unsetEvicted() {
clearBits(~EVICTED);
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
private LRUClockNode nextLRU;
private LRUClockNode prevLRU;
private int size;
- public final void setNextLRUNode(LRUClockNode next) {
+ public void setNextLRUNode(LRUClockNode next) {
this.nextLRU = next;
}
- public final LRUClockNode nextLRUNode() {
+ public LRUClockNode nextLRUNode() {
return this.nextLRU;
}
- public final void setPrevLRUNode(LRUClockNode prev) {
+ public void setPrevLRUNode(LRUClockNode prev) {
this.prevLRU = prev;
}
- public final LRUClockNode prevLRUNode() {
+ public LRUClockNode prevLRUNode() {
return this.prevLRU;
}
- public final int getEntrySize() {
+ public int getEntrySize() {
return this.size;
}
- protected final void setEntrySize(int size) {
+ protected void setEntrySize(int size) {
this.size = size;
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
- // @Override
- // public StringBuilder appendFieldsToString(final StringBuilder sb) {
- // StringBuilder result = super.appendFieldsToString(sb);
- // result.append("; prev=").append(this.prevLRU==null?"null":"not null");
- // result.append("; next=").append(this.nextLRU==null?"null":"not null");
- // return result;
- // }
+
@Override
public Object getKeyForSizing() {
+
+
+
// inline keys always report null for sizing since the size comes from the entry size
return null;
+
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -279,6 +320,7 @@ public class VersionedThinLRURegionEntryOffHeapUUIDKey extends VersionedThinLRUR
return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
+
public long getVersionTimeStamp() {
return getLastModified();
}
@@ -296,6 +338,7 @@ public class VersionedThinLRURegionEntryOffHeapUUIDKey extends VersionedThinLRUR
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
@@ -325,6 +368,7 @@ public class VersionedThinLRURegionEntryOffHeapUUIDKey extends VersionedThinLRUR
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public VersionTag asVersionTag() {
VersionTag tag = VersionTag.create(memberID);
tag.setEntryVersion(getEntryVersion());
@@ -357,13 +401,16 @@ public class VersionedThinLRURegionEntryOffHeapUUIDKey extends VersionedThinLRUR
return this.regionVersionLowBytes;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// key code
+
private final long keyMostSigBits;
private final long keyLeastSigBits;
@Override
- public final Object getKey() {
+ public Object getKey() {
return new UUID(this.keyMostSigBits, this.keyLeastSigBits);
}
@@ -376,5 +423,8 @@ public class VersionedThinLRURegionEntryOffHeapUUIDKey extends VersionedThinLRUR
}
return false;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
}
+
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapIntKey.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapIntKey.java b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapIntKey.java
index b2181d0..51347e0 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapIntKey.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapIntKey.java
@@ -15,39 +15,65 @@
package org.apache.geode.internal.cache;
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+
import org.apache.geode.cache.EntryEvent;
+
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.versions.VersionSource;
import org.apache.geode.internal.cache.versions.VersionStamp;
import org.apache.geode.internal.cache.versions.VersionTag;
+
import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
// macros whose definition changes this class:
// disk: DISK
// lru: LRU
// stats: STATS
-// versioned: VERSIONED
+// versioned: 1
// offheap: OFFHEAP
// One of the following key macros must be defined:
// key object: KEY_OBJECT
-// key int: KEY_INT
+// key int: 1
// key long: KEY_LONG
// key uuid: KEY_UUID
// key string1: KEY_STRING1
// key string2: KEY_STRING2
+
/**
* Do not modify this class. It was generated. Instead modify LeafRegionEntry.cpp and then run
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryHeapIntKey extends VersionedThinRegionEntryHeap {
- public VersionedThinRegionEntryHeapIntKey(RegionEntryContext context, int key, Object value) {
- super(context, value);
+ public VersionedThinRegionEntryHeapIntKey(RegionEntryContext context, int key,
+
+
+
+ Object value
+
+
+
+ ) {
+ super(context,
+
+
+
+ value
+
+ );
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
this.key = key;
+
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@@ -55,10 +81,11 @@ public class VersionedThinRegionEntryHeapIntKey extends VersionedThinRegionEntry
private volatile long lastModified;
private static final AtomicLongFieldUpdater<VersionedThinRegionEntryHeapIntKey> lastModifiedUpdater =
AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryHeapIntKey.class, "lastModified");
+
private volatile Object value;
@Override
- protected final Object getValueField() {
+ protected Object getValueField() {
return this.value;
}
@@ -78,7 +105,7 @@ public class VersionedThinRegionEntryHeapIntKey extends VersionedThinRegionEntry
/**
* @see HashEntry#getEntryHash()
*/
- public final int getEntryHash() {
+ public int getEntryHash() {
return this.hash;
}
@@ -89,18 +116,21 @@ public class VersionedThinRegionEntryHeapIntKey extends VersionedThinRegionEntry
/**
* @see HashEntry#getNextEntry()
*/
- public final HashEntry<Object, Object> getNextEntry() {
+ public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
/**
* @see HashEntry#setNextEntry
*/
- public final void setNextEntry(final HashEntry<Object, Object> n) {
+ public void setNextEntry(final HashEntry<Object, Object> n) {
this.next = n;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -117,6 +147,7 @@ public class VersionedThinRegionEntryHeapIntKey extends VersionedThinRegionEntry
return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
+
public long getVersionTimeStamp() {
return getLastModified();
}
@@ -134,6 +165,7 @@ public class VersionedThinRegionEntryHeapIntKey extends VersionedThinRegionEntry
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
@@ -163,6 +195,7 @@ public class VersionedThinRegionEntryHeapIntKey extends VersionedThinRegionEntry
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public VersionTag asVersionTag() {
VersionTag tag = VersionTag.create(memberID);
tag.setEntryVersion(getEntryVersion());
@@ -195,12 +228,17 @@ public class VersionedThinRegionEntryHeapIntKey extends VersionedThinRegionEntry
return this.regionVersionLowBytes;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// key code
+
+
+
private final int key;
@Override
- public final Object getKey() {
+ public Object getKey() {
return this.key;
}
@@ -211,5 +249,8 @@ public class VersionedThinRegionEntryHeapIntKey extends VersionedThinRegionEntry
}
return false;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
}
+
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapLongKey.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapLongKey.java b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapLongKey.java
index 901e64d..0269e67 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapLongKey.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapLongKey.java
@@ -15,39 +15,65 @@
package org.apache.geode.internal.cache;
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+
import org.apache.geode.cache.EntryEvent;
+
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.versions.VersionSource;
import org.apache.geode.internal.cache.versions.VersionStamp;
import org.apache.geode.internal.cache.versions.VersionTag;
+
import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
// macros whose definition changes this class:
// disk: DISK
// lru: LRU
// stats: STATS
-// versioned: VERSIONED
+// versioned: 1
// offheap: OFFHEAP
// One of the following key macros must be defined:
// key object: KEY_OBJECT
// key int: KEY_INT
-// key long: KEY_LONG
+// key long: 1
// key uuid: KEY_UUID
// key string1: KEY_STRING1
// key string2: KEY_STRING2
+
/**
* Do not modify this class. It was generated. Instead modify LeafRegionEntry.cpp and then run
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryHeapLongKey extends VersionedThinRegionEntryHeap {
- public VersionedThinRegionEntryHeapLongKey(RegionEntryContext context, long key, Object value) {
- super(context, value);
+ public VersionedThinRegionEntryHeapLongKey(RegionEntryContext context, long key,
+
+
+
+ Object value
+
+
+
+ ) {
+ super(context,
+
+
+
+ value
+
+ );
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
this.key = key;
+
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@@ -55,10 +81,11 @@ public class VersionedThinRegionEntryHeapLongKey extends VersionedThinRegionEntr
private volatile long lastModified;
private static final AtomicLongFieldUpdater<VersionedThinRegionEntryHeapLongKey> lastModifiedUpdater =
AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryHeapLongKey.class, "lastModified");
+
private volatile Object value;
@Override
- protected final Object getValueField() {
+ protected Object getValueField() {
return this.value;
}
@@ -78,7 +105,7 @@ public class VersionedThinRegionEntryHeapLongKey extends VersionedThinRegionEntr
/**
* @see HashEntry#getEntryHash()
*/
- public final int getEntryHash() {
+ public int getEntryHash() {
return this.hash;
}
@@ -89,18 +116,21 @@ public class VersionedThinRegionEntryHeapLongKey extends VersionedThinRegionEntr
/**
* @see HashEntry#getNextEntry()
*/
- public final HashEntry<Object, Object> getNextEntry() {
+ public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
/**
* @see HashEntry#setNextEntry
*/
- public final void setNextEntry(final HashEntry<Object, Object> n) {
+ public void setNextEntry(final HashEntry<Object, Object> n) {
this.next = n;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -117,6 +147,7 @@ public class VersionedThinRegionEntryHeapLongKey extends VersionedThinRegionEntr
return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
+
public long getVersionTimeStamp() {
return getLastModified();
}
@@ -134,6 +165,7 @@ public class VersionedThinRegionEntryHeapLongKey extends VersionedThinRegionEntr
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
@@ -163,6 +195,7 @@ public class VersionedThinRegionEntryHeapLongKey extends VersionedThinRegionEntr
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public VersionTag asVersionTag() {
VersionTag tag = VersionTag.create(memberID);
tag.setEntryVersion(getEntryVersion());
@@ -195,12 +228,15 @@ public class VersionedThinRegionEntryHeapLongKey extends VersionedThinRegionEntr
return this.regionVersionLowBytes;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// key code
+
private final long key;
@Override
- public final Object getKey() {
+ public Object getKey() {
return this.key;
}
@@ -211,5 +247,8 @@ public class VersionedThinRegionEntryHeapLongKey extends VersionedThinRegionEntr
}
return false;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
}
+
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapObjectKey.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapObjectKey.java b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapObjectKey.java
index 27fb4bd..f4bfa8c 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapObjectKey.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapObjectKey.java
@@ -15,40 +15,65 @@
package org.apache.geode.internal.cache;
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+
import org.apache.geode.cache.EntryEvent;
+
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.versions.VersionSource;
import org.apache.geode.internal.cache.versions.VersionStamp;
import org.apache.geode.internal.cache.versions.VersionTag;
+
import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
// macros whose definition changes this class:
// disk: DISK
// lru: LRU
// stats: STATS
-// versioned: VERSIONED
+// versioned: 1
// offheap: OFFHEAP
// One of the following key macros must be defined:
-// key object: KEY_OBJECT
+// key object: 1
// key int: KEY_INT
// key long: KEY_LONG
// key uuid: KEY_UUID
// key string1: KEY_STRING1
// key string2: KEY_STRING2
+
/**
* Do not modify this class. It was generated. Instead modify LeafRegionEntry.cpp and then run
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryHeapObjectKey extends VersionedThinRegionEntryHeap {
public VersionedThinRegionEntryHeapObjectKey(RegionEntryContext context, Object key,
- Object value) {
- super(context, value);
+
+
+
+ Object value
+
+
+
+ ) {
+ super(context,
+
+
+
+ value
+
+ );
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
this.key = key;
+
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@@ -57,10 +82,11 @@ public class VersionedThinRegionEntryHeapObjectKey extends VersionedThinRegionEn
private static final AtomicLongFieldUpdater<VersionedThinRegionEntryHeapObjectKey> lastModifiedUpdater =
AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryHeapObjectKey.class,
"lastModified");
+
private volatile Object value;
@Override
- protected final Object getValueField() {
+ protected Object getValueField() {
return this.value;
}
@@ -80,7 +106,7 @@ public class VersionedThinRegionEntryHeapObjectKey extends VersionedThinRegionEn
/**
* @see HashEntry#getEntryHash()
*/
- public final int getEntryHash() {
+ public int getEntryHash() {
return this.hash;
}
@@ -91,18 +117,21 @@ public class VersionedThinRegionEntryHeapObjectKey extends VersionedThinRegionEn
/**
* @see HashEntry#getNextEntry()
*/
- public final HashEntry<Object, Object> getNextEntry() {
+ public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
/**
* @see HashEntry#setNextEntry
*/
- public final void setNextEntry(final HashEntry<Object, Object> n) {
+ public void setNextEntry(final HashEntry<Object, Object> n) {
this.next = n;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -119,6 +148,7 @@ public class VersionedThinRegionEntryHeapObjectKey extends VersionedThinRegionEn
return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
+
public long getVersionTimeStamp() {
return getLastModified();
}
@@ -136,6 +166,7 @@ public class VersionedThinRegionEntryHeapObjectKey extends VersionedThinRegionEn
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
@@ -165,6 +196,7 @@ public class VersionedThinRegionEntryHeapObjectKey extends VersionedThinRegionEn
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public VersionTag asVersionTag() {
VersionTag tag = VersionTag.create(memberID);
tag.setEntryVersion(getEntryVersion());
@@ -197,13 +229,19 @@ public class VersionedThinRegionEntryHeapObjectKey extends VersionedThinRegionEn
return this.regionVersionLowBytes;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// key code
+
private final Object key;
@Override
- public final Object getKey() {
+ public Object getKey() {
return this.key;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
}
+
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapStringKey1.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapStringKey1.java b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapStringKey1.java
index 05d32cb..0ad5265 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapStringKey1.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapStringKey1.java
@@ -15,36 +15,57 @@
package org.apache.geode.internal.cache;
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+
import org.apache.geode.cache.EntryEvent;
+
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.versions.VersionSource;
import org.apache.geode.internal.cache.versions.VersionStamp;
import org.apache.geode.internal.cache.versions.VersionTag;
+
import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
// macros whose definition changes this class:
// disk: DISK
// lru: LRU
// stats: STATS
-// versioned: VERSIONED
+// versioned: 1
// offheap: OFFHEAP
// One of the following key macros must be defined:
// key object: KEY_OBJECT
// key int: KEY_INT
// key long: KEY_LONG
// key uuid: KEY_UUID
-// key string1: KEY_STRING1
+// key string1: 1
// key string2: KEY_STRING2
+
/**
* Do not modify this class. It was generated. Instead modify LeafRegionEntry.cpp and then run
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryHeapStringKey1 extends VersionedThinRegionEntryHeap {
public VersionedThinRegionEntryHeapStringKey1(RegionEntryContext context, String key,
- Object value, boolean byteEncode) {
- super(context, value);
+
+
+
+ Object value
+
+ , boolean byteEncode
+
+ ) {
+ super(context,
+
+
+
+ value
+
+ );
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// caller has already confirmed that key.length <= MAX_INLINE_STRING_KEY
long tmpBits1 = 0L;
if (byteEncode) {
@@ -63,9 +84,11 @@ public class VersionedThinRegionEntryHeapStringKey1 extends VersionedThinRegionE
}
tmpBits1 |= key.length();
this.bits1 = tmpBits1;
+
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@@ -74,10 +97,11 @@ public class VersionedThinRegionEntryHeapStringKey1 extends VersionedThinRegionE
private static final AtomicLongFieldUpdater<VersionedThinRegionEntryHeapStringKey1> lastModifiedUpdater =
AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryHeapStringKey1.class,
"lastModified");
+
private volatile Object value;
@Override
- protected final Object getValueField() {
+ protected Object getValueField() {
return this.value;
}
@@ -97,7 +121,7 @@ public class VersionedThinRegionEntryHeapStringKey1 extends VersionedThinRegionE
/**
* @see HashEntry#getEntryHash()
*/
- public final int getEntryHash() {
+ public int getEntryHash() {
return this.hash;
}
@@ -108,18 +132,21 @@ public class VersionedThinRegionEntryHeapStringKey1 extends VersionedThinRegionE
/**
* @see HashEntry#getNextEntry()
*/
- public final HashEntry<Object, Object> getNextEntry() {
+ public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
/**
* @see HashEntry#setNextEntry
*/
- public final void setNextEntry(final HashEntry<Object, Object> n) {
+ public void setNextEntry(final HashEntry<Object, Object> n) {
this.next = n;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -136,6 +163,7 @@ public class VersionedThinRegionEntryHeapStringKey1 extends VersionedThinRegionE
return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
+
public long getVersionTimeStamp() {
return getLastModified();
}
@@ -153,6 +181,7 @@ public class VersionedThinRegionEntryHeapStringKey1 extends VersionedThinRegionE
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
@@ -182,6 +211,7 @@ public class VersionedThinRegionEntryHeapStringKey1 extends VersionedThinRegionE
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public VersionTag asVersionTag() {
VersionTag tag = VersionTag.create(memberID);
tag.setEntryVersion(getEntryVersion());
@@ -214,8 +244,11 @@ public class VersionedThinRegionEntryHeapStringKey1 extends VersionedThinRegionE
return this.regionVersionLowBytes;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// key code
+
private final long bits1;
private int getKeyLength() {
@@ -229,7 +262,7 @@ public class VersionedThinRegionEntryHeapStringKey1 extends VersionedThinRegionE
}
@Override
- public final Object getKey() {
+ public Object getKey() {
int keylen = getKeyLength();
char[] chars = new char[keylen];
long tmpBits1 = this.bits1;
@@ -248,6 +281,7 @@ public class VersionedThinRegionEntryHeapStringKey1 extends VersionedThinRegionE
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
@Override
public boolean isKeyEqual(Object k) {
if (k instanceof String) {
@@ -277,5 +311,8 @@ public class VersionedThinRegionEntryHeapStringKey1 extends VersionedThinRegionE
}
return false;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
}
+
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapStringKey2.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapStringKey2.java b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapStringKey2.java
index 68e9a61..2d8817b 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapStringKey2.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapStringKey2.java
@@ -15,19 +15,25 @@
package org.apache.geode.internal.cache;
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+
import org.apache.geode.cache.EntryEvent;
+
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.versions.VersionSource;
import org.apache.geode.internal.cache.versions.VersionStamp;
import org.apache.geode.internal.cache.versions.VersionTag;
+
import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
// macros whose definition changes this class:
// disk: DISK
// lru: LRU
// stats: STATS
-// versioned: VERSIONED
+// versioned: 1
// offheap: OFFHEAP
// One of the following key macros must be defined:
// key object: KEY_OBJECT
@@ -35,16 +41,31 @@ import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.Ha
// key long: KEY_LONG
// key uuid: KEY_UUID
// key string1: KEY_STRING1
-// key string2: KEY_STRING2
+// key string2: 1
+
/**
* Do not modify this class. It was generated. Instead modify LeafRegionEntry.cpp and then run
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryHeapStringKey2 extends VersionedThinRegionEntryHeap {
public VersionedThinRegionEntryHeapStringKey2(RegionEntryContext context, String key,
- Object value, boolean byteEncode) {
- super(context, value);
+
+
+
+ Object value
+
+ , boolean byteEncode
+
+ ) {
+ super(context,
+
+
+
+ value
+
+ );
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// caller has already confirmed that key.length <= MAX_INLINE_STRING_KEY
long tmpBits1 = 0L;
long tmpBits2 = 0L;
@@ -75,9 +96,11 @@ public class VersionedThinRegionEntryHeapStringKey2 extends VersionedThinRegionE
tmpBits1 |= key.length();
this.bits1 = tmpBits1;
this.bits2 = tmpBits2;
+
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@@ -86,10 +109,11 @@ public class VersionedThinRegionEntryHeapStringKey2 extends VersionedThinRegionE
private static final AtomicLongFieldUpdater<VersionedThinRegionEntryHeapStringKey2> lastModifiedUpdater =
AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryHeapStringKey2.class,
"lastModified");
+
private volatile Object value;
@Override
- protected final Object getValueField() {
+ protected Object getValueField() {
return this.value;
}
@@ -109,7 +133,7 @@ public class VersionedThinRegionEntryHeapStringKey2 extends VersionedThinRegionE
/**
* @see HashEntry#getEntryHash()
*/
- public final int getEntryHash() {
+ public int getEntryHash() {
return this.hash;
}
@@ -120,18 +144,21 @@ public class VersionedThinRegionEntryHeapStringKey2 extends VersionedThinRegionE
/**
* @see HashEntry#getNextEntry()
*/
- public final HashEntry<Object, Object> getNextEntry() {
+ public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
/**
* @see HashEntry#setNextEntry
*/
- public final void setNextEntry(final HashEntry<Object, Object> n) {
+ public void setNextEntry(final HashEntry<Object, Object> n) {
this.next = n;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -148,6 +175,7 @@ public class VersionedThinRegionEntryHeapStringKey2 extends VersionedThinRegionE
return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
+
public long getVersionTimeStamp() {
return getLastModified();
}
@@ -165,6 +193,7 @@ public class VersionedThinRegionEntryHeapStringKey2 extends VersionedThinRegionE
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
@@ -194,6 +223,7 @@ public class VersionedThinRegionEntryHeapStringKey2 extends VersionedThinRegionE
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public VersionTag asVersionTag() {
VersionTag tag = VersionTag.create(memberID);
tag.setEntryVersion(getEntryVersion());
@@ -226,8 +256,11 @@ public class VersionedThinRegionEntryHeapStringKey2 extends VersionedThinRegionE
return this.regionVersionLowBytes;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// key code
+
// strlen is encoded in lowest 6 bits (max strlen is 63)
// character encoding info is in bits 7 and 8
// The other bits are used to encoded character data.
@@ -246,7 +279,7 @@ public class VersionedThinRegionEntryHeapStringKey2 extends VersionedThinRegionE
}
@Override
- public final Object getKey() {
+ public Object getKey() {
int keylen = getKeyLength();
char[] chars = new char[keylen];
long tmpBits1 = this.bits1;
@@ -276,6 +309,7 @@ public class VersionedThinRegionEntryHeapStringKey2 extends VersionedThinRegionE
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
@Override
public boolean isKeyEqual(Object k) {
if (k instanceof String) {
@@ -318,5 +352,7 @@ public class VersionedThinRegionEntryHeapStringKey2 extends VersionedThinRegionE
}
return false;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
}
+
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapUUIDKey.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapUUIDKey.java b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapUUIDKey.java
index fcc2a68..49abbfd 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapUUIDKey.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryHeapUUIDKey.java
@@ -15,41 +15,66 @@
package org.apache.geode.internal.cache;
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
import java.util.UUID;
+
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+
import org.apache.geode.cache.EntryEvent;
+
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.versions.VersionSource;
import org.apache.geode.internal.cache.versions.VersionStamp;
import org.apache.geode.internal.cache.versions.VersionTag;
+
import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
// macros whose definition changes this class:
// disk: DISK
// lru: LRU
// stats: STATS
-// versioned: VERSIONED
+// versioned: 1
// offheap: OFFHEAP
// One of the following key macros must be defined:
// key object: KEY_OBJECT
// key int: KEY_INT
// key long: KEY_LONG
-// key uuid: KEY_UUID
+// key uuid: 1
// key string1: KEY_STRING1
// key string2: KEY_STRING2
+
/**
* Do not modify this class. It was generated. Instead modify LeafRegionEntry.cpp and then run
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryHeapUUIDKey extends VersionedThinRegionEntryHeap {
- public VersionedThinRegionEntryHeapUUIDKey(RegionEntryContext context, UUID key, Object value) {
- super(context, value);
+ public VersionedThinRegionEntryHeapUUIDKey(RegionEntryContext context, UUID key,
+
+
+
+ Object value
+
+
+
+ ) {
+ super(context,
+
+
+
+ value
+
+ );
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
this.keyMostSigBits = key.getMostSignificantBits();
this.keyLeastSigBits = key.getLeastSignificantBits();
+
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@@ -57,10 +82,11 @@ public class VersionedThinRegionEntryHeapUUIDKey extends VersionedThinRegionEntr
private volatile long lastModified;
private static final AtomicLongFieldUpdater<VersionedThinRegionEntryHeapUUIDKey> lastModifiedUpdater =
AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryHeapUUIDKey.class, "lastModified");
+
private volatile Object value;
@Override
- protected final Object getValueField() {
+ protected Object getValueField() {
return this.value;
}
@@ -80,7 +106,7 @@ public class VersionedThinRegionEntryHeapUUIDKey extends VersionedThinRegionEntr
/**
* @see HashEntry#getEntryHash()
*/
- public final int getEntryHash() {
+ public int getEntryHash() {
return this.hash;
}
@@ -91,18 +117,21 @@ public class VersionedThinRegionEntryHeapUUIDKey extends VersionedThinRegionEntr
/**
* @see HashEntry#getNextEntry()
*/
- public final HashEntry<Object, Object> getNextEntry() {
+ public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
/**
* @see HashEntry#setNextEntry
*/
- public final void setNextEntry(final HashEntry<Object, Object> n) {
+ public void setNextEntry(final HashEntry<Object, Object> n) {
this.next = n;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -119,6 +148,7 @@ public class VersionedThinRegionEntryHeapUUIDKey extends VersionedThinRegionEntr
return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
+
public long getVersionTimeStamp() {
return getLastModified();
}
@@ -136,6 +166,7 @@ public class VersionedThinRegionEntryHeapUUIDKey extends VersionedThinRegionEntr
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
@@ -165,6 +196,7 @@ public class VersionedThinRegionEntryHeapUUIDKey extends VersionedThinRegionEntr
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public VersionTag asVersionTag() {
VersionTag tag = VersionTag.create(memberID);
tag.setEntryVersion(getEntryVersion());
@@ -197,13 +229,16 @@ public class VersionedThinRegionEntryHeapUUIDKey extends VersionedThinRegionEntr
return this.regionVersionLowBytes;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// key code
+
private final long keyMostSigBits;
private final long keyLeastSigBits;
@Override
- public final Object getKey() {
+ public Object getKey() {
return new UUID(this.keyMostSigBits, this.keyLeastSigBits);
}
@@ -216,5 +251,8 @@ public class VersionedThinRegionEntryHeapUUIDKey extends VersionedThinRegionEntr
}
return false;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
}
+
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapIntKey.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapIntKey.java b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapIntKey.java
index 22baf55..8fcf400 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapIntKey.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapIntKey.java
@@ -15,44 +15,70 @@
package org.apache.geode.internal.cache;
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+
import org.apache.geode.cache.EntryEvent;
+
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.versions.VersionSource;
import org.apache.geode.internal.cache.versions.VersionStamp;
import org.apache.geode.internal.cache.versions.VersionTag;
+
import org.apache.geode.internal.offheap.OffHeapRegionEntryHelper;
import org.apache.geode.internal.offheap.annotations.Released;
import org.apache.geode.internal.offheap.annotations.Retained;
import org.apache.geode.internal.offheap.annotations.Unretained;
+
import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
// macros whose definition changes this class:
// disk: DISK
// lru: LRU
// stats: STATS
-// versioned: VERSIONED
-// offheap: OFFHEAP
+// versioned: 1
+// offheap: 1
// One of the following key macros must be defined:
// key object: KEY_OBJECT
-// key int: KEY_INT
+// key int: 1
// key long: KEY_LONG
// key uuid: KEY_UUID
// key string1: KEY_STRING1
// key string2: KEY_STRING2
+
/**
* Do not modify this class. It was generated. Instead modify LeafRegionEntry.cpp and then run
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEntryOffHeap {
public VersionedThinRegionEntryOffHeapIntKey(RegionEntryContext context, int key,
- @Retained Object value) {
- super(context, value);
+
+ @Retained
+
+ Object value
+
+
+
+ ) {
+ super(context,
+
+
+
+ value
+
+ );
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
this.key = key;
+
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@@ -61,6 +87,7 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
private static final AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapIntKey> lastModifiedUpdater =
AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapIntKey.class,
"lastModified");
+
/**
* All access done using ohAddrUpdater so it is used even though the compiler can not tell it is.
*/
@@ -91,13 +118,19 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
@Override
+
@Unretained
protected void setValueField(@Unretained Object v) {
+
+
+
OffHeapRegionEntryHelper.setValue(this, v);
}
@Override
+
@Retained
+
public Object _getValueRetain(RegionEntryContext context, boolean decompress) {
return OffHeapRegionEntryHelper._getValueRetain(this, decompress, context);
}
@@ -113,7 +146,9 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
}
@Override
+
@Released
+
public void release() {
OffHeapRegionEntryHelper.releaseEntry(this);
}
@@ -137,7 +172,7 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
/**
* @see HashEntry#getEntryHash()
*/
- public final int getEntryHash() {
+ public int getEntryHash() {
return this.hash;
}
@@ -148,18 +183,21 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
/**
* @see HashEntry#getNextEntry()
*/
- public final HashEntry<Object, Object> getNextEntry() {
+ public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
/**
* @see HashEntry#setNextEntry
*/
- public final void setNextEntry(final HashEntry<Object, Object> n) {
+ public void setNextEntry(final HashEntry<Object, Object> n) {
this.next = n;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -176,6 +214,7 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
+
public long getVersionTimeStamp() {
return getLastModified();
}
@@ -193,6 +232,7 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
@@ -222,6 +262,7 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public VersionTag asVersionTag() {
VersionTag tag = VersionTag.create(memberID);
tag.setEntryVersion(getEntryVersion());
@@ -254,12 +295,17 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
return this.regionVersionLowBytes;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// key code
+
+
+
private final int key;
@Override
- public final Object getKey() {
+ public Object getKey() {
return this.key;
}
@@ -270,5 +316,8 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
}
return false;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
}
+
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapLongKey.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapLongKey.java b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapLongKey.java
index 931faef..1dfe8ec 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapLongKey.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapLongKey.java
@@ -15,44 +15,70 @@
package org.apache.geode.internal.cache;
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+
import org.apache.geode.cache.EntryEvent;
+
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.versions.VersionSource;
import org.apache.geode.internal.cache.versions.VersionStamp;
import org.apache.geode.internal.cache.versions.VersionTag;
+
import org.apache.geode.internal.offheap.OffHeapRegionEntryHelper;
import org.apache.geode.internal.offheap.annotations.Released;
import org.apache.geode.internal.offheap.annotations.Retained;
import org.apache.geode.internal.offheap.annotations.Unretained;
+
import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
// macros whose definition changes this class:
// disk: DISK
// lru: LRU
// stats: STATS
-// versioned: VERSIONED
-// offheap: OFFHEAP
+// versioned: 1
+// offheap: 1
// One of the following key macros must be defined:
// key object: KEY_OBJECT
// key int: KEY_INT
-// key long: KEY_LONG
+// key long: 1
// key uuid: KEY_UUID
// key string1: KEY_STRING1
// key string2: KEY_STRING2
+
/**
* Do not modify this class. It was generated. Instead modify LeafRegionEntry.cpp and then run
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionEntryOffHeap {
public VersionedThinRegionEntryOffHeapLongKey(RegionEntryContext context, long key,
- @Retained Object value) {
- super(context, value);
+
+ @Retained
+
+ Object value
+
+
+
+ ) {
+ super(context,
+
+
+
+ value
+
+ );
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
this.key = key;
+
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@@ -61,6 +87,7 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
private static final AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapLongKey> lastModifiedUpdater =
AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapLongKey.class,
"lastModified");
+
/**
* All access done using ohAddrUpdater so it is used even though the compiler can not tell it is.
*/
@@ -91,13 +118,19 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
@Override
+
@Unretained
protected void setValueField(@Unretained Object v) {
+
+
+
OffHeapRegionEntryHelper.setValue(this, v);
}
@Override
+
@Retained
+
public Object _getValueRetain(RegionEntryContext context, boolean decompress) {
return OffHeapRegionEntryHelper._getValueRetain(this, decompress, context);
}
@@ -113,7 +146,9 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
}
@Override
+
@Released
+
public void release() {
OffHeapRegionEntryHelper.releaseEntry(this);
}
@@ -137,7 +172,7 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
/**
* @see HashEntry#getEntryHash()
*/
- public final int getEntryHash() {
+ public int getEntryHash() {
return this.hash;
}
@@ -148,18 +183,21 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
/**
* @see HashEntry#getNextEntry()
*/
- public final HashEntry<Object, Object> getNextEntry() {
+ public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
/**
* @see HashEntry#setNextEntry
*/
- public final void setNextEntry(final HashEntry<Object, Object> n) {
+ public void setNextEntry(final HashEntry<Object, Object> n) {
this.next = n;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -176,6 +214,7 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
+
public long getVersionTimeStamp() {
return getLastModified();
}
@@ -193,6 +232,7 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
@@ -222,6 +262,7 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public VersionTag asVersionTag() {
VersionTag tag = VersionTag.create(memberID);
tag.setEntryVersion(getEntryVersion());
@@ -254,12 +295,15 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
return this.regionVersionLowBytes;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// key code
+
private final long key;
@Override
- public final Object getKey() {
+ public Object getKey() {
return this.key;
}
@@ -270,5 +314,8 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
}
return false;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
}
+
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapObjectKey.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapObjectKey.java b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapObjectKey.java
index 1f0554e..b35778d 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapObjectKey.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapObjectKey.java
@@ -15,44 +15,70 @@
package org.apache.geode.internal.cache;
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+
import org.apache.geode.cache.EntryEvent;
+
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.versions.VersionSource;
import org.apache.geode.internal.cache.versions.VersionStamp;
import org.apache.geode.internal.cache.versions.VersionTag;
+
import org.apache.geode.internal.offheap.OffHeapRegionEntryHelper;
import org.apache.geode.internal.offheap.annotations.Released;
import org.apache.geode.internal.offheap.annotations.Retained;
import org.apache.geode.internal.offheap.annotations.Unretained;
+
import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
// macros whose definition changes this class:
// disk: DISK
// lru: LRU
// stats: STATS
-// versioned: VERSIONED
-// offheap: OFFHEAP
+// versioned: 1
+// offheap: 1
// One of the following key macros must be defined:
-// key object: KEY_OBJECT
+// key object: 1
// key int: KEY_INT
// key long: KEY_LONG
// key uuid: KEY_UUID
// key string1: KEY_STRING1
// key string2: KEY_STRING2
+
/**
* Do not modify this class. It was generated. Instead modify LeafRegionEntry.cpp and then run
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegionEntryOffHeap {
public VersionedThinRegionEntryOffHeapObjectKey(RegionEntryContext context, Object key,
- @Retained Object value) {
- super(context, value);
+
+ @Retained
+
+ Object value
+
+
+
+ ) {
+ super(context,
+
+
+
+ value
+
+ );
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
this.key = key;
+
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@@ -61,6 +87,7 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
private static final AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapObjectKey> lastModifiedUpdater =
AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapObjectKey.class,
"lastModified");
+
/**
* All access done using ohAddrUpdater so it is used even though the compiler can not tell it is.
*/
@@ -92,13 +119,19 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
@Override
+
@Unretained
protected void setValueField(@Unretained Object v) {
+
+
+
OffHeapRegionEntryHelper.setValue(this, v);
}
@Override
+
@Retained
+
public Object _getValueRetain(RegionEntryContext context, boolean decompress) {
return OffHeapRegionEntryHelper._getValueRetain(this, decompress, context);
}
@@ -114,7 +147,9 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
}
@Override
+
@Released
+
public void release() {
OffHeapRegionEntryHelper.releaseEntry(this);
}
@@ -138,7 +173,7 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
/**
* @see HashEntry#getEntryHash()
*/
- public final int getEntryHash() {
+ public int getEntryHash() {
return this.hash;
}
@@ -149,18 +184,21 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
/**
* @see HashEntry#getNextEntry()
*/
- public final HashEntry<Object, Object> getNextEntry() {
+ public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
/**
* @see HashEntry#setNextEntry
*/
- public final void setNextEntry(final HashEntry<Object, Object> n) {
+ public void setNextEntry(final HashEntry<Object, Object> n) {
this.next = n;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -177,6 +215,7 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
+
public long getVersionTimeStamp() {
return getLastModified();
}
@@ -194,6 +233,7 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
@@ -223,6 +263,7 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public VersionTag asVersionTag() {
VersionTag tag = VersionTag.create(memberID);
tag.setEntryVersion(getEntryVersion());
@@ -255,13 +296,19 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
return this.regionVersionLowBytes;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// key code
+
private final Object key;
@Override
- public final Object getKey() {
+ public Object getKey() {
return this.key;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
}
+
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapStringKey1.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapStringKey1.java b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapStringKey1.java
index 0a2ee2a..be895b2 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapStringKey1.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapStringKey1.java
@@ -15,40 +15,62 @@
package org.apache.geode.internal.cache;
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+
import org.apache.geode.cache.EntryEvent;
+
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.versions.VersionSource;
import org.apache.geode.internal.cache.versions.VersionStamp;
import org.apache.geode.internal.cache.versions.VersionTag;
+
import org.apache.geode.internal.offheap.OffHeapRegionEntryHelper;
import org.apache.geode.internal.offheap.annotations.Released;
import org.apache.geode.internal.offheap.annotations.Retained;
import org.apache.geode.internal.offheap.annotations.Unretained;
+
import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
// macros whose definition changes this class:
// disk: DISK
// lru: LRU
// stats: STATS
-// versioned: VERSIONED
-// offheap: OFFHEAP
+// versioned: 1
+// offheap: 1
// One of the following key macros must be defined:
// key object: KEY_OBJECT
// key int: KEY_INT
// key long: KEY_LONG
// key uuid: KEY_UUID
-// key string1: KEY_STRING1
+// key string1: 1
// key string2: KEY_STRING2
+
/**
* Do not modify this class. It was generated. Instead modify LeafRegionEntry.cpp and then run
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegionEntryOffHeap {
public VersionedThinRegionEntryOffHeapStringKey1(RegionEntryContext context, String key,
- @Retained Object value, boolean byteEncode) {
- super(context, value);
+
+ @Retained
+
+ Object value
+
+ , boolean byteEncode
+
+ ) {
+ super(context,
+
+
+
+ value
+
+ );
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// caller has already confirmed that key.length <= MAX_INLINE_STRING_KEY
long tmpBits1 = 0L;
if (byteEncode) {
@@ -67,9 +89,11 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
}
tmpBits1 |= key.length();
this.bits1 = tmpBits1;
+
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@@ -78,6 +102,7 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
private static final AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapStringKey1> lastModifiedUpdater =
AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapStringKey1.class,
"lastModified");
+
/**
* All access done using ohAddrUpdater so it is used even though the compiler can not tell it is.
*/
@@ -109,13 +134,19 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
@Override
+
@Unretained
protected void setValueField(@Unretained Object v) {
+
+
+
OffHeapRegionEntryHelper.setValue(this, v);
}
@Override
+
@Retained
+
public Object _getValueRetain(RegionEntryContext context, boolean decompress) {
return OffHeapRegionEntryHelper._getValueRetain(this, decompress, context);
}
@@ -131,7 +162,9 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
}
@Override
+
@Released
+
public void release() {
OffHeapRegionEntryHelper.releaseEntry(this);
}
@@ -155,7 +188,7 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
/**
* @see HashEntry#getEntryHash()
*/
- public final int getEntryHash() {
+ public int getEntryHash() {
return this.hash;
}
@@ -166,18 +199,21 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
/**
* @see HashEntry#getNextEntry()
*/
- public final HashEntry<Object, Object> getNextEntry() {
+ public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
/**
* @see HashEntry#setNextEntry
*/
- public final void setNextEntry(final HashEntry<Object, Object> n) {
+ public void setNextEntry(final HashEntry<Object, Object> n) {
this.next = n;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -194,6 +230,7 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
+
public long getVersionTimeStamp() {
return getLastModified();
}
@@ -211,6 +248,7 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
@@ -240,6 +278,7 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public VersionTag asVersionTag() {
VersionTag tag = VersionTag.create(memberID);
tag.setEntryVersion(getEntryVersion());
@@ -272,8 +311,11 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
return this.regionVersionLowBytes;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// key code
+
private final long bits1;
private int getKeyLength() {
@@ -287,7 +329,7 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
}
@Override
- public final Object getKey() {
+ public Object getKey() {
int keylen = getKeyLength();
char[] chars = new char[keylen];
long tmpBits1 = this.bits1;
@@ -306,6 +348,7 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
@Override
public boolean isKeyEqual(Object k) {
if (k instanceof String) {
@@ -335,5 +378,8 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
}
return false;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
}
+
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapStringKey2.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapStringKey2.java b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapStringKey2.java
index c834c4a..ab314ab 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapStringKey2.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapStringKey2.java
@@ -15,40 +15,62 @@
package org.apache.geode.internal.cache;
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+
import org.apache.geode.cache.EntryEvent;
+
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.versions.VersionSource;
import org.apache.geode.internal.cache.versions.VersionStamp;
import org.apache.geode.internal.cache.versions.VersionTag;
+
import org.apache.geode.internal.offheap.OffHeapRegionEntryHelper;
import org.apache.geode.internal.offheap.annotations.Released;
import org.apache.geode.internal.offheap.annotations.Retained;
import org.apache.geode.internal.offheap.annotations.Unretained;
+
import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
// macros whose definition changes this class:
// disk: DISK
// lru: LRU
// stats: STATS
-// versioned: VERSIONED
-// offheap: OFFHEAP
+// versioned: 1
+// offheap: 1
// One of the following key macros must be defined:
// key object: KEY_OBJECT
// key int: KEY_INT
// key long: KEY_LONG
// key uuid: KEY_UUID
// key string1: KEY_STRING1
-// key string2: KEY_STRING2
+// key string2: 1
+
/**
* Do not modify this class. It was generated. Instead modify LeafRegionEntry.cpp and then run
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegionEntryOffHeap {
public VersionedThinRegionEntryOffHeapStringKey2(RegionEntryContext context, String key,
- @Retained Object value, boolean byteEncode) {
- super(context, value);
+
+ @Retained
+
+ Object value
+
+ , boolean byteEncode
+
+ ) {
+ super(context,
+
+
+
+ value
+
+ );
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// caller has already confirmed that key.length <= MAX_INLINE_STRING_KEY
long tmpBits1 = 0L;
long tmpBits2 = 0L;
@@ -79,9 +101,11 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
tmpBits1 |= key.length();
this.bits1 = tmpBits1;
this.bits2 = tmpBits2;
+
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@@ -90,6 +114,7 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
private static final AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapStringKey2> lastModifiedUpdater =
AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapStringKey2.class,
"lastModified");
+
/**
* All access done using ohAddrUpdater so it is used even though the compiler can not tell it is.
*/
@@ -121,13 +146,19 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
@Override
+
@Unretained
protected void setValueField(@Unretained Object v) {
+
+
+
OffHeapRegionEntryHelper.setValue(this, v);
}
@Override
+
@Retained
+
public Object _getValueRetain(RegionEntryContext context, boolean decompress) {
return OffHeapRegionEntryHelper._getValueRetain(this, decompress, context);
}
@@ -143,7 +174,9 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
}
@Override
+
@Released
+
public void release() {
OffHeapRegionEntryHelper.releaseEntry(this);
}
@@ -167,7 +200,7 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
/**
* @see HashEntry#getEntryHash()
*/
- public final int getEntryHash() {
+ public int getEntryHash() {
return this.hash;
}
@@ -178,18 +211,21 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
/**
* @see HashEntry#getNextEntry()
*/
- public final HashEntry<Object, Object> getNextEntry() {
+ public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
/**
* @see HashEntry#setNextEntry
*/
- public final void setNextEntry(final HashEntry<Object, Object> n) {
+ public void setNextEntry(final HashEntry<Object, Object> n) {
this.next = n;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -206,6 +242,7 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
+
public long getVersionTimeStamp() {
return getLastModified();
}
@@ -223,6 +260,7 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
@@ -252,6 +290,7 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public VersionTag asVersionTag() {
VersionTag tag = VersionTag.create(memberID);
tag.setEntryVersion(getEntryVersion());
@@ -284,8 +323,11 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
return this.regionVersionLowBytes;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// key code
+
// strlen is encoded in lowest 6 bits (max strlen is 63)
// character encoding info is in bits 7 and 8
// The other bits are used to encoded character data.
@@ -304,7 +346,7 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
}
@Override
- public final Object getKey() {
+ public Object getKey() {
int keylen = getKeyLength();
char[] chars = new char[keylen];
long tmpBits1 = this.bits1;
@@ -334,6 +376,7 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
@Override
public boolean isKeyEqual(Object k) {
if (k instanceof String) {
@@ -376,5 +419,7 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
}
return false;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
}
+
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapUUIDKey.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapUUIDKey.java b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapUUIDKey.java
index 9401e7e..c4a5c06 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapUUIDKey.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/VersionedThinRegionEntryOffHeapUUIDKey.java
@@ -15,46 +15,71 @@
package org.apache.geode.internal.cache;
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
+
+
import java.util.UUID;
+
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+
import org.apache.geode.cache.EntryEvent;
+
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.versions.VersionSource;
import org.apache.geode.internal.cache.versions.VersionStamp;
import org.apache.geode.internal.cache.versions.VersionTag;
+
import org.apache.geode.internal.offheap.OffHeapRegionEntryHelper;
import org.apache.geode.internal.offheap.annotations.Released;
import org.apache.geode.internal.offheap.annotations.Retained;
import org.apache.geode.internal.offheap.annotations.Unretained;
+
import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
// macros whose definition changes this class:
// disk: DISK
// lru: LRU
// stats: STATS
-// versioned: VERSIONED
-// offheap: OFFHEAP
+// versioned: 1
+// offheap: 1
// One of the following key macros must be defined:
// key object: KEY_OBJECT
// key int: KEY_INT
// key long: KEY_LONG
-// key uuid: KEY_UUID
+// key uuid: 1
// key string1: KEY_STRING1
// key string2: KEY_STRING2
+
/**
* Do not modify this class. It was generated. Instead modify LeafRegionEntry.cpp and then run
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionEntryOffHeap {
public VersionedThinRegionEntryOffHeapUUIDKey(RegionEntryContext context, UUID key,
- @Retained Object value) {
- super(context, value);
+
+ @Retained
+
+ Object value
+
+
+
+ ) {
+ super(context,
+
+
+
+ value
+
+ );
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
this.keyMostSigBits = key.getMostSignificantBits();
this.keyLeastSigBits = key.getLeastSignificantBits();
+
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@@ -63,6 +88,7 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
private static final AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapUUIDKey> lastModifiedUpdater =
AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapUUIDKey.class,
"lastModified");
+
/**
* All access done using ohAddrUpdater so it is used even though the compiler can not tell it is.
*/
@@ -93,13 +119,19 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
@Override
+
@Unretained
protected void setValueField(@Unretained Object v) {
+
+
+
OffHeapRegionEntryHelper.setValue(this, v);
}
@Override
+
@Retained
+
public Object _getValueRetain(RegionEntryContext context, boolean decompress) {
return OffHeapRegionEntryHelper._getValueRetain(this, decompress, context);
}
@@ -115,7 +147,9 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
}
@Override
+
@Released
+
public void release() {
OffHeapRegionEntryHelper.releaseEntry(this);
}
@@ -139,7 +173,7 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
/**
* @see HashEntry#getEntryHash()
*/
- public final int getEntryHash() {
+ public int getEntryHash() {
return this.hash;
}
@@ -150,18 +184,21 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
/**
* @see HashEntry#getNextEntry()
*/
- public final HashEntry<Object, Object> getNextEntry() {
+ public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
/**
* @see HashEntry#setNextEntry
*/
- public final void setNextEntry(final HashEntry<Object, Object> n) {
+ public void setNextEntry(final HashEntry<Object, Object> n) {
this.next = n;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -178,6 +215,7 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
+
public long getVersionTimeStamp() {
return getLastModified();
}
@@ -195,6 +233,7 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
@@ -224,6 +263,7 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
public VersionTag asVersionTag() {
VersionTag tag = VersionTag.create(memberID);
tag.setEntryVersion(getEntryVersion());
@@ -256,13 +296,16 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
return this.regionVersionLowBytes;
}
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+
// key code
+
private final long keyMostSigBits;
private final long keyLeastSigBits;
@Override
- public final Object getKey() {
+ public Object getKey() {
return new UUID(this.keyMostSigBits, this.keyLeastSigBits);
}
@@ -275,5 +318,8 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
}
return false;
}
+
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
}
+
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java b/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
index 5d5a3fa..8a16ea1 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
@@ -755,7 +755,7 @@ public class HeapMemoryMonitor implements NotificationListener, MemoryMonitor {
*
* @return True if the member's heap memory is in a critical state, false otherwise.
*/
- public final boolean isMemberHeapCritical(final InternalDistributedMember member) {
+ public boolean isMemberHeapCritical(final InternalDistributedMember member) {
if (member.equals(this.cache.getMyId())) {
return this.mostRecentEvent.getState().isCritical();
}
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/cache/control/MemoryThresholds.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/control/MemoryThresholds.java b/geode-core/src/main/java/org/apache/geode/internal/cache/control/MemoryThresholds.java
index ceaeb4b..c701b3f 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/control/MemoryThresholds.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/control/MemoryThresholds.java
@@ -168,7 +168,7 @@ public class MemoryThresholds {
- (0.01 * THRESHOLD_THICKNESS_EVICT * this.maxMemoryBytes));
}
- public static final boolean isLowMemoryExceptionDisabled() {
+ public static boolean isLowMemoryExceptionDisabled() {
return DISABLE_LOW_MEM_EXCEPTION;
}