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 02:19:55 UTC
[45/78] geode git commit: fixup
http://git-wip-us.apache.org/repos/asf/geode/blob/5adb681a/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 d1ef8d0..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
@@ -18,11 +18,6 @@ package org.apache.geode.internal.cache;
-
-
-
-
-
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import org.apache.geode.cache.EntryEvent;
@@ -32,7 +27,6 @@ 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;
@@ -59,7 +53,7 @@ import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.Ha
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEntryOffHeap {
- public VersionedThinRegionEntryOffHeapIntKey (RegionEntryContext context, int key,
+ public VersionedThinRegionEntryOffHeapIntKey(RegionEntryContext context, int key,
@Retained
@@ -67,55 +61,56 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
- ) {
- super(context,
+ ) {
+ super(context,
- value
+ 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;
@SuppressWarnings("unused")
private volatile long lastModified;
- private static final AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapIntKey> lastModifiedUpdater
- = AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapIntKey.class, "lastModified");
+ 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.
*/
@SuppressWarnings("unused")
- @Retained @Released private volatile long ohAddress;
+ @Retained
+ @Released
+ private volatile long ohAddress;
/**
- * I needed to add this because I wanted clear to call setValue which normally can only be called while the re is synced.
- * But if I sync in that code it causes a lock ordering deadlock with the disk regions because they also get a rw lock in clear.
- * Some hardware platforms do not support CAS on a long. If gemfire is run on one of those the AtomicLongFieldUpdater does a sync
- * on the re and we will once again be deadlocked.
- * I don't know if we support any of the hardware platforms that do not have a 64bit CAS. If we do then we can expect deadlocks
- * on disk regions.
+ * I needed to add this because I wanted clear to call setValue which normally can only be called
+ * while the re is synced. But if I sync in that code it causes a lock ordering deadlock with the
+ * disk regions because they also get a rw lock in clear. Some hardware platforms do not support
+ * CAS on a long. If gemfire is run on one of those the AtomicLongFieldUpdater does a sync on the
+ * re and we will once again be deadlocked. I don't know if we support any of the hardware
+ * platforms that do not have a 64bit CAS. If we do then we can expect deadlocks on disk regions.
*/
- private final static AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapIntKey> ohAddrUpdater = AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapIntKey.class, "ohAddress");
-
+ private final static AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapIntKey> ohAddrUpdater =
+ AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapIntKey.class, "ohAddress");
+
@Override
public Token getValueAsToken() {
return OffHeapRegionEntryHelper.getValueAsToken(this);
}
-
+
@Override
protected Object getValueField() {
return OffHeapRegionEntryHelper._getValue(this);
@@ -131,6 +126,7 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
OffHeapRegionEntryHelper.setValue(this, v);
}
+
@Override
@Retained
@@ -148,7 +144,7 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
public boolean setAddress(long expectedAddr, long newAddr) {
return ohAddrUpdater.compareAndSet(this, expectedAddr, newAddr);
}
-
+
@Override
@Released
@@ -156,36 +152,41 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
public void release() {
OffHeapRegionEntryHelper.releaseEntry(this);
}
-
+
@Override
public void returnToPool() {
// Deadcoded for now; never was working
-// if (this instanceof VMThinRegionEntryLongKey) {
-// factory.returnToPool((VMThinRegionEntryLongKey)this);
-// }
+ // if (this instanceof VMThinRegionEntryLongKey) {
+ // factory.returnToPool((VMThinRegionEntryLongKey)this);
+ // }
}
protected long getLastModifiedField() {
return lastModifiedUpdater.get(this);
}
+
protected boolean compareAndSetLastModifiedField(long expectedValue, long newValue) {
return lastModifiedUpdater.compareAndSet(this, expectedValue, newValue);
}
+
/**
* @see HashEntry#getEntryHash()
*/
public int getEntryHash() {
return this.hash;
}
+
protected void setEntryHash(int v) {
this.hash = v;
}
+
/**
* @see HashEntry#getNextEntry()
*/
public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
+
/**
* @see HashEntry#setNextEntry
*/
@@ -193,14 +194,10 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
this.next = n;
}
-
-
-
-
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -212,16 +209,16 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
public int getEntryVersion() {
return ((entryVersionHighByte << 16) & 0xFF0000) | (entryVersionLowBytes & 0xFFFF);
}
-
+
public long getRegionVersion() {
- return (((long)regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
+ return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
-
-
+
+
public long getVersionTimeStamp() {
return getLastModified();
}
-
+
public void setVersionTimeStamp(long time) {
setLastModified(time);
}
@@ -229,17 +226,18 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
public VersionSource getMemberID() {
return this.memberID;
}
+
public int getDistributedSystemId() {
return this.distributedSystemId;
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
- this.entryVersionLowBytes = (short)(eVersion & 0xffff);
- this.entryVersionHighByte = (byte)((eVersion & 0xff0000) >> 16);
+ this.entryVersionLowBytes = (short) (eVersion & 0xffff);
+ this.entryVersionHighByte = (byte) ((eVersion & 0xff0000) >> 16);
this.regionVersionHighBytes = tag.getRegionVersionHighBytes();
this.regionVersionLowBytes = tag.getRegionVersionLowBytes();
if (!(tag.isGatewayTag()) && this.distributedSystemId == tag.getDistributedSystemId()) {
@@ -251,11 +249,11 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
} else {
setVersionTimeStamp(tag.getVersionTimeStamp());
}
- this.distributedSystemId = (byte)(tag.getDistributedSystemId() & 0xff);
+ this.distributedSystemId = (byte) (tag.getDistributedSystemId() & 0xff);
}
public void setMemberID(VersionSource memberID) {
- this.memberID = memberID;
+ this.memberID = memberID;
}
@Override
@@ -264,7 +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());
@@ -274,9 +272,9 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
return tag;
}
- public void processVersionTag(LocalRegion r, VersionTag tag,
- boolean isTombstoneFromGII, boolean hasDelta,
- VersionSource thisVM, InternalDistributedMember sender, boolean checkForConflicts) {
+ public void processVersionTag(LocalRegion r, VersionTag tag, boolean isTombstoneFromGII,
+ boolean hasDelta, VersionSource thisVM, InternalDistributedMember sender,
+ boolean checkForConflicts) {
basicProcessVersionTag(r, tag, isTombstoneFromGII, hasDelta, thisVM, sender, checkForConflicts);
}
@@ -291,29 +289,26 @@ public class VersionedThinRegionEntryOffHeapIntKey extends VersionedThinRegionEn
public short getRegionVersionHighBytes() {
return this.regionVersionHighBytes;
}
-
+
/** get rvv internal low bytes. Used by region entries for transferring to storage */
public int getRegionVersionLowBytes() {
return this.regionVersionLowBytes;
}
-
- // DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
- // key code
-
-
-
+ // DO NOT modify this class. It was generated from LeafRegionEntry.cpp
+ // key code
private final int key;
+
@Override
public Object getKey() {
return this.key;
}
+
@Override
public boolean isKeyEqual(Object k) {
if (k instanceof Integer) {
@@ -321,7 +316,7 @@ 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/5adb681a/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 3fa6651..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
@@ -18,11 +18,6 @@ package org.apache.geode.internal.cache;
-
-
-
-
-
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import org.apache.geode.cache.EntryEvent;
@@ -32,7 +27,6 @@ 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;
@@ -59,7 +53,7 @@ import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.Ha
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionEntryOffHeap {
- public VersionedThinRegionEntryOffHeapLongKey (RegionEntryContext context, long key,
+ public VersionedThinRegionEntryOffHeapLongKey(RegionEntryContext context, long key,
@Retained
@@ -67,57 +61,56 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
- ) {
- super(context,
+ ) {
+ super(context,
- value
+ 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;
@SuppressWarnings("unused")
private volatile long lastModified;
- private static final AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapLongKey> lastModifiedUpdater
- = AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapLongKey.class, "lastModified");
+ 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.
*/
@SuppressWarnings("unused")
- @Retained @Released private volatile long ohAddress;
+ @Retained
+ @Released
+ private volatile long ohAddress;
/**
- * I needed to add this because I wanted clear to call setValue which normally can only be called while the re is synced.
- * But if I sync in that code it causes a lock ordering deadlock with the disk regions because they also get a rw lock in clear.
- * Some hardware platforms do not support CAS on a long. If gemfire is run on one of those the AtomicLongFieldUpdater does a sync
- * on the re and we will once again be deadlocked.
- * I don't know if we support any of the hardware platforms that do not have a 64bit CAS. If we do then we can expect deadlocks
- * on disk regions.
+ * I needed to add this because I wanted clear to call setValue which normally can only be called
+ * while the re is synced. But if I sync in that code it causes a lock ordering deadlock with the
+ * disk regions because they also get a rw lock in clear. Some hardware platforms do not support
+ * CAS on a long. If gemfire is run on one of those the AtomicLongFieldUpdater does a sync on the
+ * re and we will once again be deadlocked. I don't know if we support any of the hardware
+ * platforms that do not have a 64bit CAS. If we do then we can expect deadlocks on disk regions.
*/
- private final static AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapLongKey> ohAddrUpdater = AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapLongKey.class, "ohAddress");
-
+ private final static AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapLongKey> ohAddrUpdater =
+ AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapLongKey.class, "ohAddress");
+
@Override
public Token getValueAsToken() {
return OffHeapRegionEntryHelper.getValueAsToken(this);
}
-
+
@Override
protected Object getValueField() {
return OffHeapRegionEntryHelper._getValue(this);
@@ -133,6 +126,7 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
OffHeapRegionEntryHelper.setValue(this, v);
}
+
@Override
@Retained
@@ -150,7 +144,7 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
public boolean setAddress(long expectedAddr, long newAddr) {
return ohAddrUpdater.compareAndSet(this, expectedAddr, newAddr);
}
-
+
@Override
@Released
@@ -158,36 +152,41 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
public void release() {
OffHeapRegionEntryHelper.releaseEntry(this);
}
-
+
@Override
public void returnToPool() {
// Deadcoded for now; never was working
-// if (this instanceof VMThinRegionEntryLongKey) {
-// factory.returnToPool((VMThinRegionEntryLongKey)this);
-// }
+ // if (this instanceof VMThinRegionEntryLongKey) {
+ // factory.returnToPool((VMThinRegionEntryLongKey)this);
+ // }
}
protected long getLastModifiedField() {
return lastModifiedUpdater.get(this);
}
+
protected boolean compareAndSetLastModifiedField(long expectedValue, long newValue) {
return lastModifiedUpdater.compareAndSet(this, expectedValue, newValue);
}
+
/**
* @see HashEntry#getEntryHash()
*/
public int getEntryHash() {
return this.hash;
}
+
protected void setEntryHash(int v) {
this.hash = v;
}
+
/**
* @see HashEntry#getNextEntry()
*/
public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
+
/**
* @see HashEntry#setNextEntry
*/
@@ -195,14 +194,10 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
this.next = n;
}
-
-
-
-
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -214,16 +209,16 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
public int getEntryVersion() {
return ((entryVersionHighByte << 16) & 0xFF0000) | (entryVersionLowBytes & 0xFFFF);
}
-
+
public long getRegionVersion() {
- return (((long)regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
+ return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
-
-
+
+
public long getVersionTimeStamp() {
return getLastModified();
}
-
+
public void setVersionTimeStamp(long time) {
setLastModified(time);
}
@@ -231,17 +226,18 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
public VersionSource getMemberID() {
return this.memberID;
}
+
public int getDistributedSystemId() {
return this.distributedSystemId;
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
- this.entryVersionLowBytes = (short)(eVersion & 0xffff);
- this.entryVersionHighByte = (byte)((eVersion & 0xff0000) >> 16);
+ this.entryVersionLowBytes = (short) (eVersion & 0xffff);
+ this.entryVersionHighByte = (byte) ((eVersion & 0xff0000) >> 16);
this.regionVersionHighBytes = tag.getRegionVersionHighBytes();
this.regionVersionLowBytes = tag.getRegionVersionLowBytes();
if (!(tag.isGatewayTag()) && this.distributedSystemId == tag.getDistributedSystemId()) {
@@ -253,11 +249,11 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
} else {
setVersionTimeStamp(tag.getVersionTimeStamp());
}
- this.distributedSystemId = (byte)(tag.getDistributedSystemId() & 0xff);
+ this.distributedSystemId = (byte) (tag.getDistributedSystemId() & 0xff);
}
public void setMemberID(VersionSource memberID) {
- this.memberID = memberID;
+ this.memberID = memberID;
}
@Override
@@ -266,7 +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());
@@ -276,9 +272,9 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
return tag;
}
- public void processVersionTag(LocalRegion r, VersionTag tag,
- boolean isTombstoneFromGII, boolean hasDelta,
- VersionSource thisVM, InternalDistributedMember sender, boolean checkForConflicts) {
+ public void processVersionTag(LocalRegion r, VersionTag tag, boolean isTombstoneFromGII,
+ boolean hasDelta, VersionSource thisVM, InternalDistributedMember sender,
+ boolean checkForConflicts) {
basicProcessVersionTag(r, tag, isTombstoneFromGII, hasDelta, thisVM, sender, checkForConflicts);
}
@@ -293,22 +289,24 @@ public class VersionedThinRegionEntryOffHeapLongKey extends VersionedThinRegionE
public short getRegionVersionHighBytes() {
return this.regionVersionHighBytes;
}
-
+
/** get rvv internal low bytes. Used by region entries for transferring to storage */
public int getRegionVersionLowBytes() {
return this.regionVersionLowBytes;
}
-
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
// key code
private final long key;
+
@Override
public Object getKey() {
return this.key;
}
+
@Override
public boolean isKeyEqual(Object k) {
if (k instanceof Long) {
@@ -316,7 +314,7 @@ 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/5adb681a/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 0e47741..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
@@ -18,11 +18,6 @@ package org.apache.geode.internal.cache;
-
-
-
-
-
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import org.apache.geode.cache.EntryEvent;
@@ -32,7 +27,6 @@ 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;
@@ -59,7 +53,7 @@ import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.Ha
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegionEntryOffHeap {
- public VersionedThinRegionEntryOffHeapObjectKey (RegionEntryContext context, Object key,
+ public VersionedThinRegionEntryOffHeapObjectKey(RegionEntryContext context, Object key,
@Retained
@@ -67,53 +61,57 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
- ) {
- super(context,
+ ) {
+ super(context,
- value
+ 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;
@SuppressWarnings("unused")
private volatile long lastModified;
- private static final AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapObjectKey> lastModifiedUpdater
- = AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapObjectKey.class, "lastModified");
+ 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.
*/
@SuppressWarnings("unused")
- @Retained @Released private volatile long ohAddress;
+ @Retained
+ @Released
+ private volatile long ohAddress;
/**
- * I needed to add this because I wanted clear to call setValue which normally can only be called while the re is synced.
- * But if I sync in that code it causes a lock ordering deadlock with the disk regions because they also get a rw lock in clear.
- * Some hardware platforms do not support CAS on a long. If gemfire is run on one of those the AtomicLongFieldUpdater does a sync
- * on the re and we will once again be deadlocked.
- * I don't know if we support any of the hardware platforms that do not have a 64bit CAS. If we do then we can expect deadlocks
- * on disk regions.
+ * I needed to add this because I wanted clear to call setValue which normally can only be called
+ * while the re is synced. But if I sync in that code it causes a lock ordering deadlock with the
+ * disk regions because they also get a rw lock in clear. Some hardware platforms do not support
+ * CAS on a long. If gemfire is run on one of those the AtomicLongFieldUpdater does a sync on the
+ * re and we will once again be deadlocked. I don't know if we support any of the hardware
+ * platforms that do not have a 64bit CAS. If we do then we can expect deadlocks on disk regions.
*/
- private final static AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapObjectKey> ohAddrUpdater = AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapObjectKey.class, "ohAddress");
-
+ private final static AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapObjectKey> ohAddrUpdater =
+ AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapObjectKey.class,
+ "ohAddress");
+
@Override
public Token getValueAsToken() {
return OffHeapRegionEntryHelper.getValueAsToken(this);
}
-
+
@Override
protected Object getValueField() {
return OffHeapRegionEntryHelper._getValue(this);
@@ -129,6 +127,7 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
OffHeapRegionEntryHelper.setValue(this, v);
}
+
@Override
@Retained
@@ -146,7 +145,7 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
public boolean setAddress(long expectedAddr, long newAddr) {
return ohAddrUpdater.compareAndSet(this, expectedAddr, newAddr);
}
-
+
@Override
@Released
@@ -154,36 +153,41 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
public void release() {
OffHeapRegionEntryHelper.releaseEntry(this);
}
-
+
@Override
public void returnToPool() {
// Deadcoded for now; never was working
-// if (this instanceof VMThinRegionEntryLongKey) {
-// factory.returnToPool((VMThinRegionEntryLongKey)this);
-// }
+ // if (this instanceof VMThinRegionEntryLongKey) {
+ // factory.returnToPool((VMThinRegionEntryLongKey)this);
+ // }
}
protected long getLastModifiedField() {
return lastModifiedUpdater.get(this);
}
+
protected boolean compareAndSetLastModifiedField(long expectedValue, long newValue) {
return lastModifiedUpdater.compareAndSet(this, expectedValue, newValue);
}
+
/**
* @see HashEntry#getEntryHash()
*/
public int getEntryHash() {
return this.hash;
}
+
protected void setEntryHash(int v) {
this.hash = v;
}
+
/**
* @see HashEntry#getNextEntry()
*/
public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
+
/**
* @see HashEntry#setNextEntry
*/
@@ -191,14 +195,10 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
this.next = n;
}
-
-
-
-
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -210,16 +210,16 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
public int getEntryVersion() {
return ((entryVersionHighByte << 16) & 0xFF0000) | (entryVersionLowBytes & 0xFFFF);
}
-
+
public long getRegionVersion() {
- return (((long)regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
+ return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
-
-
+
+
public long getVersionTimeStamp() {
return getLastModified();
}
-
+
public void setVersionTimeStamp(long time) {
setLastModified(time);
}
@@ -227,17 +227,18 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
public VersionSource getMemberID() {
return this.memberID;
}
+
public int getDistributedSystemId() {
return this.distributedSystemId;
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
- this.entryVersionLowBytes = (short)(eVersion & 0xffff);
- this.entryVersionHighByte = (byte)((eVersion & 0xff0000) >> 16);
+ this.entryVersionLowBytes = (short) (eVersion & 0xffff);
+ this.entryVersionHighByte = (byte) ((eVersion & 0xff0000) >> 16);
this.regionVersionHighBytes = tag.getRegionVersionHighBytes();
this.regionVersionLowBytes = tag.getRegionVersionLowBytes();
if (!(tag.isGatewayTag()) && this.distributedSystemId == tag.getDistributedSystemId()) {
@@ -249,11 +250,11 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
} else {
setVersionTimeStamp(tag.getVersionTimeStamp());
}
- this.distributedSystemId = (byte)(tag.getDistributedSystemId() & 0xff);
+ this.distributedSystemId = (byte) (tag.getDistributedSystemId() & 0xff);
}
public void setMemberID(VersionSource memberID) {
- this.memberID = memberID;
+ this.memberID = memberID;
}
@Override
@@ -262,7 +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());
@@ -272,9 +273,9 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
return tag;
}
- public void processVersionTag(LocalRegion r, VersionTag tag,
- boolean isTombstoneFromGII, boolean hasDelta,
- VersionSource thisVM, InternalDistributedMember sender, boolean checkForConflicts) {
+ public void processVersionTag(LocalRegion r, VersionTag tag, boolean isTombstoneFromGII,
+ boolean hasDelta, VersionSource thisVM, InternalDistributedMember sender,
+ boolean checkForConflicts) {
basicProcessVersionTag(r, tag, isTombstoneFromGII, hasDelta, thisVM, sender, checkForConflicts);
}
@@ -289,18 +290,19 @@ public class VersionedThinRegionEntryOffHeapObjectKey extends VersionedThinRegio
public short getRegionVersionHighBytes() {
return this.regionVersionHighBytes;
}
-
+
/** get rvv internal low bytes. Used by region entries for transferring to storage */
public int getRegionVersionLowBytes() {
return this.regionVersionLowBytes;
}
-
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
// key code
private final Object key;
+
@Override
public Object getKey() {
return this.key;
http://git-wip-us.apache.org/repos/asf/geode/blob/5adb681a/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 80d07e2..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
@@ -18,11 +18,6 @@ package org.apache.geode.internal.cache;
-
-
-
-
-
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import org.apache.geode.cache.EntryEvent;
@@ -32,7 +27,6 @@ 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;
@@ -59,7 +53,7 @@ import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.Ha
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegionEntryOffHeap {
- public VersionedThinRegionEntryOffHeapStringKey1 (RegionEntryContext context, String key,
+ public VersionedThinRegionEntryOffHeapStringKey1(RegionEntryContext context, String key,
@Retained
@@ -67,27 +61,28 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
, boolean byteEncode
- ) {
- super(context,
+ ) {
+ super(context,
- value
+ 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) {
- for (int i=key.length()-1; i >= 0; i--) {
- // Note: we know each byte is <= 0x7f so the "& 0xff" is not needed. But I added it in to keep findbugs happy.
- tmpBits1 |= (byte)key.charAt(i) & 0xff;
+ for (int i = key.length() - 1; i >= 0; i--) {
+ // Note: we know each byte is <= 0x7f so the "& 0xff" is not needed. But I added it in to
+ // keep findbugs happy.
+ tmpBits1 |= (byte) key.charAt(i) & 0xff;
tmpBits1 <<= 8;
}
- tmpBits1 |= 1<<6;
+ tmpBits1 |= 1 << 6;
} else {
- for (int i=key.length()-1; i >= 0; i--) {
+ for (int i = key.length() - 1; i >= 0; i--) {
tmpBits1 |= key.charAt(i);
tmpBits1 <<= 16;
}
@@ -98,35 +93,40 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@SuppressWarnings("unused")
private volatile long lastModified;
- private static final AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapStringKey1> lastModifiedUpdater
- = AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapStringKey1.class, "lastModified");
+ 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.
*/
@SuppressWarnings("unused")
- @Retained @Released private volatile long ohAddress;
+ @Retained
+ @Released
+ private volatile long ohAddress;
/**
- * I needed to add this because I wanted clear to call setValue which normally can only be called while the re is synced.
- * But if I sync in that code it causes a lock ordering deadlock with the disk regions because they also get a rw lock in clear.
- * Some hardware platforms do not support CAS on a long. If gemfire is run on one of those the AtomicLongFieldUpdater does a sync
- * on the re and we will once again be deadlocked.
- * I don't know if we support any of the hardware platforms that do not have a 64bit CAS. If we do then we can expect deadlocks
- * on disk regions.
+ * I needed to add this because I wanted clear to call setValue which normally can only be called
+ * while the re is synced. But if I sync in that code it causes a lock ordering deadlock with the
+ * disk regions because they also get a rw lock in clear. Some hardware platforms do not support
+ * CAS on a long. If gemfire is run on one of those the AtomicLongFieldUpdater does a sync on the
+ * re and we will once again be deadlocked. I don't know if we support any of the hardware
+ * platforms that do not have a 64bit CAS. If we do then we can expect deadlocks on disk regions.
*/
- private final static AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapStringKey1> ohAddrUpdater = AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapStringKey1.class, "ohAddress");
-
+ private final static AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapStringKey1> ohAddrUpdater =
+ AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapStringKey1.class,
+ "ohAddress");
+
@Override
public Token getValueAsToken() {
return OffHeapRegionEntryHelper.getValueAsToken(this);
}
-
+
@Override
protected Object getValueField() {
return OffHeapRegionEntryHelper._getValue(this);
@@ -142,6 +142,7 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
OffHeapRegionEntryHelper.setValue(this, v);
}
+
@Override
@Retained
@@ -159,7 +160,7 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
public boolean setAddress(long expectedAddr, long newAddr) {
return ohAddrUpdater.compareAndSet(this, expectedAddr, newAddr);
}
-
+
@Override
@Released
@@ -167,36 +168,41 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
public void release() {
OffHeapRegionEntryHelper.releaseEntry(this);
}
-
+
@Override
public void returnToPool() {
// Deadcoded for now; never was working
-// if (this instanceof VMThinRegionEntryLongKey) {
-// factory.returnToPool((VMThinRegionEntryLongKey)this);
-// }
+ // if (this instanceof VMThinRegionEntryLongKey) {
+ // factory.returnToPool((VMThinRegionEntryLongKey)this);
+ // }
}
protected long getLastModifiedField() {
return lastModifiedUpdater.get(this);
}
+
protected boolean compareAndSetLastModifiedField(long expectedValue, long newValue) {
return lastModifiedUpdater.compareAndSet(this, expectedValue, newValue);
}
+
/**
* @see HashEntry#getEntryHash()
*/
public int getEntryHash() {
return this.hash;
}
+
protected void setEntryHash(int v) {
this.hash = v;
}
+
/**
* @see HashEntry#getNextEntry()
*/
public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
+
/**
* @see HashEntry#setNextEntry
*/
@@ -204,14 +210,10 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
this.next = n;
}
-
-
-
-
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -223,16 +225,16 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
public int getEntryVersion() {
return ((entryVersionHighByte << 16) & 0xFF0000) | (entryVersionLowBytes & 0xFFFF);
}
-
+
public long getRegionVersion() {
- return (((long)regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
+ return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
-
-
+
+
public long getVersionTimeStamp() {
return getLastModified();
}
-
+
public void setVersionTimeStamp(long time) {
setLastModified(time);
}
@@ -240,17 +242,18 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
public VersionSource getMemberID() {
return this.memberID;
}
+
public int getDistributedSystemId() {
return this.distributedSystemId;
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
- this.entryVersionLowBytes = (short)(eVersion & 0xffff);
- this.entryVersionHighByte = (byte)((eVersion & 0xff0000) >> 16);
+ this.entryVersionLowBytes = (short) (eVersion & 0xffff);
+ this.entryVersionHighByte = (byte) ((eVersion & 0xff0000) >> 16);
this.regionVersionHighBytes = tag.getRegionVersionHighBytes();
this.regionVersionLowBytes = tag.getRegionVersionLowBytes();
if (!(tag.isGatewayTag()) && this.distributedSystemId == tag.getDistributedSystemId()) {
@@ -262,11 +265,11 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
} else {
setVersionTimeStamp(tag.getVersionTimeStamp());
}
- this.distributedSystemId = (byte)(tag.getDistributedSystemId() & 0xff);
+ this.distributedSystemId = (byte) (tag.getDistributedSystemId() & 0xff);
}
public void setMemberID(VersionSource memberID) {
- this.memberID = memberID;
+ this.memberID = memberID;
}
@Override
@@ -275,7 +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());
@@ -285,9 +288,9 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
return tag;
}
- public void processVersionTag(LocalRegion r, VersionTag tag,
- boolean isTombstoneFromGII, boolean hasDelta,
- VersionSource thisVM, InternalDistributedMember sender, boolean checkForConflicts) {
+ public void processVersionTag(LocalRegion r, VersionTag tag, boolean isTombstoneFromGII,
+ boolean hasDelta, VersionSource thisVM, InternalDistributedMember sender,
+ boolean checkForConflicts) {
basicProcessVersionTag(r, tag, isTombstoneFromGII, hasDelta, thisVM, sender, checkForConflicts);
}
@@ -302,38 +305,41 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
public short getRegionVersionHighBytes() {
return this.regionVersionHighBytes;
}
-
+
/** get rvv internal low bytes. Used by region entries for transferring to storage */
public int getRegionVersionLowBytes() {
return this.regionVersionLowBytes;
}
-
+
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
// key code
private final long bits1;
+
private int getKeyLength() {
return (int) (this.bits1 & 0x003fL);
}
+
private int getEncoding() {
// 0 means encoded as char
// 1 means encoded as bytes that are all <= 0x7f;
return (int) (this.bits1 >> 6) & 0x03;
}
+
@Override
public Object getKey() {
int keylen = getKeyLength();
char[] chars = new char[keylen];
long tmpBits1 = this.bits1;
if (getEncoding() == 1) {
- for (int i=0; i < keylen; i++) {
+ for (int i = 0; i < keylen; i++) {
tmpBits1 >>= 8;
- chars[i] = (char) (tmpBits1 & 0x00ff);
+ chars[i] = (char) (tmpBits1 & 0x00ff);
}
} else {
- for (int i=0; i < keylen; i++) {
+ for (int i = 0; i < keylen; i++) {
tmpBits1 >>= 16;
chars[i] = (char) (tmpBits1 & 0x00FFff);
}
@@ -342,16 +348,16 @@ 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) {
- String str = (String)k;
+ String str = (String) k;
int keylen = getKeyLength();
if (str.length() == keylen) {
long tmpBits1 = this.bits1;
if (getEncoding() == 1) {
- for (int i=0; i < keylen; i++) {
+ for (int i = 0; i < keylen; i++) {
tmpBits1 >>= 8;
char c = (char) (tmpBits1 & 0x00ff);
if (str.charAt(i) != c) {
@@ -359,7 +365,7 @@ public class VersionedThinRegionEntryOffHeapStringKey1 extends VersionedThinRegi
}
}
} else {
- for (int i=0; i < keylen; i++) {
+ for (int i = 0; i < keylen; i++) {
tmpBits1 >>= 16;
char c = (char) (tmpBits1 & 0x00FFff);
if (str.charAt(i) != c) {
@@ -372,7 +378,7 @@ 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/5adb681a/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 dbf7f1f..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
@@ -18,11 +18,6 @@ package org.apache.geode.internal.cache;
-
-
-
-
-
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import org.apache.geode.cache.EntryEvent;
@@ -32,7 +27,6 @@ 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;
@@ -59,7 +53,7 @@ import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.Ha
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegionEntryOffHeap {
- public VersionedThinRegionEntryOffHeapStringKey2 (RegionEntryContext context, String key,
+ public VersionedThinRegionEntryOffHeapStringKey2(RegionEntryContext context, String key,
@Retained
@@ -67,33 +61,34 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
, boolean byteEncode
- ) {
- super(context,
+ ) {
+ super(context,
- value
+ 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;
if (byteEncode) {
- for (int i=key.length()-1; i >= 0; i--) {
- // Note: we know each byte is <= 0x7f so the "& 0xff" is not needed. But I added it in to keep findbugs happy.
+ for (int i = key.length() - 1; i >= 0; i--) {
+ // Note: we know each byte is <= 0x7f so the "& 0xff" is not needed. But I added it in to
+ // keep findbugs happy.
if (i < 7) {
- tmpBits1 |= (byte)key.charAt(i) & 0xff;
+ tmpBits1 |= (byte) key.charAt(i) & 0xff;
tmpBits1 <<= 8;
} else {
tmpBits2 <<= 8;
- tmpBits2 |= (byte)key.charAt(i) & 0xff;
+ tmpBits2 |= (byte) key.charAt(i) & 0xff;
}
}
- tmpBits1 |= 1<<6;
+ tmpBits1 |= 1 << 6;
} else {
- for (int i=key.length()-1; i >= 0; i--) {
+ for (int i = key.length() - 1; i >= 0; i--) {
if (i < 3) {
tmpBits1 |= key.charAt(i);
tmpBits1 <<= 16;
@@ -110,35 +105,40 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@SuppressWarnings("unused")
private volatile long lastModified;
- private static final AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapStringKey2> lastModifiedUpdater
- = AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapStringKey2.class, "lastModified");
+ 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.
*/
@SuppressWarnings("unused")
- @Retained @Released private volatile long ohAddress;
+ @Retained
+ @Released
+ private volatile long ohAddress;
/**
- * I needed to add this because I wanted clear to call setValue which normally can only be called while the re is synced.
- * But if I sync in that code it causes a lock ordering deadlock with the disk regions because they also get a rw lock in clear.
- * Some hardware platforms do not support CAS on a long. If gemfire is run on one of those the AtomicLongFieldUpdater does a sync
- * on the re and we will once again be deadlocked.
- * I don't know if we support any of the hardware platforms that do not have a 64bit CAS. If we do then we can expect deadlocks
- * on disk regions.
+ * I needed to add this because I wanted clear to call setValue which normally can only be called
+ * while the re is synced. But if I sync in that code it causes a lock ordering deadlock with the
+ * disk regions because they also get a rw lock in clear. Some hardware platforms do not support
+ * CAS on a long. If gemfire is run on one of those the AtomicLongFieldUpdater does a sync on the
+ * re and we will once again be deadlocked. I don't know if we support any of the hardware
+ * platforms that do not have a 64bit CAS. If we do then we can expect deadlocks on disk regions.
*/
- private final static AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapStringKey2> ohAddrUpdater = AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapStringKey2.class, "ohAddress");
-
+ private final static AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapStringKey2> ohAddrUpdater =
+ AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapStringKey2.class,
+ "ohAddress");
+
@Override
public Token getValueAsToken() {
return OffHeapRegionEntryHelper.getValueAsToken(this);
}
-
+
@Override
protected Object getValueField() {
return OffHeapRegionEntryHelper._getValue(this);
@@ -154,6 +154,7 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
OffHeapRegionEntryHelper.setValue(this, v);
}
+
@Override
@Retained
@@ -171,7 +172,7 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
public boolean setAddress(long expectedAddr, long newAddr) {
return ohAddrUpdater.compareAndSet(this, expectedAddr, newAddr);
}
-
+
@Override
@Released
@@ -179,36 +180,41 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
public void release() {
OffHeapRegionEntryHelper.releaseEntry(this);
}
-
+
@Override
public void returnToPool() {
// Deadcoded for now; never was working
-// if (this instanceof VMThinRegionEntryLongKey) {
-// factory.returnToPool((VMThinRegionEntryLongKey)this);
-// }
+ // if (this instanceof VMThinRegionEntryLongKey) {
+ // factory.returnToPool((VMThinRegionEntryLongKey)this);
+ // }
}
protected long getLastModifiedField() {
return lastModifiedUpdater.get(this);
}
+
protected boolean compareAndSetLastModifiedField(long expectedValue, long newValue) {
return lastModifiedUpdater.compareAndSet(this, expectedValue, newValue);
}
+
/**
* @see HashEntry#getEntryHash()
*/
public int getEntryHash() {
return this.hash;
}
+
protected void setEntryHash(int v) {
this.hash = v;
}
+
/**
* @see HashEntry#getNextEntry()
*/
public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
+
/**
* @see HashEntry#setNextEntry
*/
@@ -216,14 +222,10 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
this.next = n;
}
-
-
-
-
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -235,16 +237,16 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
public int getEntryVersion() {
return ((entryVersionHighByte << 16) & 0xFF0000) | (entryVersionLowBytes & 0xFFFF);
}
-
+
public long getRegionVersion() {
- return (((long)regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
+ return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
-
-
+
+
public long getVersionTimeStamp() {
return getLastModified();
}
-
+
public void setVersionTimeStamp(long time) {
setLastModified(time);
}
@@ -252,17 +254,18 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
public VersionSource getMemberID() {
return this.memberID;
}
+
public int getDistributedSystemId() {
return this.distributedSystemId;
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
- this.entryVersionLowBytes = (short)(eVersion & 0xffff);
- this.entryVersionHighByte = (byte)((eVersion & 0xff0000) >> 16);
+ this.entryVersionLowBytes = (short) (eVersion & 0xffff);
+ this.entryVersionHighByte = (byte) ((eVersion & 0xff0000) >> 16);
this.regionVersionHighBytes = tag.getRegionVersionHighBytes();
this.regionVersionLowBytes = tag.getRegionVersionLowBytes();
if (!(tag.isGatewayTag()) && this.distributedSystemId == tag.getDistributedSystemId()) {
@@ -274,11 +277,11 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
} else {
setVersionTimeStamp(tag.getVersionTimeStamp());
}
- this.distributedSystemId = (byte)(tag.getDistributedSystemId() & 0xff);
+ this.distributedSystemId = (byte) (tag.getDistributedSystemId() & 0xff);
}
public void setMemberID(VersionSource memberID) {
- this.memberID = memberID;
+ this.memberID = memberID;
}
@Override
@@ -287,7 +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());
@@ -297,9 +300,9 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
return tag;
}
- public void processVersionTag(LocalRegion r, VersionTag tag,
- boolean isTombstoneFromGII, boolean hasDelta,
- VersionSource thisVM, InternalDistributedMember sender, boolean checkForConflicts) {
+ public void processVersionTag(LocalRegion r, VersionTag tag, boolean isTombstoneFromGII,
+ boolean hasDelta, VersionSource thisVM, InternalDistributedMember sender,
+ boolean checkForConflicts) {
basicProcessVersionTag(r, tag, isTombstoneFromGII, hasDelta, thisVM, sender, checkForConflicts);
}
@@ -314,15 +317,15 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
public short getRegionVersionHighBytes() {
return this.regionVersionHighBytes;
}
-
+
/** get rvv internal low bytes. Used by region entries for transferring to storage */
public int getRegionVersionLowBytes() {
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)
@@ -331,14 +334,17 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
private final long bits1;
// bits2 encodes character data
private final long bits2;
+
private int getKeyLength() {
return (int) (this.bits1 & 0x003fL);
}
+
private int getEncoding() {
// 0 means encoded as char
// 1 means encoded as bytes that are all <= 0x7f;
return (int) (this.bits1 >> 6) & 0x03;
}
+
@Override
public Object getKey() {
int keylen = getKeyLength();
@@ -346,7 +352,7 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
long tmpBits1 = this.bits1;
long tmpBits2 = this.bits2;
if (getEncoding() == 1) {
- for (int i=0; i < keylen; i++) {
+ for (int i = 0; i < keylen; i++) {
if (i < 7) {
tmpBits1 >>= 8;
chars[i] = (char) (tmpBits1 & 0x00ff);
@@ -356,10 +362,10 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
}
}
} else {
- for (int i=0; i < keylen; i++) {
+ for (int i = 0; i < keylen; i++) {
if (i < 3) {
tmpBits1 >>= 16;
- chars[i] = (char) (tmpBits1 & 0x00FFff);
+ chars[i] = (char) (tmpBits1 & 0x00FFff);
} else {
chars[i] = (char) (tmpBits2 & 0x00FFff);
tmpBits2 >>= 16;
@@ -370,17 +376,17 @@ 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) {
- String str = (String)k;
+ String str = (String) k;
int keylen = getKeyLength();
if (str.length() == keylen) {
long tmpBits1 = this.bits1;
long tmpBits2 = this.bits2;
if (getEncoding() == 1) {
- for (int i=0; i < keylen; i++) {
+ for (int i = 0; i < keylen; i++) {
char c;
if (i < 7) {
tmpBits1 >>= 8;
@@ -394,7 +400,7 @@ public class VersionedThinRegionEntryOffHeapStringKey2 extends VersionedThinRegi
}
}
} else {
- for (int i=0; i < keylen; i++) {
+ for (int i = 0; i < keylen; i++) {
char c;
if (i < 3) {
tmpBits1 >>= 16;
http://git-wip-us.apache.org/repos/asf/geode/blob/5adb681a/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 0f255d9..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
@@ -20,9 +20,6 @@ package org.apache.geode.internal.cache;
import java.util.UUID;
-
-
-
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import org.apache.geode.cache.EntryEvent;
@@ -32,7 +29,6 @@ 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;
@@ -59,7 +55,7 @@ import org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.Ha
* ./dev-tools/generateRegionEntryClasses.sh (it must be run from the top level directory).
*/
public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionEntryOffHeap {
- public VersionedThinRegionEntryOffHeapUUIDKey (RegionEntryContext context, UUID key,
+ public VersionedThinRegionEntryOffHeapUUIDKey(RegionEntryContext context, UUID key,
@Retained
@@ -67,14 +63,14 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
- ) {
- super(context,
+ ) {
+ super(context,
- value
+ value
- );
+ );
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
this.keyMostSigBits = key.getMostSignificantBits();
@@ -83,35 +79,39 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
// common code
protected int hash;
private HashEntry<Object, Object> next;
@SuppressWarnings("unused")
private volatile long lastModified;
- private static final AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapUUIDKey> lastModifiedUpdater
- = AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapUUIDKey.class, "lastModified");
+ 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.
*/
@SuppressWarnings("unused")
- @Retained @Released private volatile long ohAddress;
+ @Retained
+ @Released
+ private volatile long ohAddress;
/**
- * I needed to add this because I wanted clear to call setValue which normally can only be called while the re is synced.
- * But if I sync in that code it causes a lock ordering deadlock with the disk regions because they also get a rw lock in clear.
- * Some hardware platforms do not support CAS on a long. If gemfire is run on one of those the AtomicLongFieldUpdater does a sync
- * on the re and we will once again be deadlocked.
- * I don't know if we support any of the hardware platforms that do not have a 64bit CAS. If we do then we can expect deadlocks
- * on disk regions.
+ * I needed to add this because I wanted clear to call setValue which normally can only be called
+ * while the re is synced. But if I sync in that code it causes a lock ordering deadlock with the
+ * disk regions because they also get a rw lock in clear. Some hardware platforms do not support
+ * CAS on a long. If gemfire is run on one of those the AtomicLongFieldUpdater does a sync on the
+ * re and we will once again be deadlocked. I don't know if we support any of the hardware
+ * platforms that do not have a 64bit CAS. If we do then we can expect deadlocks on disk regions.
*/
- private final static AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapUUIDKey> ohAddrUpdater = AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapUUIDKey.class, "ohAddress");
-
+ private final static AtomicLongFieldUpdater<VersionedThinRegionEntryOffHeapUUIDKey> ohAddrUpdater =
+ AtomicLongFieldUpdater.newUpdater(VersionedThinRegionEntryOffHeapUUIDKey.class, "ohAddress");
+
@Override
public Token getValueAsToken() {
return OffHeapRegionEntryHelper.getValueAsToken(this);
}
-
+
@Override
protected Object getValueField() {
return OffHeapRegionEntryHelper._getValue(this);
@@ -127,6 +127,7 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
OffHeapRegionEntryHelper.setValue(this, v);
}
+
@Override
@Retained
@@ -144,7 +145,7 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
public boolean setAddress(long expectedAddr, long newAddr) {
return ohAddrUpdater.compareAndSet(this, expectedAddr, newAddr);
}
-
+
@Override
@Released
@@ -152,36 +153,41 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
public void release() {
OffHeapRegionEntryHelper.releaseEntry(this);
}
-
+
@Override
public void returnToPool() {
// Deadcoded for now; never was working
-// if (this instanceof VMThinRegionEntryLongKey) {
-// factory.returnToPool((VMThinRegionEntryLongKey)this);
-// }
+ // if (this instanceof VMThinRegionEntryLongKey) {
+ // factory.returnToPool((VMThinRegionEntryLongKey)this);
+ // }
}
protected long getLastModifiedField() {
return lastModifiedUpdater.get(this);
}
+
protected boolean compareAndSetLastModifiedField(long expectedValue, long newValue) {
return lastModifiedUpdater.compareAndSet(this, expectedValue, newValue);
}
+
/**
* @see HashEntry#getEntryHash()
*/
public int getEntryHash() {
return this.hash;
}
+
protected void setEntryHash(int v) {
this.hash = v;
}
+
/**
* @see HashEntry#getNextEntry()
*/
public HashEntry<Object, Object> getNextEntry() {
return this.next;
}
+
/**
* @see HashEntry#setNextEntry
*/
@@ -189,14 +195,10 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
this.next = n;
}
-
-
-
-
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
// versioned code
private VersionSource memberID;
private short entryVersionLowBytes;
@@ -208,16 +210,16 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
public int getEntryVersion() {
return ((entryVersionHighByte << 16) & 0xFF0000) | (entryVersionLowBytes & 0xFFFF);
}
-
+
public long getRegionVersion() {
- return (((long)regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
+ return (((long) regionVersionHighBytes) << 32) | (regionVersionLowBytes & 0x00000000FFFFFFFFL);
}
-
-
+
+
public long getVersionTimeStamp() {
return getLastModified();
}
-
+
public void setVersionTimeStamp(long time) {
setLastModified(time);
}
@@ -225,17 +227,18 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
public VersionSource getMemberID() {
return this.memberID;
}
+
public int getDistributedSystemId() {
return this.distributedSystemId;
}
// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
-
+
public void setVersions(VersionTag tag) {
this.memberID = tag.getMemberID();
int eVersion = tag.getEntryVersion();
- this.entryVersionLowBytes = (short)(eVersion & 0xffff);
- this.entryVersionHighByte = (byte)((eVersion & 0xff0000) >> 16);
+ this.entryVersionLowBytes = (short) (eVersion & 0xffff);
+ this.entryVersionHighByte = (byte) ((eVersion & 0xff0000) >> 16);
this.regionVersionHighBytes = tag.getRegionVersionHighBytes();
this.regionVersionLowBytes = tag.getRegionVersionLowBytes();
if (!(tag.isGatewayTag()) && this.distributedSystemId == tag.getDistributedSystemId()) {
@@ -247,11 +250,11 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
} else {
setVersionTimeStamp(tag.getVersionTimeStamp());
}
- this.distributedSystemId = (byte)(tag.getDistributedSystemId() & 0xff);
+ this.distributedSystemId = (byte) (tag.getDistributedSystemId() & 0xff);
}
public void setMemberID(VersionSource memberID) {
- this.memberID = memberID;
+ this.memberID = memberID;
}
@Override
@@ -260,7 +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());
@@ -270,9 +273,9 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
return tag;
}
- public void processVersionTag(LocalRegion r, VersionTag tag,
- boolean isTombstoneFromGII, boolean hasDelta,
- VersionSource thisVM, InternalDistributedMember sender, boolean checkForConflicts) {
+ public void processVersionTag(LocalRegion r, VersionTag tag, boolean isTombstoneFromGII,
+ boolean hasDelta, VersionSource thisVM, InternalDistributedMember sender,
+ boolean checkForConflicts) {
basicProcessVersionTag(r, tag, isTombstoneFromGII, hasDelta, thisVM, sender, checkForConflicts);
}
@@ -287,23 +290,25 @@ public class VersionedThinRegionEntryOffHeapUUIDKey extends VersionedThinRegionE
public short getRegionVersionHighBytes() {
return this.regionVersionHighBytes;
}
-
+
/** get rvv internal low bytes. Used by region entries for transferring to storage */
public int getRegionVersionLowBytes() {
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 Object getKey() {
return new UUID(this.keyMostSigBits, this.keyLeastSigBits);
}
+
@Override
public boolean isKeyEqual(Object k) {
if (k instanceof UUID) {
@@ -313,7 +318,7 @@ 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/5adb681a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java
index af1d6f9..64b2284 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java
@@ -116,8 +116,7 @@ public abstract class AbstractExecution implements InternalExecution {
public static final byte HA_HASRESULT_OPTIMIZEFORWRITE_REEXECUTE = 15;
- public static byte getFunctionState(boolean isHA, boolean hasResult,
- boolean optimizeForWrite) {
+ public static byte getFunctionState(boolean isHA, boolean hasResult, boolean optimizeForWrite) {
if (isHA) {
if (hasResult) {
if (optimizeForWrite) {
http://git-wip-us.apache.org/repos/asf/geode/blob/5adb681a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/BecomePrimaryBucketMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/BecomePrimaryBucketMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/BecomePrimaryBucketMessage.java
index e4fefbb..b5de2e8 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/BecomePrimaryBucketMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/BecomePrimaryBucketMessage.java
@@ -113,8 +113,8 @@ public class BecomePrimaryBucketMessage extends PartitionMessage {
}
@Override
- protected boolean operateOnPartitionedRegion(DistributionManager dm,
- PartitionedRegion region, long startTime) throws ForceReattemptException {
+ protected boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion region,
+ long startTime) throws ForceReattemptException {
// this is executing in the WAITING_POOL_EXECUTOR
byte responseCode = BecomePrimaryBucketReplyMessage.NOT_SECONDARY;
http://git-wip-us.apache.org/repos/asf/geode/blob/5adb681a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/EndBucketCreationMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/EndBucketCreationMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/EndBucketCreationMessage.java
index 7e412c0..355c3b5 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/EndBucketCreationMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/EndBucketCreationMessage.java
@@ -90,8 +90,8 @@ public class EndBucketCreationMessage extends PartitionMessage {
}
@Override
- protected boolean operateOnPartitionedRegion(DistributionManager dm,
- PartitionedRegion region, long startTime) throws ForceReattemptException {
+ protected boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion region,
+ long startTime) throws ForceReattemptException {
// this is executing in the WAITING_POOL_EXECUTOR
http://git-wip-us.apache.org/repos/asf/geode/blob/5adb681a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/GetMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/GetMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/GetMessage.java
index c121535..d0cd938 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/GetMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/GetMessage.java
@@ -145,8 +145,8 @@ public class GetMessage extends PartitionMessageWithDirectReply {
}
@Override
- protected final boolean operateOnPartitionedRegion(final DistributionManager dm,
- PartitionedRegion r, long startTime) throws ForceReattemptException {
+ protected boolean operateOnPartitionedRegion(final DistributionManager dm, PartitionedRegion r,
+ long startTime) throws ForceReattemptException {
if (logger.isTraceEnabled(LogMarker.DM)) {
logger.trace(LogMarker.DM, "GetMessage operateOnRegion: {}", r.getFullPath());
}
http://git-wip-us.apache.org/repos/asf/geode/blob/5adb681a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/IndexCreationMsg.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/IndexCreationMsg.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/IndexCreationMsg.java
index 8ce3a47..dc76652 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/IndexCreationMsg.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/IndexCreationMsg.java
@@ -179,7 +179,7 @@ public class IndexCreationMsg extends PartitionMessage {
* Process this index creation message on the receiver.
*/
@Override
- public final void process(final DistributionManager dm) {
+ public void process(final DistributionManager dm) {
final boolean isDebugEnabled = logger.isDebugEnabled();
http://git-wip-us.apache.org/repos/asf/geode/blob/5adb681a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/InterestEventMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/InterestEventMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/InterestEventMessage.java
index 7bccf5b..227c74e 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/InterestEventMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/InterestEventMessage.java
@@ -68,8 +68,8 @@ public class InterestEventMessage extends PartitionMessage {
}
@Override
- protected boolean operateOnPartitionedRegion(final DistributionManager dm,
- PartitionedRegion r, long startTime) throws ForceReattemptException {
+ protected boolean operateOnPartitionedRegion(final DistributionManager dm, PartitionedRegion r,
+ long startTime) throws ForceReattemptException {
if (logger.isTraceEnabled(LogMarker.DM)) {
logger.debug("InterestEventMessage operateOnPartitionedRegion: {}", r.getFullPath());
}
http://git-wip-us.apache.org/repos/asf/geode/blob/5adb681a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRTombstoneMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRTombstoneMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRTombstoneMessage.java
index 35e36b9..0e27621 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRTombstoneMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRTombstoneMessage.java
@@ -93,8 +93,8 @@ public class PRTombstoneMessage extends PartitionMessageWithDirectReply
}
@Override
- protected boolean operateOnPartitionedRegion(final DistributionManager dm,
- PartitionedRegion r, long startTime) throws ForceReattemptException {
+ protected boolean operateOnPartitionedRegion(final DistributionManager dm, PartitionedRegion r,
+ long startTime) throws ForceReattemptException {
if (logger.isTraceEnabled(LogMarker.DM)) {
logger.debug("PRTombstoneMessage operateOnRegion: {}", r.getFullPath());
}
http://git-wip-us.apache.org/repos/asf/geode/blob/5adb681a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderQueue.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderQueue.java
index 67f38f9..6fa17a4 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderQueue.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderQueue.java
@@ -1201,12 +1201,12 @@ public class SerialGatewaySenderQueue implements RegionQueue {
}
@Override
- final public boolean isUsedForSerialGatewaySenderQueue() {
+ public boolean isUsedForSerialGatewaySenderQueue() {
return true;
}
@Override
- final public AbstractGatewaySender getSerialGatewaySender() {
+ public AbstractGatewaySender getSerialGatewaySender() {
return sender;
}
http://git-wip-us.apache.org/repos/asf/geode/blob/5adb681a/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java
index 7a9fe8e..95e8308 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java
@@ -249,8 +249,7 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
* Creates or finds a StatisticType for the given shared class.
*/
@Override
- public StatisticsType createType(String name, String description,
- StatisticDescriptor[] stats) {
+ public StatisticsType createType(String name, String description, StatisticDescriptor[] stats) {
return tf.createType(name, description, stats);
}
@@ -270,14 +269,12 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
}
@Override
- public StatisticDescriptor createLongCounter(String name, String description,
- String units) {
+ public StatisticDescriptor createLongCounter(String name, String description, String units) {
return tf.createLongCounter(name, description, units);
}
@Override
- public StatisticDescriptor createDoubleCounter(String name, String description,
- String units) {
+ public StatisticDescriptor createDoubleCounter(String name, String description, String units) {
return tf.createDoubleCounter(name, description, units);
}
@@ -292,8 +289,7 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
}
@Override
- public StatisticDescriptor createDoubleGauge(String name, String description,
- String units) {
+ public StatisticDescriptor createDoubleGauge(String name, String description, String units) {
return tf.createDoubleGauge(name, description, units);
}
@@ -310,8 +306,8 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
}
@Override
- public StatisticDescriptor createDoubleCounter(String name, String description,
- String units, boolean largerBetter) {
+ public StatisticDescriptor createDoubleCounter(String name, String description, String units,
+ boolean largerBetter) {
return tf.createDoubleCounter(name, description, units, largerBetter);
}