You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2016/02/18 00:10:36 UTC

[01/33] incubator-geode git commit: Changing the line delimters from windows to linux.

Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-831 95e23f0b6 -> 607d041de


Changing the line delimters from windows to linux.


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

Branch: refs/heads/feature/GEODE-831
Commit: 401280d73e84d9f74a7ad555e0b201b18429a720
Parents: dec5ee2
Author: Anil <ag...@pivotal.io>
Authored: Wed Feb 10 16:45:26 2016 -0800
Committer: Anil <ag...@pivotal.io>
Committed: Wed Feb 10 16:46:23 2016 -0800

----------------------------------------------------------------------
 .../query/internal/index/IndexElemArray.java    | 666 +++++++++----------
 1 file changed, 333 insertions(+), 333 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/401280d7/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArray.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArray.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArray.java
index 615d927..b94f975 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArray.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArray.java
@@ -1,333 +1,333 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.cache.query.internal.index;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-/**
- * A wrapper around an object array for storing values in index data structure
- * with minimal set of operations supported and the maximum size of 128 elements  
- * 
- * @author Tejas Nomulwar
- * @since 7.0
- */
-public class IndexElemArray implements Iterable, Collection {
-
-  private Object[] elementData;
-  private volatile byte size;
-
-  public IndexElemArray(int initialCapacity) {
-    if (initialCapacity < 0) {
-      throw new IllegalArgumentException("Illegal Capacity: " + initialCapacity);
-    }
-    this.elementData = new Object[initialCapacity];
-  }
-
-  /**
-   * Constructs an empty list with an initial capacity of ten.
-   */
-  public IndexElemArray() {
-    this(IndexManager.INDEX_ELEMARRAY_SIZE);
-  }
-
-  /**
-   * Increases the capacity of this <tt>ArrayList</tt> instance, if necessary,
-   * to ensure that it can hold at least the number of elements specified by the
-   * minimum capacity argument.
-   * 
-   * @param minCapacity
-   *          the desired minimum capacity
-   */
-  private void ensureCapacity(int minCapacity) {
-    int oldCapacity = elementData.length;
-    if (minCapacity > oldCapacity) {
-      int newCapacity = oldCapacity + 5;
-      if (newCapacity < minCapacity) {
-        newCapacity = minCapacity;
-      }
-      // minCapacity is usually close to size, so this is a win:
-      Object[] newElementData = new Object[newCapacity];
-      System.arraycopy(this.elementData, 0, newElementData, 0,
-          this.elementData.length);
-      elementData = newElementData;
-    }
-  }
-
-  /**
-   * Returns the number of elements in this list. (Warning: May not return
-   * correct size always, as remove operation is not atomic)
-   * 
-   * @return the number of elements in this list
-   */
-  public int size() {
-    return size;
-  }
-
-  /**
-   * Returns <tt>true</tt> if this list contains no elements.
-   * 
-   * @return <tt>true</tt> if this list contains no elements
-   */
-  public boolean isEmpty() {
-    return size == 0;
-  }
-
-  /**
-   * Returns <tt>true</tt> if this list contains the specified element. More
-   * formally, returns <tt>true</tt> if and only if this list contains at least
-   * one element <tt>e</tt> such that
-   * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.
-   * 
-   * @param o
-   *          element whose presence in this list is to be tested
-   * @return <tt>true</tt> if this list contains the specified element
-   */
-  public boolean contains(Object o) {
-    return indexOf(o) >= 0;
-  }
-
-  /**
-   * Returns the index of the first occurrence of the specified element in this
-   * list, or -1 if this list does not contain the element. More formally,
-   * returns the lowest index <tt>i</tt> such that
-   * <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>,
-   * or -1 if there is no such index.
-   */
-  public int indexOf(Object o) {
-    if (o == null) {
-      for (int i = 0; i < size; i++)
-        if (elementData[i] == null)
-          return i;
-    } else {
-      for (int i = 0; i < size; i++)
-        if (o.equals(elementData[i]))
-          return i;
-    }
-    return -1;
-  }
-
-  /**
-   * Returns the element at the specified position in this list.
-   * 
-   * @param index
-   *          index of the element to return
-   * @return the element at the specified position in this list
-   * @throws IndexOutOfBoundsException
-   *          
-   */
-  public Object get(int index) {
-    RangeCheck(index);
-    return elementData[index];
-  }
-
-  /**
-   * Replaces the element at the specified position in this list with the
-   * specified element.
-   * 
-   * @param index
-   *          index of the element to replace
-   * @param element
-   *          element to be stored at the specified position
-   * @return the element previously at the specified position
-   * @throws IndexOutOfBoundsException
-   *           
-   */
-  public Object set(int index, Object element) {
-    RangeCheck(index);
-
-    Object oldValue = (Object) elementData[index];
-    elementData[index] = element;
-    return oldValue;
-  }
-
-  /**
-   * Appends the specified element to the end of this array.
-   * If the array is full, creates a new array with 
-   * new capacity = old capacity + 5
-   * 
-   * @param e
-   *          element to be appended to this list
-   * @return <tt>true</tt> (as specified by {@link Collection#add})
-   * @throws ArrayIndexOutOfBoundsException
-   */
-  public synchronized boolean add(Object e) {
-    ensureCapacity(size + 1);
-    elementData[size] = e;
-    ++size;
-    return true;
-  }
-
-  /**
-   * Removes the first occurrence of the specified element from this list, if it
-   * is present. If the list does not contain the element, it is unchanged. More
-   * formally, removes the element with the lowest index <tt>i</tt> such that
-   * <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>
-   * (if such an element exists). Returns <tt>true</tt> if this list contained
-   * the specified element (or equivalently, if this list changed as a result of
-   * the call).
-   * 
-   * @param o
-   *          element to be removed from this list, if present
-   * @return <tt>true</tt> if this list contained the specified element
-   */
-  public synchronized boolean remove(Object o) {
-    if (o == null) {
-      for (int index = 0; index < size; index++)
-        if (elementData[index] == null) {
-          fastRemove(index);
-          return true;
-        }
-    } else {
-      for (int index = 0; index < size; index++)
-        if (o.equals(elementData[index])) {
-          fastRemove(index);
-          return true;
-        }
-    }
-    return false;
-  }
-
-  /*
-   * Private remove method that skips bounds checking and does not return the
-   * value removed.
-   */
-  private void fastRemove(int index) {
-    int len = elementData.length;
-    Object[] newArray = new Object[len - 1];
-    System.arraycopy(elementData, 0, newArray, 0, index);
-    int numMoved = len - index - 1;
-    if (numMoved > 0)
-      System.arraycopy(elementData, index + 1, newArray, index, numMoved);
-    elementData = newArray;
-    --size;
-  }
-
-  /**
-   * Removes all of the elements from this list. The list will be empty after
-   * this call returns.
-   */
-  public void clear() {
-    // Let gc do its work
-    for (int i = 0; i < size; i++) {
-      elementData[i] = null;
-    }
-    size = 0;
-  }
-
-  /**
-   * Checks if the given index is in range. If not, throws an appropriate
-   * runtime exception. This method does *not* check if the index is negative:
-   * It is always used immediately prior to an array access, which throws an
-   * ArrayIndexOutOfBoundsException if index is negative.
-   */
-  private void RangeCheck(int index) {
-    if (index >= size) {
-      throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size);
-    }
-  }
-
-  @Override
-  public synchronized boolean addAll(Collection c) {
-    Object[] a = c.toArray();
-    int numNew = a.length;
-    ensureCapacity(size + numNew);
-    System.arraycopy(a, 0, elementData, size, numNew);
-    size += numNew;
-    return numNew != 0;
-  }
-
-  @Override
-  public Object[] toArray() {
-    return Arrays.copyOf(elementData, size);
-  }
-
-  @Override
-  public Iterator iterator() {
-    return new IndexArrayListIterator();
-  }
-
-  private class IndexArrayListIterator implements Iterator {
-    private byte current;
-    private Object currentEntry;
-    
-    /**
-     * Checks if the array has next element, stores reference to the current
-     * element and increments cursor. This is required since an element may be
-     * removed between hasNext() and next() method calls
-     * 
-     */
-    @Override
-    public boolean hasNext() {
-      return current < size;
-    }
-
-    /**
-     * Returns next element. But does not increment the cursor.
-     * Always use hasNext() before this method call
-     */
-    @Override
-    public Object next() {
-      try {
-        currentEntry = elementData[current++];
-      } catch (IndexOutOfBoundsException e) {
-        // Following exception must never be thrown.
-        //throw new NoSuchElementException();
-        return null;
-      }
-      return currentEntry;
-    }
-
-    @Override
-    public void remove() {
-      throw new UnsupportedOperationException(
-          "remove() method is not supported");
-    }
-
-  }
-
-  @Override
-  public Object[] toArray(Object[] a) {
-    throw new UnsupportedOperationException(
-        "toArray(Object[] a) method is not supported");
-  }
-
-  @Override
-  public boolean containsAll(Collection c) {
-    throw new UnsupportedOperationException(
-        "containsAll() method is not supported");
-  }
-
-  @Override
-  public boolean removeAll(Collection c) {
-    throw new UnsupportedOperationException(
-        "removeAll() method is not supported");
-  }
-
-  @Override
-  public boolean retainAll(Collection c) {
-    throw new UnsupportedOperationException(
-        "retainAll() method is not supported");
-  }
-
-  //for internal testing only
-  public Object[] getElementData() {
-    return elementData;
-  }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.cache.query.internal.index;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+/**
+ * A wrapper around an object array for storing values in index data structure
+ * with minimal set of operations supported and the maximum size of 128 elements  
+ * 
+ * @author Tejas Nomulwar
+ * @since 7.0
+ */
+public class IndexElemArray implements Iterable, Collection {
+
+  private Object[] elementData;
+  private volatile byte size;
+
+  public IndexElemArray(int initialCapacity) {
+    if (initialCapacity < 0) {
+      throw new IllegalArgumentException("Illegal Capacity: " + initialCapacity);
+    }
+    this.elementData = new Object[initialCapacity];
+  }
+
+  /**
+   * Constructs an empty list with an initial capacity of ten.
+   */
+  public IndexElemArray() {
+    this(IndexManager.INDEX_ELEMARRAY_SIZE);
+  }
+
+  /**
+   * Increases the capacity of this <tt>ArrayList</tt> instance, if necessary,
+   * to ensure that it can hold at least the number of elements specified by the
+   * minimum capacity argument.
+   * 
+   * @param minCapacity
+   *          the desired minimum capacity
+   */
+  private void ensureCapacity(int minCapacity) {
+    int oldCapacity = elementData.length;
+    if (minCapacity > oldCapacity) {
+      int newCapacity = oldCapacity + 5;
+      if (newCapacity < minCapacity) {
+        newCapacity = minCapacity;
+      }
+      // minCapacity is usually close to size, so this is a win:
+      Object[] newElementData = new Object[newCapacity];
+      System.arraycopy(this.elementData, 0, newElementData, 0,
+          this.elementData.length);
+      elementData = newElementData;
+    }
+  }
+
+  /**
+   * Returns the number of elements in this list. (Warning: May not return
+   * correct size always, as remove operation is not atomic)
+   * 
+   * @return the number of elements in this list
+   */
+  public int size() {
+    return size;
+  }
+
+  /**
+   * Returns <tt>true</tt> if this list contains no elements.
+   * 
+   * @return <tt>true</tt> if this list contains no elements
+   */
+  public boolean isEmpty() {
+    return size == 0;
+  }
+
+  /**
+   * Returns <tt>true</tt> if this list contains the specified element. More
+   * formally, returns <tt>true</tt> if and only if this list contains at least
+   * one element <tt>e</tt> such that
+   * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.
+   * 
+   * @param o
+   *          element whose presence in this list is to be tested
+   * @return <tt>true</tt> if this list contains the specified element
+   */
+  public boolean contains(Object o) {
+    return indexOf(o) >= 0;
+  }
+
+  /**
+   * Returns the index of the first occurrence of the specified element in this
+   * list, or -1 if this list does not contain the element. More formally,
+   * returns the lowest index <tt>i</tt> such that
+   * <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>,
+   * or -1 if there is no such index.
+   */
+  public int indexOf(Object o) {
+    if (o == null) {
+      for (int i = 0; i < size; i++)
+        if (elementData[i] == null)
+          return i;
+    } else {
+      for (int i = 0; i < size; i++)
+        if (o.equals(elementData[i]))
+          return i;
+    }
+    return -1;
+  }
+
+  /**
+   * Returns the element at the specified position in this list.
+   * 
+   * @param index
+   *          index of the element to return
+   * @return the element at the specified position in this list
+   * @throws IndexOutOfBoundsException
+   *          
+   */
+  public Object get(int index) {
+    RangeCheck(index);
+    return elementData[index];
+  }
+
+  /**
+   * Replaces the element at the specified position in this list with the
+   * specified element.
+   * 
+   * @param index
+   *          index of the element to replace
+   * @param element
+   *          element to be stored at the specified position
+   * @return the element previously at the specified position
+   * @throws IndexOutOfBoundsException
+   *           
+   */
+  public Object set(int index, Object element) {
+    RangeCheck(index);
+
+    Object oldValue = (Object) elementData[index];
+    elementData[index] = element;
+    return oldValue;
+  }
+
+  /**
+   * Appends the specified element to the end of this array.
+   * If the array is full, creates a new array with 
+   * new capacity = old capacity + 5
+   * 
+   * @param e
+   *          element to be appended to this list
+   * @return <tt>true</tt> (as specified by {@link Collection#add})
+   * @throws ArrayIndexOutOfBoundsException
+   */
+  public synchronized boolean add(Object e) {
+    ensureCapacity(size + 1);
+    elementData[size] = e;
+    ++size;
+    return true;
+  }
+
+  /**
+   * Removes the first occurrence of the specified element from this list, if it
+   * is present. If the list does not contain the element, it is unchanged. More
+   * formally, removes the element with the lowest index <tt>i</tt> such that
+   * <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>
+   * (if such an element exists). Returns <tt>true</tt> if this list contained
+   * the specified element (or equivalently, if this list changed as a result of
+   * the call).
+   * 
+   * @param o
+   *          element to be removed from this list, if present
+   * @return <tt>true</tt> if this list contained the specified element
+   */
+  public synchronized boolean remove(Object o) {
+    if (o == null) {
+      for (int index = 0; index < size; index++)
+        if (elementData[index] == null) {
+          fastRemove(index);
+          return true;
+        }
+    } else {
+      for (int index = 0; index < size; index++)
+        if (o.equals(elementData[index])) {
+          fastRemove(index);
+          return true;
+        }
+    }
+    return false;
+  }
+
+  /*
+   * Private remove method that skips bounds checking and does not return the
+   * value removed.
+   */
+  private void fastRemove(int index) {
+    int len = elementData.length;
+    Object[] newArray = new Object[len - 1];
+    System.arraycopy(elementData, 0, newArray, 0, index);
+    int numMoved = len - index - 1;
+    if (numMoved > 0)
+      System.arraycopy(elementData, index + 1, newArray, index, numMoved);
+    elementData = newArray;
+    --size;
+  }
+
+  /**
+   * Removes all of the elements from this list. The list will be empty after
+   * this call returns.
+   */
+  public void clear() {
+    // Let gc do its work
+    for (int i = 0; i < size; i++) {
+      elementData[i] = null;
+    }
+    size = 0;
+  }
+
+  /**
+   * Checks if the given index is in range. If not, throws an appropriate
+   * runtime exception. This method does *not* check if the index is negative:
+   * It is always used immediately prior to an array access, which throws an
+   * ArrayIndexOutOfBoundsException if index is negative.
+   */
+  private void RangeCheck(int index) {
+    if (index >= size) {
+      throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size);
+    }
+  }
+
+  @Override
+  public synchronized boolean addAll(Collection c) {
+    Object[] a = c.toArray();
+    int numNew = a.length;
+    ensureCapacity(size + numNew);
+    System.arraycopy(a, 0, elementData, size, numNew);
+    size += numNew;
+    return numNew != 0;
+  }
+
+  @Override
+  public Object[] toArray() {
+    return Arrays.copyOf(elementData, size);
+  }
+
+  @Override
+  public Iterator iterator() {
+    return new IndexArrayListIterator();
+  }
+
+  private class IndexArrayListIterator implements Iterator {
+    private byte current;
+    private Object currentEntry;
+    
+    /**
+     * Checks if the array has next element, stores reference to the current
+     * element and increments cursor. This is required since an element may be
+     * removed between hasNext() and next() method calls
+     * 
+     */
+    @Override
+    public boolean hasNext() {
+      return current < size;
+    }
+
+    /**
+     * Returns next element. But does not increment the cursor.
+     * Always use hasNext() before this method call
+     */
+    @Override
+    public Object next() {
+      try {
+        currentEntry = elementData[current++];
+      } catch (IndexOutOfBoundsException e) {
+        // Following exception must never be thrown.
+        //throw new NoSuchElementException();
+        return null;
+      }
+      return currentEntry;
+    }
+
+    @Override
+    public void remove() {
+      throw new UnsupportedOperationException(
+          "remove() method is not supported");
+    }
+
+  }
+
+  @Override
+  public Object[] toArray(Object[] a) {
+    throw new UnsupportedOperationException(
+        "toArray(Object[] a) method is not supported");
+  }
+
+  @Override
+  public boolean containsAll(Collection c) {
+    throw new UnsupportedOperationException(
+        "containsAll() method is not supported");
+  }
+
+  @Override
+  public boolean removeAll(Collection c) {
+    throw new UnsupportedOperationException(
+        "removeAll() method is not supported");
+  }
+
+  @Override
+  public boolean retainAll(Collection c) {
+    throw new UnsupportedOperationException(
+        "retainAll() method is not supported");
+  }
+
+  //for internal testing only
+  public Object[] getElementData() {
+    return elementData;
+  }
+}


[13/33] incubator-geode git commit: GEODE-550 CI failure: FixedPRSinglehopDUnitTest.test_MetadataContents

Posted by ds...@apache.org.
GEODE-550 CI failure: FixedPRSinglehopDUnitTest.test_MetadataContents

This test hasn't failed in over 3 months and that was on a private build
with no artifacts.  I've changed the test to include details about the
end state of the client's metadata so that if this test fails again we
will know more about why it failed.

I'm closing the ticket so that CI monitors will reopen it and not just
report that it failed again in an email.


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

Branch: refs/heads/feature/GEODE-831
Commit: 6f0a3294c61cac2129176f3f6eefb9c423be9561
Parents: 5a65498
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Thu Feb 11 16:18:01 2016 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Fri Feb 12 08:09:18 2016 -0800

----------------------------------------------------------------------
 .../cache/FixedPRSinglehopDUnitTest.java        | 57 ++++++++++----------
 1 file changed, 30 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6f0a3294/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
index 86376d9..d3c51b1 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
@@ -16,8 +16,14 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
@@ -38,27 +44,18 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.partitioned.fixed.QuarterPartitionResolver;
 import com.gemstone.gemfire.internal.cache.partitioned.fixed.SingleHopQuarterPartitionResolver;
-import com.gemstone.gemfire.internal.cache.partitioned.fixed.FixedPartitioningTestBase.Q1_Months;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
 import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.NetworkUtils;
+import com.gemstone.gemfire.test.dunit.SerializableCallableIF;
+import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Map.Entry;
-
 public class FixedPRSinglehopDUnitTest extends CacheTestCase {
 
   private static final long serialVersionUID = 1L;
@@ -98,7 +95,7 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase {
   public FixedPRSinglehopDUnitTest(String name) {
     super(name);
   }
-
+  
   public void testNoClientConnected() {
     final Host host = Host.getHost(0);
     VM accessorServer = host.getVM(0);
@@ -204,6 +201,7 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase {
 
     verifyEmptyStaticData();
   }
+  
   // 4 servers, 1 client connected to all 4 servers.
   // Put data, get data and make the metadata stable.
   // Now verify that metadata has all 8 buckets info.
@@ -252,16 +250,18 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase {
 
     getFromPartitionedRegions();
 
-    server1.invoke(FixedPRSinglehopDUnitTest.class, "printView");
-    server2.invoke(FixedPRSinglehopDUnitTest.class, "printView");
-    server3.invoke(FixedPRSinglehopDUnitTest.class, "printView");
-    server4.invoke(FixedPRSinglehopDUnitTest.class, "printView");
+    SerializableRunnableIF printView = () -> FixedPRSinglehopDUnitTest.printView(); 
+    server1.invoke(printView);
+    server2.invoke(printView);
+    server3.invoke(printView);
+    server4.invoke(printView);
     
     int totalBucketOnServer = 0;
-    totalBucketOnServer += (Integer)server1.invoke(FixedPRSinglehopDUnitTest.class, "totalNumBucketsCreated");
-    totalBucketOnServer += (Integer)server2.invoke(FixedPRSinglehopDUnitTest.class, "totalNumBucketsCreated");
-    totalBucketOnServer += (Integer)server3.invoke(FixedPRSinglehopDUnitTest.class, "totalNumBucketsCreated");
-    totalBucketOnServer += (Integer)server4.invoke(FixedPRSinglehopDUnitTest.class, "totalNumBucketsCreated");
+    SerializableCallableIF<Integer> getBucketCount = () -> FixedPRSinglehopDUnitTest.totalNumBucketsCreated();
+    totalBucketOnServer += server1.invoke(getBucketCount);
+    totalBucketOnServer += server2.invoke(getBucketCount);
+    totalBucketOnServer += server3.invoke(getBucketCount);
+    totalBucketOnServer += server4.invoke(getBucketCount);
     
     verifyMetadata(totalBucketOnServer,2);
     updateIntoSinglePR();
@@ -873,13 +873,16 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase {
       }
 
       public String description() {
-        return "expected no metadata to be refreshed";
+        return "expected no metadata to be refreshed.  Expected " + totalBuckets
+            + " entries but found " + prMetaData.getBucketServerLocationsMap_TEST_ONLY();
       }
     };
     Wait.waitForCriterion(wc, 60000, 1000, true);
-    for (Entry entry : prMetaData.getBucketServerLocationsMap_TEST_ONLY()
-        .entrySet()) {
-      assertEquals(currentRedundancy, ((List)entry.getValue()).size());
+    System.out.println("metadata is " + prMetaData);
+    System.out.println("metadata bucket locations map is " + prMetaData.getBucketServerLocationsMap_TEST_ONLY());
+    for (Map.Entry entry : prMetaData.getBucketServerLocationsMap_TEST_ONLY().entrySet()) {
+      assertEquals("list has wrong contents: " + entry.getValue(),
+          currentRedundancy, ((List)entry.getValue()).size());
     }
   }
 


[28/33] incubator-geode git commit: GEODE-303: fix dataBrowser javascript errors using a splitter with free license.

Posted by ds...@apache.org.
GEODE-303: fix dataBrowser javascript errors using a splitter with free license.


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

Branch: refs/heads/feature/GEODE-831
Commit: 23edf7e1353f76a4df5f6e3de496c82eeed632a4
Parents: ef94416
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Tue Feb 16 12:45:24 2016 -0800
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Wed Feb 17 07:46:49 2016 -0800

----------------------------------------------------------------------
 LICENSE                                         |   6 +
 gemfire-assembly/src/main/dist/LICENSE          |   5 +
 gemfire-pulse/src/main/webapp/DataBrowser.html  |  17 +-
 .../src/main/webapp/css/grips/horizontal.png    | Bin 0 -> 2753 bytes
 .../src/main/webapp/css/grips/vertical.png      | Bin 0 -> 91 bytes
 gemfire-pulse/src/main/webapp/css/style.css     |  34 +-
 .../src/main/webapp/scripts/lib/split.js        | 375 +++++++++++++++++++
 .../scripts/pulsescript/pages/DataBrowser.js    |  13 +-
 8 files changed, 433 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/23edf7e1/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 1c867c5..31f4473 100644
--- a/LICENSE
+++ b/LICENSE
@@ -359,3 +359,9 @@ jquery.sparkline.js (http://omnipotent.net/jquery.sparkline/)
 ---------------------------------------------------------------------------
 This product bundles jquery.sparkline which is available under a BSD-like license.
 For details see http://opensource.org/licenses/BSD-3-Clause.
+
+---------------------------------------------------------------------------
+split.js (https://github.com/nathancahill/Split.js)
+---------------------------------------------------------------------------
+This product bundles split.js which is available under an MIT license.
+For details see http://www.opensource.org/licenses/mit-license.php.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/23edf7e1/gemfire-assembly/src/main/dist/LICENSE
----------------------------------------------------------------------
diff --git a/gemfire-assembly/src/main/dist/LICENSE b/gemfire-assembly/src/main/dist/LICENSE
index 12ffb42..2f1374b 100644
--- a/gemfire-assembly/src/main/dist/LICENSE
+++ b/gemfire-assembly/src/main/dist/LICENSE
@@ -427,3 +427,8 @@ jquery.sparkline.js (http://omnipotent.net/jquery.sparkline/)
 This product bundles jquery.sparkline which is available under a BSD-like license.
 For details see http://opensource.org/licenses/BSD-3-Clause.
 
+---------------------------------------------------------------------------
+split.js (https://github.com/nathancahill/Split.js)
+---------------------------------------------------------------------------
+This product bundles split.js which is available under an MIT license.
+For details see http://www.opensource.org/licenses/mit-license.php.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/23edf7e1/gemfire-pulse/src/main/webapp/DataBrowser.html
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/DataBrowser.html b/gemfire-pulse/src/main/webapp/DataBrowser.html
index 760abf9..341f359 100644
--- a/gemfire-pulse/src/main/webapp/DataBrowser.html
+++ b/gemfire-pulse/src/main/webapp/DataBrowser.html
@@ -48,8 +48,7 @@
 <script type="text/javascript" src='scripts/lib/common.js'></script>
 
 <!--Splitter-->
-<script src="scripts/lib/jquery.splitter-0.5.js"></script>
-<link href="css/jquery.splitter.css" rel="stylesheet" />
+<script src="scripts/lib/split.js"></script>
 
 <!--Custom Scroll Bar-->
 <!-- styles needed by jScrollPane - include in your own sites -->
@@ -74,8 +73,6 @@
 
 <!-- popups-->
 <link href="css/popup.css" rel="stylesheet" type="text/css" />
-<!-- Customize checkbox & radiobutton -->
-<script type="text/javascript" src="scripts/lib/checkBox-RadioButton.js"></script>
 <!-- Treeview JSON -->
 <script type="text/javascript" src="scripts/lib/jquery.ztree.core-3.5.js"></script>
 <script type="text/javascript" src="scripts/lib/jquery.ztree.excheck-3.5.js"></script>
@@ -199,12 +196,10 @@
 			<!--Middle Block 1-->
 			<div class="left leftBlockCanvas">
 				<!-- Splitter Master-->
-				<div class="splitterMaster">
-					<div class="splitterInnerBlock">
 						<div id="widget">
 							<!-- Left splitter-->
-							<div id="leftBlock">
-								<div class="leftTopSplitterSpacing">
+							<div id="leftBlock" class="split split-horizontal">
+								<div id="dataRegion" class="split split-vertical">
 								  <div class="rightInnerBlocks">
 								    <a class="active" href="#.">Data Regions</a>
 								  </div>
@@ -240,7 +235,7 @@
 									</div>
 								</div>
 								<!-- Members List Block-->
-								<div class="">
+								<div id="regionMember" class="split split-vertical">
 								  <div class="rightInnerBlocks btm_pnl">
 								    <a href="#." class="active">Region Members</a>
 								  </div>
@@ -254,7 +249,7 @@
 								</div>
 							</div>
 							<!--Right splitter -->
-							<div id="rightBlock">
+							<div id="rightBlock" class="split split-horizontal">
 								<!-- Tab links-->
 								<div class="rightInnerBlocks ">
 								  <a href="#." class="active">Queries</a>
@@ -303,8 +298,6 @@
 							</div>
 						</div>
 					</div>
-				</div>
-			</div>
 		</div>
 	</div>
 	<!--Popups Block-->

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/23edf7e1/gemfire-pulse/src/main/webapp/css/grips/horizontal.png
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/css/grips/horizontal.png b/gemfire-pulse/src/main/webapp/css/grips/horizontal.png
new file mode 100644
index 0000000..64a40ae
Binary files /dev/null and b/gemfire-pulse/src/main/webapp/css/grips/horizontal.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/23edf7e1/gemfire-pulse/src/main/webapp/css/grips/vertical.png
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/css/grips/vertical.png b/gemfire-pulse/src/main/webapp/css/grips/vertical.png
new file mode 100644
index 0000000..0ac8fa1
Binary files /dev/null and b/gemfire-pulse/src/main/webapp/css/grips/vertical.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/23edf7e1/gemfire-pulse/src/main/webapp/css/style.css
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/css/style.css b/gemfire-pulse/src/main/webapp/css/style.css
index e3047a0..45c5f06 100644
--- a/gemfire-pulse/src/main/webapp/css/style.css
+++ b/gemfire-pulse/src/main/webapp/css/style.css
@@ -3060,8 +3060,40 @@ input[type="text"].searchBoxRegion {
   background: url(../images/ui-anim_basic_16x16.gif) no-repeat center center;
   display: none;
 }
+/* loading symbol */
+
 /* For Data Browser */
 #loaderSymbolWrapper .loader{
   top: 6px;
 }
-/* loading symbol */
+
+.split {
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow-y: auto;
+  overflow-x: hidden;
+}
+
+.gutter {
+  background-color: #0f1c25;
+
+  background-repeat: no-repeat;
+  background-position: 50%;
+}
+
+.gutter.gutter-horizontal {
+  background-image: url('grips/vertical.png');
+  cursor: ew-resize;
+}
+
+.gutter.gutter-vertical {
+  background-image: url('grips/horizontal.png');
+  cursor: ns-resize;
+}
+
+.split.split-horizontal, .gutter.gutter-horizontal {
+  height: 100%;
+  float: left;
+}
+/* End For Data Browser */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/23edf7e1/gemfire-pulse/src/main/webapp/scripts/lib/split.js
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/scripts/lib/split.js b/gemfire-pulse/src/main/webapp/scripts/lib/split.js
new file mode 100644
index 0000000..73734a2
--- /dev/null
+++ b/gemfire-pulse/src/main/webapp/scripts/lib/split.js
@@ -0,0 +1,375 @@
+/*
+ * Copyright (c) 2015 Nathan Cahill
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * https://github.com/nathancahill/Split.js
+*/
+
+'use strict';
+
+(function() {
+
+var global = this
+  , addEventListener = 'addEventListener'
+  , removeEventListener = 'removeEventListener'
+  , getBoundingClientRect = 'getBoundingClientRect'
+  , isIE8 = global.attachEvent && !global[addEventListener]
+  , document = global.document
+
+  , calc = (function () {
+        var el
+          , prefixes = ["", "-webkit-", "-moz-", "-o-"]
+
+        for (var i = 0; i < prefixes.length; i++) {
+            el = document.createElement('div')
+            el.style.cssText = "width:" + prefixes[i] + "calc(9px)"
+
+            if (el.style.length) {
+                return prefixes[i] + "calc"
+            }
+        }
+    })()
+  , elementOrSelector = function (el) {
+        if (typeof el === 'string' || el instanceof String) {
+            return document.querySelector(el)
+        } else {
+            return el
+        }
+    }
+
+  , Split = function (ids, options) {
+    var dimension
+      , i
+      , clientDimension
+      , clientAxis
+      , position
+      , gutterClass
+      , paddingA
+      , paddingB
+      , pairs = []
+
+    // Set defaults
+
+    options = typeof options !== 'undefined' ?  options : {}
+
+    if (typeof options.gutterSize === 'undefined') options.gutterSize = 10
+    if (typeof options.minSize === 'undefined') options.minSize = 100
+    if (typeof options.snapOffset === 'undefined') options.snapOffset = 30
+    if (typeof options.direction === 'undefined') options.direction = 'horizontal'
+
+    if (options.direction == 'horizontal') {
+        dimension = 'width'
+        clientDimension = 'clientWidth'
+        clientAxis = 'clientX'
+        position = 'left'
+        gutterClass = 'gutter gutter-horizontal'
+        paddingA = 'paddingLeft'
+        paddingB = 'paddingRight'
+        if (!options.cursor) options.cursor = 'ew-resize'
+    } else if (options.direction == 'vertical') {
+        dimension = 'height'
+        clientDimension = 'clientHeight'
+        clientAxis = 'clientY'
+        position = 'top'
+        gutterClass = 'gutter gutter-vertical'
+        paddingA = 'paddingTop'
+        paddingB = 'paddingBottom'
+        if (!options.cursor) options.cursor = 'ns-resize'
+    }
+
+    // Event listeners for drag events, bound to a pair object.
+    // Calculate the pair's position and size when dragging starts.
+    // Prevent selection on start and re-enable it when done.
+
+    var startDragging = function (e) {
+            var self = this
+              , a = self.a
+              , b = self.b
+
+            if (!self.dragging && options.onDragStart) {
+                options.onDragStart()
+            }
+
+            e.preventDefault()
+
+            self.dragging = true
+            self.move = drag.bind(self)
+            self.stop = stopDragging.bind(self)
+
+            global[addEventListener]('mouseup', self.stop)
+            global[addEventListener]('touchend', self.stop)
+            global[addEventListener]('touchcancel', self.stop)
+
+            self.parent[addEventListener]('mousemove', self.move)
+            self.parent[addEventListener]('touchmove', self.move)
+
+            a[addEventListener]('selectstart', preventSelection)
+            a[addEventListener]('dragstart', preventSelection)
+            b[addEventListener]('selectstart', preventSelection)
+            b[addEventListener]('dragstart', preventSelection)
+
+            a.style.userSelect = 'none'
+            a.style.webkitUserSelect = 'none'
+            a.style.MozUserSelect = 'none'
+            a.style.pointerEvents = 'none'
+
+            b.style.userSelect = 'none'
+            b.style.webkitUserSelect = 'none'
+            b.style.MozUserSelect = 'none'
+            b.style.pointerEvents = 'none'
+
+            self.gutter.style.cursor = options.cursor
+            self.parent.style.cursor = options.cursor
+
+            calculateSizes.call(self)
+        }
+      , stopDragging = function () {
+            var self = this
+              , a = self.a
+              , b = self.b
+
+            if (self.dragging && options.onDragEnd) {
+                options.onDragEnd()
+            }
+
+            self.dragging = false
+
+            global[removeEventListener]('mouseup', self.stop)
+            global[removeEventListener]('touchend', self.stop)
+            global[removeEventListener]('touchcancel', self.stop)
+
+            self.parent[removeEventListener]('mousemove', self.move)
+            self.parent[removeEventListener]('touchmove', self.move)
+
+            delete self.stop
+            delete self.move
+
+            a[removeEventListener]('selectstart', preventSelection)
+            a[removeEventListener]('dragstart', preventSelection)
+            b[removeEventListener]('selectstart', preventSelection)
+            b[removeEventListener]('dragstart', preventSelection)
+
+            a.style.userSelect = ''
+            a.style.webkitUserSelect = ''
+            a.style.MozUserSelect = ''
+            a.style.pointerEvents = ''
+
+            b.style.userSelect = ''
+            b.style.webkitUserSelect = ''
+            b.style.MozUserSelect = ''
+            b.style.pointerEvents = ''
+
+            self.gutter.style.cursor = ''
+            self.parent.style.cursor = ''
+        }
+      , drag = function (e) {
+            var offset
+
+            if (!this.dragging) return
+
+            // Get the relative position of the event from the first side of the
+            // pair.
+
+            if ('touches' in e) {
+                offset = e.touches[0][clientAxis] - this.start
+            } else {
+                offset = e[clientAxis] - this.start
+            }
+
+            // If within snapOffset of min or max, set offset to min or max
+
+            if (offset <=  this.aMin + options.snapOffset) {
+                offset = this.aMin
+            } else if (offset >= this.size - this.bMin - options.snapOffset) {
+                offset = this.size - this.bMin
+            }
+
+            adjust.call(this, offset)
+
+            if (options.onDrag) {
+                options.onDrag()
+            }
+        }
+      , calculateSizes = function () {
+            // Calculate the pairs size, and percentage of the parent size
+            var computedStyle = global.getComputedStyle(this.parent)
+              , parentSize = this.parent[clientDimension] - parseFloat(computedStyle[paddingA]) - parseFloat(computedStyle[paddingB])
+
+            this.size = this.a[getBoundingClientRect]()[dimension] + this.b[getBoundingClientRect]()[dimension] + this.aGutterSize + this.bGutterSize
+            this.percentage = Math.min(this.size / parentSize * 100, 100)
+            this.start = this.a[getBoundingClientRect]()[position]
+        }
+      , adjust = function (offset) {
+            // A size is the same as offset. B size is total size - A size.
+            // Both sizes are calculated from the initial parent percentage.
+
+            this.a.style[dimension] = calc + '(' + (offset / this.size * this.percentage) + '% - ' + this.aGutterSize + 'px)'
+            this.b.style[dimension] = calc + '(' + (this.percentage - (offset / this.size * this.percentage)) + '% - ' + this.bGutterSize + 'px)'
+        }
+      , fitMin = function () {
+            var self = this
+              , a = self.a
+              , b = self.b
+
+            if (a[getBoundingClientRect]()[dimension] < self.aMin) {
+                a.style[dimension] = (self.aMin - self.aGutterSize) + 'px'
+                b.style[dimension] = (self.size - self.aMin - self.aGutterSize) + 'px'
+            } else if (b[getBoundingClientRect]()[dimension] < self.bMin) {
+                a.style[dimension] = (self.size - self.bMin - self.bGutterSize) + 'px'
+                b.style[dimension] = (self.bMin - self.bGutterSize) + 'px'
+            }
+        }
+      , fitMinReverse = function () {
+            var self = this
+              , a = self.a
+              , b = self.b
+
+            if (b[getBoundingClientRect]()[dimension] < self.bMin) {
+                a.style[dimension] = (self.size - self.bMin - self.bGutterSize) + 'px'
+                b.style[dimension] = (self.bMin - self.bGutterSize) + 'px'
+            } else if (a[getBoundingClientRect]()[dimension] < self.aMin) {
+                a.style[dimension] = (self.aMin - self.aGutterSize) + 'px'
+                b.style[dimension] = (self.size - self.aMin - self.aGutterSize) + 'px'
+            }
+        }
+      , balancePairs = function (pairs) {
+            for (var i = 0; i < pairs.length; i++) {
+                calculateSizes.call(pairs[i])
+                fitMin.call(pairs[i])
+            }
+
+            for (i = pairs.length - 1; i >= 0; i--) {
+                calculateSizes.call(pairs[i])
+                fitMinReverse.call(pairs[i])
+            }
+        }
+      , preventSelection = function () { return false }
+      , parent = elementOrSelector(ids[0]).parentNode
+
+    if (!options.sizes) {
+        var percent = 100 / ids.length
+
+        options.sizes = []
+
+        for (i = 0; i < ids.length; i++) {
+            options.sizes.push(percent)
+        }
+    }
+
+    if (!Array.isArray(options.minSize)) {
+        var minSizes = []
+
+        for (i = 0; i < ids.length; i++) {
+            minSizes.push(options.minSize)
+        }
+
+        options.minSize = minSizes
+    }
+
+    for (i = 0; i < ids.length; i++) {
+        var el = elementOrSelector(ids[i])
+          , isFirst = (i == 1)
+          , isLast = (i == ids.length - 1)
+          , size
+          , gutterSize = options.gutterSize
+          , pair
+
+        if (i > 0) {
+            pair = {
+                a: elementOrSelector(ids[i - 1]),
+                b: el,
+                aMin: options.minSize[i - 1],
+                bMin: options.minSize[i],
+                dragging: false,
+                parent: parent,
+                isFirst: isFirst,
+                isLast: isLast,
+                direction: options.direction
+            }
+
+            // For first and last pairs, first and last gutter width is half.
+
+            pair.aGutterSize = options.gutterSize
+            pair.bGutterSize = options.gutterSize
+
+            if (isFirst) {
+                pair.aGutterSize = options.gutterSize / 2
+            }
+
+            if (isLast) {
+                pair.bGutterSize = options.gutterSize / 2
+            }
+        }
+
+        // IE9 and above
+        if (!isIE8) {
+            if (i > 0) {
+                var gutter = document.createElement('div')
+
+                gutter.className = gutterClass
+                gutter.style[dimension] = options.gutterSize + 'px'
+
+                gutter[addEventListener]('mousedown', startDragging.bind(pair))
+                gutter[addEventListener]('touchstart', startDragging.bind(pair))
+
+                parent.insertBefore(gutter, el)
+
+                pair.gutter = gutter
+            }
+
+            if (i === 0 || i == ids.length - 1) {
+                gutterSize = options.gutterSize / 2
+            }
+
+            if (typeof options.sizes[i] === 'string' || options.sizes[i] instanceof String) {
+                size = options.sizes[i]
+            } else {
+                size = calc + '(' + options.sizes[i] + '% - ' + gutterSize + 'px)'
+            }
+
+        // IE8 and below
+        } else {
+            if (typeof options.sizes[i] === 'string' || options.sizes[i] instanceof String) {
+                size = options.sizes[i]
+            } else {
+                size = options.sizes[i] + '%'
+            }
+        }
+
+        el.style[dimension] = size
+
+        if (i > 0) {
+            pairs.push(pair)
+        }
+    }
+
+    balancePairs(pairs)
+}
+
+if (typeof exports !== 'undefined') {
+    if (typeof module !== 'undefined' && module.exports) {
+        exports = module.exports = Split
+    }
+    exports.Split = Split
+} else {
+    global.Split = Split
+}
+
+}).call(window)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/23edf7e1/gemfire-pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowser.js
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowser.js b/gemfire-pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowser.js
index 686d88d..19ac9af 100644
--- a/gemfire-pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowser.js
+++ b/gemfire-pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowser.js
@@ -81,10 +81,15 @@ $(document).ready(function() {
       //$('.ScrollPaneBlock').jScrollPane();
       
       /*splitter*/
-      $('#widget').width('1002').height('100%').split({orientation:'vertical', limit:250, position: '250'});
-      $('#rightBlock').width('748')/*.height('100%')*/;
-      $('#leftBlock').width('250')/*.height('100%')*/.split({orientation:'horizontal', limit:310, position: '380'});
-       //$('#leftBlock').width('29.7%').height('100%');
+      $('#widget').width('1002').height('810');
+      Split(['#leftBlock', '#rightBlock'], {
+        sizes: [25, 75]
+      });
+      Split(['#dataRegion', '#regionMember'], {
+        sizes: [40, 60],
+        direction: 'vertical'
+      });
+
       $('.ScrollPaneBlock').jScrollPane();
       
       /*History Overlay Toggle*/


[04/33] incubator-geode git commit: GEODE-913: refactor AbstractDistributionConfig

Posted by ds...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 190a137..fc2fca7 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -17,21 +17,6 @@
 
 package com.gemstone.gemfire.distributed.internal;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.InetAddress;
-import java.net.URL;
-import java.net.UnknownHostException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
 import com.gemstone.gemfire.GemFireConfigException;
 import com.gemstone.gemfire.GemFireIOException;
 import com.gemstone.gemfire.distributed.DistributedSystem;
@@ -41,6 +26,14 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.process.ProcessLauncherContext;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
 
+import java.io.File;
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.InetAddress;
+import java.net.URL;
+import java.net.UnknownHostException;
+import java.util.*;
+
 /**
  * Provides an implementation of <code>DistributionConfig</code> that
  * knows how to read the configuration file.
@@ -1544,8 +1537,7 @@ public class DistributionConfigImpl
   }
 
   public void setHttpServicePort(int value) {
-    minMaxCheck(HTTP_SERVICE_PORT_NAME, value, 0, 65535);
-    this.httpServicePort = value;
+    this.httpServicePort = (Integer)checkAttribute(HTTP_SERVICE_PORT_NAME, value);
   }
   
   public String getHttpServiceBindAddress() {
@@ -1553,8 +1545,7 @@ public class DistributionConfigImpl
   }
   
   public void setHttpServiceBindAddress(String value) {
-    checkHttpServiceBindAddress(value);
-    this.httpServiceBindAddress = value;
+    this.httpServiceBindAddress = (String)checkAttribute(HTTP_SERVICE_BIND_ADDRESS_NAME, value);
   }
   
   public boolean getStartDevRestApi(){
@@ -1566,8 +1557,7 @@ public class DistributionConfigImpl
   }
  
   public void setUserCommandPackages(String value) {
-    checkUserCommandPackages(value);
-    this.userCommandPackages = value;
+    this.userCommandPackages = (String)checkAttribute(USER_COMMAND_PACKAGES, value);
   }
 
   public boolean getDeltaPropagation() {
@@ -1575,44 +1565,35 @@ public class DistributionConfigImpl
   }
 
   public void setDeltaPropagation(boolean value) {
-    checkDeltaPropagationModifiable();
-    this.deltaPropagation = value;
+    this.deltaPropagation = (Boolean)checkAttribute(DELTA_PROPAGATION_PROP_NAME, value);
   }
 
   public void setName(String value) {
-    checkName(value);
     if (value == null) {
       value = DEFAULT_NAME;
     }
-    this.name = value;
+    this.name = (String)checkAttribute(NAME_NAME, value);
   }
   public void setTcpPort(int value) {
-    checkTcpPort(value);
-    this.tcpPort = value;
+    this.tcpPort = (Integer)checkAttribute(TCP_PORT_NAME, value);
   }
   public void setMcastPort(int value) {
-    checkMcastPort(value);
-    this.mcastPort = value;
+    this.mcastPort = (Integer)checkAttribute(MCAST_PORT_NAME, value);
   }
   public void setMcastTtl(int value) {
-    checkMcastTtl(value);
-    this.mcastTtl = value;
+    this.mcastTtl = (Integer)checkAttribute(MCAST_TTL_NAME, value);
   }
   public void setSocketLeaseTime(int value) {
-    checkSocketLeaseTime(value);
-    this.socketLeaseTime = value;
+    this.socketLeaseTime = (Integer)checkAttribute(SOCKET_LEASE_TIME_NAME, value);
   }
   public void setSocketBufferSize(int value) {
-    checkSocketBufferSize(value);
-    this.socketBufferSize = value;
+    this.socketBufferSize = (Integer)checkAttribute(SOCKET_BUFFER_SIZE_NAME, value);
   }
   public void setConserveSockets(boolean value) {
-    checkConserveSockets(value);
-    this.conserveSockets = value;
+    this.conserveSockets = (Boolean)checkAttribute(CONSERVE_SOCKETS_NAME, value);
   }
   public void setRoles(String value) {
-    checkRoles(value);
-    this.roles = value;
+    this.roles = (String)checkAttribute(ROLES_NAME, value);
   }
 
   public void setMaxWaitTimeForReconnect(int value){
@@ -1624,23 +1605,19 @@ public class DistributionConfigImpl
   }
 
   public void setMcastAddress(InetAddress value) {
-    checkMcastAddress(value);
-    this.mcastAddress = value;
+    this.mcastAddress = (InetAddress)checkAttribute(MCAST_ADDRESS_NAME, value);
   }
   public void setBindAddress(String value) {
-    checkBindAddress(value);
-    this.bindAddress = value;
+    this.bindAddress = (String)checkAttribute(BIND_ADDRESS_NAME, value);
   }
   public void setServerBindAddress(String value) {
-    checkServerBindAddress(value);
-    this.serverBindAddress = value;
+    this.serverBindAddress = (String)checkAttribute(SERVER_BIND_ADDRESS_NAME, value);
   }
   public void setLocators(String value) {
-    value = checkLocators(value);
     if (value == null) {
       value = DEFAULT_LOCATORS;
     }
-    this.locators = value;
+    this.locators = (String)checkAttribute(LOCATORS_NAME, value);
   }
   
   public void setLocatorWaitTime(int value) {
@@ -1652,16 +1629,13 @@ public class DistributionConfigImpl
   }
   
   public void setDeployWorkingDir(File value) {
-    checkDeployWorkingDir(value);
-    this.deployWorkingDir = value;
+    this.deployWorkingDir = (File)checkAttribute(DEPLOY_WORKING_DIR, value);
   }
   public void setLogFile(File value) {
-    checkLogFile(value);
-    this.logFile = value;
+    this.logFile = (File)checkAttribute(LOG_FILE_NAME, value);
   }
   public void setLogLevel(int value) {
-    checkLogLevel(value);
-    this.logLevel = value;
+    this.logLevel = (Integer)checkAttribute(LOG_LEVEL_NAME, value);
   }
   /**
    * the locator startup code must be able to modify the locator log file in order
@@ -1700,17 +1674,16 @@ public class DistributionConfigImpl
         }
       }
       else {
-        checkStartLocator(value);
+        value = (String)checkAttribute(START_LOCATOR_NAME, value);
       }
     }
     this.startLocator = value;
   }
   public void setStatisticSamplingEnabled(boolean value) {
-    checkStatisticSamplingEnabled(value);
-    this.statisticSamplingEnabled = value;
+    this.statisticSamplingEnabled = (Boolean)checkAttribute(STATISTIC_SAMPLING_ENABLED_NAME, value);
   }
   public void setStatisticSampleRate(int value) {
-    checkStatisticSampleRate(value);
+    value = (Integer)checkAttribute(STATISTIC_SAMPLE_RATE_NAME, value);
     if (value < DEFAULT_STATISTIC_SAMPLE_RATE) {
       // fix 48228
       InternalDistributedSystem ids = InternalDistributedSystem.getConnectedInstance();
@@ -1722,110 +1695,94 @@ public class DistributionConfigImpl
     this.statisticSampleRate = value;
   }
   public void setStatisticArchiveFile(File value) {
-    checkStatisticArchiveFile(value);
     if (value == null) {
       value = new File("");
     }
-    this.statisticArchiveFile = value;
+    this.statisticArchiveFile = (File)checkAttribute(STATISTIC_ARCHIVE_FILE_NAME, value);
   }
   public void setCacheXmlFile(File value) {
-    checkCacheXmlFile(value);
-    this.cacheXmlFile = value;
+    this.cacheXmlFile = (File)checkAttribute(CACHE_XML_FILE_NAME, value);
   }
   public void setAckWaitThreshold(int value) {
-    checkAckWaitThreshold(value);
-    this.ackWaitThreshold = value;
+    this.ackWaitThreshold = (Integer)checkAttribute(ACK_WAIT_THRESHOLD_NAME, value);
   }
 
   public void setAckSevereAlertThreshold(int value) {
-    checkAckSevereAlertThreshold(value);
-    this.ackForceDisconnectThreshold = value;
+    this.ackForceDisconnectThreshold = (Integer)checkAttribute(ACK_SEVERE_ALERT_THRESHOLD_NAME, value);
   }
 
   public int getArchiveDiskSpaceLimit() {
     return this.archiveDiskSpaceLimit;
   }
   public void setArchiveDiskSpaceLimit(int value) {
-    checkArchiveDiskSpaceLimit(value);
-    this.archiveDiskSpaceLimit = value;
+    this.archiveDiskSpaceLimit = (Integer)checkAttribute(ARCHIVE_DISK_SPACE_LIMIT_NAME, value);
   }
   public int getArchiveFileSizeLimit() {
     return this.archiveFileSizeLimit;
   }
   public void setArchiveFileSizeLimit(int value) {
-    checkArchiveFileSizeLimit(value);
-    this.archiveFileSizeLimit = value;
+    this.archiveFileSizeLimit = (Integer)checkAttribute(ARCHIVE_FILE_SIZE_LIMIT_NAME, value);
   }
   public int getLogDiskSpaceLimit() {
     return this.logDiskSpaceLimit;
   }
   public void setLogDiskSpaceLimit(int value) {
-    checkLogDiskSpaceLimit(value);
-    this.logDiskSpaceLimit = value;
+    this.logDiskSpaceLimit = (Integer)checkAttribute(LOG_DISK_SPACE_LIMIT_NAME, value);
   }
   public int getLogFileSizeLimit() {
     return this.logFileSizeLimit;
   }
   public void setLogFileSizeLimit(int value) {
-    checkLogFileSizeLimit(value);
-    this.logFileSizeLimit = value;
+    this.logFileSizeLimit = (Integer)checkAttribute(LOG_FILE_SIZE_LIMIT_NAME, value);
   }
   public void setSSLEnabled( boolean value ) {
-    checkSSLEnabled( value ? Boolean.TRUE : Boolean.FALSE );
-    this.sslEnabled = value;
+    this.sslEnabled = (Boolean)checkAttribute(SSL_ENABLED_NAME, value);
   }
   public void setSSLProtocols( String value ) {
-    checkSSLProtocols( value );
-    this.sslProtocols = value;
+    this.sslProtocols = (String)checkAttribute(SSL_PROTOCOLS_NAME, value);
   }
   public void setSSLCiphers( String value ) {
-    checkSSLCiphers( value );
-    this.sslCiphers = value;
+    this.sslCiphers = (String)checkAttribute(SSL_CIPHERS_NAME, value);
   }
   public void setSSLRequireAuthentication( boolean value ){
-    checkSSLRequireAuthentication( value ? Boolean.TRUE : Boolean.FALSE );
-    this.sslRequireAuthentication = value;
+    this.sslRequireAuthentication = (Boolean)checkAttribute(SSL_REQUIRE_AUTHENTICATION_NAME, value);
   }
 
   public void setClusterSSLEnabled( boolean value ) {
-    checkClusterSSLEnabled( value ? Boolean.TRUE : Boolean.FALSE );
-    this.clusterSSLEnabled = value;
+    this.clusterSSLEnabled = (Boolean)checkAttribute(CLUSTER_SSL_ENABLED_NAME, value);
   }
   public void setClusterSSLProtocols( String value ) {
-    checkClusterSSLProtocols( value );
-    this.clusterSSLProtocols = value;
+    this.clusterSSLProtocols = (String)checkAttribute(CLUSTER_SSL_PROTOCOLS_NAME, value);
   }
   public void setClusterSSLCiphers( String value ) {
-    checkClusterSSLCiphers( value );
-    this.clusterSSLCiphers = value;
+    this.clusterSSLCiphers = (String)checkAttribute(CLUSTER_SSL_CIPHERS_NAME, value);
   }
   public void setClusterSSLRequireAuthentication( boolean value ){
-    checkClusterSSLRequireAuthentication( value ? Boolean.TRUE : Boolean.FALSE );
-    this.clusterSSLRequireAuthentication = value;
+    this.clusterSSLRequireAuthentication = (Boolean)checkAttribute(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, value);
   }
   
   public void setClusterSSLKeyStore( String value ) {
-    checkClusterSSLKeyStore( value );
+    value = (String)checkAttribute(CLUSTER_SSL_KEYSTORE_NAME, value);
    this.getClusterSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_NAME, value);
    this.clusterSSLKeyStore = value;
   }
   public void setClusterSSLKeyStoreType( String value ) {
-    checkClusterSSLKeyStoreType( value );
+    value =  (String)checkAttribute(CLUSTER_SSL_KEYSTORE_TYPE_NAME, value);
     this.getClusterSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_TYPE_NAME, value);
     this.clusterSSLKeyStoreType = value;
   }
   public void setClusterSSLKeyStorePassword( String value ) {
-    checkClusterSSLKeyStorePassword( value );
+    value = (String)checkAttribute(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME, value);
     this.getClusterSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_PASSWORD_NAME, value);
-    this.clusterSSLKeyStorePassword = value;
+    this.clusterSSLKeyStorePassword =value;
   }
   public void setClusterSSLTrustStore( String value ) {
-    checkClusterSSLTrustStore( value );
+    value = (String)checkAttribute(CLUSTER_SSL_TRUSTSTORE_NAME, value);
     this.getClusterSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_NAME, value);
     this.clusterSSLTrustStore = value;
   }
   public void setClusterSSLTrustStorePassword( String value ) {
-    checkClusterSSLTrustStorePassword( value );
+    value = (String)checkAttribute(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME, value);
     this.getClusterSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_PASSWORD_NAME, value);
     this.clusterSSLTrustStorePassword = value;
   }
@@ -1835,8 +1792,7 @@ public class DistributionConfigImpl
   }
 
   public void setMcastSendBufferSize(int value) {
-    checkMcastSendBufferSize(value);
-    mcastSendBufferSize = value;
+    mcastSendBufferSize = (Integer)checkAttribute(MCAST_SEND_BUFFER_SIZE_NAME, value);
   }
 
   public int getMcastRecvBufferSize() {
@@ -1844,20 +1800,16 @@ public class DistributionConfigImpl
   }
 
   public void setMcastRecvBufferSize(int value) {
-    checkMcastRecvBufferSize(value);
-    mcastRecvBufferSize = value;
+    mcastRecvBufferSize = (Integer)checkAttribute(MCAST_RECV_BUFFER_SIZE_NAME, value);
   }
   public void setAsyncDistributionTimeout(int value) {
-    checkAsyncDistributionTimeout(value);
-    this.asyncDistributionTimeout = value;
+    this.asyncDistributionTimeout = (Integer)checkAttribute(ASYNC_DISTRIBUTION_TIMEOUT_NAME, value);
   }
   public void setAsyncQueueTimeout(int value) {
-    checkAsyncQueueTimeout(value);
-    this.asyncQueueTimeout = value;
+    this.asyncQueueTimeout = (Integer)checkAttribute(ASYNC_QUEUE_TIMEOUT_NAME, value);
   }
   public void setAsyncMaxQueueSize(int value) {
-    checkAsyncMaxQueueSize(value);
-    this.asyncMaxQueueSize = value;
+    this.asyncMaxQueueSize = (Integer)checkAttribute(ASYNC_MAX_QUEUE_SIZE_NAME, value);
   }
 
   public FlowControlParams getMcastFlowControl() {
@@ -1865,8 +1817,7 @@ public class DistributionConfigImpl
   }
 
   public void setMcastFlowControl(FlowControlParams values) {
-    checkMcastFlowControl(values);
-    mcastFlowControl = values;
+    mcastFlowControl = (FlowControlParams)checkAttribute(MCAST_FLOW_CONTROL_NAME, values);
   }
 
   public int getUdpFragmentSize() {
@@ -1874,8 +1825,7 @@ public class DistributionConfigImpl
   }
 
   public void setUdpFragmentSize(int value) {
-    checkUdpFragmentSize(value);
-    udpFragmentSize = value;
+    udpFragmentSize = (Integer)checkAttribute(UDP_FRAGMENT_SIZE_NAME, value);
   }
 
   public int getUdpSendBufferSize() {
@@ -1883,8 +1833,7 @@ public class DistributionConfigImpl
   }
 
   public void setUdpSendBufferSize(int value) {
-    checkUdpSendBufferSize(value);
-    udpSendBufferSize = value;
+    udpSendBufferSize = (Integer)checkAttribute(UDP_SEND_BUFFER_SIZE_NAME, value);
   }
 
   public int getUdpRecvBufferSize() {
@@ -1892,8 +1841,7 @@ public class DistributionConfigImpl
   }
 
   public void setUdpRecvBufferSize(int value) {
-    checkUdpRecvBufferSize(value);
-    udpRecvBufferSize = value;
+    udpRecvBufferSize = (Integer)checkAttribute(UDP_RECV_BUFFER_SIZE_NAME, value);
   }
 
   public boolean getDisableTcp() {
@@ -1917,8 +1865,7 @@ public class DistributionConfigImpl
   }
 
   public void setMemberTimeout(int value) {
-    checkMemberTimeout(value);
-    memberTimeout = value;
+    memberTimeout = (Integer)checkAttribute(MEMBER_TIMEOUT_NAME, value);
   }
 
   /** @since 5.7 */
@@ -1928,8 +1875,7 @@ public class DistributionConfigImpl
 
   /** @since 5.7 */
   public void setClientConflation(String value) {
-    checkClientConflation(value);
-    this.clientConflation = value;
+    this.clientConflation = (String)checkAttribute(CLIENT_CONFLATION_PROP_NAME, value);
   }
 
   public String getDurableClientId() {
@@ -1937,8 +1883,7 @@ public class DistributionConfigImpl
   }
 
   public void setDurableClientId(String value) {
-    checkDurableClientId(value);
-    durableClientId = value;
+    durableClientId = (String)checkAttribute(DURABLE_CLIENT_ID_NAME, value);
   }
 
   public int getDurableClientTimeout() {
@@ -1946,8 +1891,7 @@ public class DistributionConfigImpl
   }
 
   public void setDurableClientTimeout(int value) {
-    checkDurableClientTimeout(value);
-    durableClientTimeout = value;
+    durableClientTimeout = (Integer)checkAttribute(DURABLE_CLIENT_TIMEOUT_NAME, value);
   }
 
   public String getSecurityClientAuthInit() {
@@ -1955,8 +1899,7 @@ public class DistributionConfigImpl
   }
 
   public void setSecurityClientAuthInit(String value) {
-    checkSecurityClientAuthInit(value);
-    securityClientAuthInit = value;
+    securityClientAuthInit = (String)checkAttribute(SECURITY_CLIENT_AUTH_INIT_NAME, value);
   }
 
   public String getSecurityClientAuthenticator() {
@@ -1978,8 +1921,7 @@ public class DistributionConfigImpl
   }
 
   public void setSecurityClientAuthenticator(String value) {
-    checkSecurityClientAuthenticator(value);
-    securityClientAuthenticator = value;
+    securityClientAuthenticator = (String)checkAttribute(SECURITY_CLIENT_AUTHENTICATOR_NAME, value);
   }
 
   public String getSecurityClientDHAlgo() {
@@ -1987,8 +1929,7 @@ public class DistributionConfigImpl
   }
 
   public void setSecurityClientDHAlgo(String value) {
-    checkSecurityClientDHAlgo(value);
-    securityClientDHAlgo = value;
+    securityClientDHAlgo = (String)checkAttribute(SECURITY_CLIENT_DHALGO_NAME, value);
   }
 
   public String getSecurityPeerAuthInit() {
@@ -1996,8 +1937,7 @@ public class DistributionConfigImpl
   }
 
   public void setSecurityPeerAuthInit(String value) {
-    checkSecurityPeerAuthInit(value);
-    securityPeerAuthInit = value;
+    securityPeerAuthInit = (String)checkAttribute(SECURITY_PEER_AUTH_INIT_NAME, value);
   }
 
   public String getSecurityPeerAuthenticator() {
@@ -2005,8 +1945,7 @@ public class DistributionConfigImpl
   }
 
   public void setSecurityPeerAuthenticator(String value) {
-    checkSecurityPeerAuthenticator(value);
-    securityPeerAuthenticator = value;
+    securityPeerAuthenticator = (String)checkAttribute(SECURITY_PEER_AUTHENTICATOR_NAME, value);
   }
 
   public String getSecurityClientAccessor() {
@@ -2014,8 +1953,7 @@ public class DistributionConfigImpl
   }
 
   public void setSecurityClientAccessor(String value) {
-    checkSecurityClientAccessor(value);
-    securityClientAccessor = value;
+    securityClientAccessor = (String)checkAttribute(SECURITY_CLIENT_ACCESSOR_NAME, value);
   }
 
   public String getSecurityClientAccessorPP() {
@@ -2023,8 +1961,7 @@ public class DistributionConfigImpl
   }
 
   public void setSecurityClientAccessorPP(String value) {
-    checkSecurityClientAccessorPP(value);
-    securityClientAccessorPP = value;
+    securityClientAccessorPP = (String)checkAttribute(SECURITY_CLIENT_ACCESSOR_PP_NAME, value);
   }
 
   public int getSecurityLogLevel() {
@@ -2032,8 +1969,7 @@ public class DistributionConfigImpl
   }
 
   public void setSecurityLogLevel(int value) {
-    checkSecurityLogLevel(value);
-    securityLogLevel = value;
+    securityLogLevel = (Integer)checkAttribute(SECURITY_LOG_LEVEL_NAME, value);
   }
 
   public File getSecurityLogFile() {
@@ -2041,8 +1977,7 @@ public class DistributionConfigImpl
   }
 
   public void setSecurityLogFile(File value) {
-    checkSecurityLogFile(value);
-    securityLogFile = value;
+    securityLogFile = (File)checkAttribute(SECURITY_LOG_FILE_NAME, value);
   }
 
   public int getSecurityPeerMembershipTimeout() {
@@ -2050,8 +1985,7 @@ public class DistributionConfigImpl
   }
 
   public void setSecurityPeerMembershipTimeout(int value) {
-    checkSecurityPeerMembershipTimeout(value);
-    securityPeerMembershipTimeout = value;
+    securityPeerMembershipTimeout = (Integer)checkAttribute(SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME, value);
   }
 
   public Properties getSecurityProps() {
@@ -2065,7 +1999,7 @@ public class DistributionConfigImpl
   }
 
   public void setSecurity(String attName, String attValue) {
-    checkSecurity(attName, attValue);
+    checkAttribute(attName, attValue);
     security.setProperty(attName, attValue);
   }
 
@@ -2082,8 +2016,7 @@ public class DistributionConfigImpl
   }
 
   public void setDistributedSystemId(int distributedSystemId) {
-    checkDistributedSystemId(distributedSystemId);
-    this.distributedSystemId = distributedSystemId;
+    this.distributedSystemId = (Integer)checkAttribute(DISTRIBUTED_SYSTEM_ID_NAME, distributedSystemId);
     
   }
 
@@ -2097,19 +2030,17 @@ public class DistributionConfigImpl
   }
 
   public void setEnforceUniqueHost(boolean enforceUniqueHost) {
-    checkEnforceUniqueHostModifiable();
-    this.enforceUniqueHost = enforceUniqueHost;
+    this.enforceUniqueHost = (Boolean)checkAttribute(ENFORCE_UNIQUE_HOST_NAME, enforceUniqueHost);
     
   }
 
   public void setRedundancyZone(String redundancyZone) {
-    checkRedundancyZoneModifiable();
-    this.redundancyZone = redundancyZone;
+    this.redundancyZone = (String)checkAttribute(REDUNDANCY_ZONE_NAME, redundancyZone);
     
   }
 
   public void setSSLProperty(String attName, String attValue) {
-    checkSSLPropertyModifiable();
+    checkAttribute(attName, attValue);
     if (attName.startsWith(SYS_PROP_NAME)) {
       attName = attName.substring(SYS_PROP_NAME.length());
     }
@@ -2150,11 +2081,10 @@ public class DistributionConfigImpl
     return this.groups;
   }
   public void setGroups(String value) {
-    checkGroups(value);
     if (value == null) {
       value = DEFAULT_GROUPS;
     }
-    this.groups = value;
+    this.groups = (String)checkAttribute(GROUPS_NAME, value);
   }
 
   @Override
@@ -2182,10 +2112,6 @@ public class DistributionConfigImpl
     this.jmxManagerSSL= value;
   }
   @Override
-  public boolean isJmxManagerSSLModifiable() {
-    return false;
-  }
-  @Override
   public boolean getJmxManagerSSLEnabled() {
     return this.jmxManagerSSLEnabled;
   }
@@ -2219,29 +2145,29 @@ public class DistributionConfigImpl
   }
   
   public void setJmxManagerSSLKeyStore( String value ) {
-    checkJmxManagerSSLKeyStore( value );
+    value = (String)checkAttribute(JMX_MANAGER_SSL_KEYSTORE_NAME, value);
    this.getJmxSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_NAME, value);
    this.jmxManagerSSLKeyStore = value;
   }
   public void setJmxManagerSSLKeyStoreType( String value ) {
-    checkJmxManagerSSLKeyStoreType( value );
+    value =(String)checkAttribute(JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME, value);
     this.getJmxSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_TYPE_NAME, value);
     this.jmxManagerSSLKeyStoreType = value;
   }
   public void setJmxManagerSSLKeyStorePassword( String value ) {
-    checkJmxManagerSSLKeyStorePassword( value );
+    value = (String)checkAttribute(JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME, value);
     this.getJmxSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_PASSWORD_NAME, value);
     this.jmxManagerSSLKeyStorePassword = value;
   }
   public void setJmxManagerSSLTrustStore( String value ) {
-    checkJmxManagerSSLTrustStore( value );
+    value = (String)checkAttribute(JMX_MANAGER_SSL_TRUSTSTORE_NAME, value);
     this.getJmxSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_NAME, value);
     this.jmxManagerSSLTrustStore = value;
   }
   public void setJmxManagerSSLTrustStorePassword( String value ) {
-    checkJmxManagerSSLTrustStorePassword( value );
+    value = (String)checkAttribute(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME, value);
     this.getJmxSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_PASSWORD_NAME, value);
-    this.jmxManagerSSLTrustStorePassword = value;
+    this.jmxManagerSSLTrustStorePassword =value;
   }
 
   public String getJmxManagerSSLKeyStore( ){
@@ -2269,8 +2195,7 @@ public class DistributionConfigImpl
   }
   @Override
   public void setJmxManagerPort(int value) {
-    checkJmxManagerPort(value);
-    this.jmxManagerPort = value;
+    this.jmxManagerPort = (Integer)checkAttribute(JMX_MANAGER_PORT_NAME, value);
   }
   @Override
   public String getJmxManagerBindAddress() {
@@ -2281,8 +2206,7 @@ public class DistributionConfigImpl
     if (value == null) {
       value = "";
     }
-    checkJmxManagerBindAddress(value);
-    this.jmxManagerBindAddress = value;
+    this.jmxManagerBindAddress = (String)checkAttribute(JMX_MANAGER_BIND_ADDRESS_NAME, value);
   }
   @Override
   public String getJmxManagerHostnameForClients() {
@@ -2293,8 +2217,7 @@ public class DistributionConfigImpl
     if (value == null) {
       value = "";
     }
-    checkJmxManagerHostnameForClients(value);
-    this.jmxManagerHostnameForClients = value;
+    this.jmxManagerHostnameForClients = (String)checkAttribute(JMX_MANAGER_HOSTNAME_FOR_CLIENTS_NAME, value);
   }
   @Override
   public String getJmxManagerPasswordFile() {
@@ -2305,8 +2228,7 @@ public class DistributionConfigImpl
     if (value == null) {
       value = "";
     }
-    checkJmxManagerPasswordFile(value);
-    this.jmxManagerPasswordFile = value;
+    this.jmxManagerPasswordFile = (String)checkAttribute(JMX_MANAGER_PASSWORD_FILE_NAME, value);
   }
   @Override
   public String getJmxManagerAccessFile() {
@@ -2317,8 +2239,7 @@ public class DistributionConfigImpl
     if (value == null) {
       value = "";
     }
-    checkJmxManagerAccessFile(value);
-    this.jmxManagerAccessFile = value;
+    this.jmxManagerAccessFile = (String)checkAttribute(JMX_MANAGER_ACCESS_FILE_NAME, value);
   }
   
   @Override
@@ -2338,8 +2259,7 @@ public class DistributionConfigImpl
 
   @Override
   public void setJmxManagerUpdateRate(int value) {
-    checkJmxManagerUpdateRate(value);
-    this.jmxManagerUpdateRate = value;
+    this.jmxManagerUpdateRate = (Integer)checkAttribute(JMX_MANAGER_UPDATE_RATE_NAME, value);
   }
 
   @Override
@@ -3177,15 +3097,14 @@ public class DistributionConfigImpl
    * @see com.gemstone.gemfire.distributed.internal.DistributionConfig#setMembershipPortRange(int[])
    */
   public void setMembershipPortRange(int[] range) {
-    checkMembershipPortRange(range);
-    membershipPortRange = range;
+    membershipPortRange = (int[])checkAttribute(MEMBERSHIP_PORT_RANGE_NAME, range);
   }
   
   /**
    * Set the host-port information of remote site locator 
    */
   public void setRemoteLocators(String value) {
-    this.remoteLocators = checkRemoteLocators(value);
+    this.remoteLocators = (String)checkAttribute(REMOTE_LOCATORS_NAME, value);
   }
 
   /**
@@ -3206,8 +3125,7 @@ public class DistributionConfigImpl
 
   @Override
   public void setMemcachedPort(int value) {
-    checkMemcachedPort(value);
-    this.memcachedPort = value;
+    this.memcachedPort = (Integer)checkAttribute(MEMCACHED_PORT_NAME, value);
   }
 
   @Override
@@ -3217,8 +3135,7 @@ public class DistributionConfigImpl
 
   @Override
   public void setMemcachedProtocol(String protocol) {
-    checkMemcachedProtocol(protocol);
-    this.memcachedProtocol = protocol;
+    this.memcachedProtocol = (String)checkAttribute(MEMCACHED_PROTOCOL_NAME, protocol);
   }
   
   @Override
@@ -3228,8 +3145,7 @@ public class DistributionConfigImpl
   
   @Override
   public void setRedisPort(int value) {
-    checkRedisPort(value);
-    this.redisPort = value;
+    this.redisPort = (Integer)checkAttribute(REDIS_PORT_NAME, value);
   }
 
   @Override
@@ -3239,8 +3155,7 @@ public class DistributionConfigImpl
   
   @Override
   public void setRedisBindAddress(String bindAddress) {
-    checkRedisBindAddress(bindAddress);
-    this.redisBindAddress = bindAddress;
+    this.redisBindAddress = (String)checkAttribute(REDIS_BIND_ADDRESS_NAME, bindAddress);
   }
   
   @Override
@@ -3260,12 +3175,7 @@ public class DistributionConfigImpl
   
   @Override 
   public void setOffHeapMemorySize(String value) {
-    checkOffHeapMemorySize(value);
-    this.offHeapMemorySize = value;
-  }
-  
-  protected void checkOffHeapMemorySize(String value) {
-    super.checkOffHeapMemorySize(value);
+    this.offHeapMemorySize = (String)checkAttribute(OFF_HEAP_MEMORY_SIZE_NAME, value);
   }
 
   @Override
@@ -3275,14 +3185,12 @@ public class DistributionConfigImpl
 
   @Override
   public void setMemcachedBindAddress(String bindAddress) {
-    checkMemcachedBindAddress(bindAddress);
-    this.memcachedBindAddress = bindAddress;
+    this.memcachedBindAddress = (String)checkAttribute(MEMCACHED_BIND_ADDRESS_NAME, bindAddress);
   }
 
   @Override
   public void setEnableClusterConfiguration(boolean value) {
-    checkEnableSharedConfiguration();
-    this.enableSharedConfiguration = value;
+    this.enableSharedConfiguration = (Boolean)checkAttribute(ENABLE_CLUSTER_CONFIGURATION_NAME, value);
   }
 
   @Override
@@ -3293,8 +3201,7 @@ public class DistributionConfigImpl
   
   @Override
   public void setUseSharedConfiguration(boolean newValue) {
-    checkUseSharedConfiguration();
-    this.useSharedConfiguration = newValue;
+    this.useSharedConfiguration = (Boolean)checkAttribute(USE_CLUSTER_CONFIGURATION_NAME, newValue);
   }
   
   @Override
@@ -3303,8 +3210,7 @@ public class DistributionConfigImpl
   }
   @Override
   public void setLoadClusterConfigFromDir(boolean newValue) {
-    checkLoadSharedConfigFromDir();
-    this.loadSharedConfigurationFromDir = newValue;
+    this.loadSharedConfigurationFromDir = (Boolean)checkAttribute(LOAD_CLUSTER_CONFIG_FROM_DIR_NAME, newValue);
   }
   
   @Override
@@ -3314,8 +3220,7 @@ public class DistributionConfigImpl
   
   @Override
   public void setClusterConfigDir(String clusterConfigDir) {
-    checkClusterConfigDir();
-    this.clusterConfigDir = clusterConfigDir;
+    this.clusterConfigDir = (String)checkAttribute(CLUSTER_CONFIGURATION_DIR, clusterConfigDir);
   }  
   
   @Override
@@ -3329,8 +3234,7 @@ public class DistributionConfigImpl
 
   @Override
   public void setServerSSLEnabled(boolean value) {
-    checkServerSSLEnabled();
-    this.serverSSLEnabled = value;
+    this.serverSSLEnabled = (Boolean)checkAttribute(SERVER_SSL_ENABLED_NAME, value);
     
   }
 
@@ -3341,8 +3245,7 @@ public class DistributionConfigImpl
 
   @Override
   public void setServerSSLRequireAuthentication(boolean value) {
-    checkServerSSLRequireAuthentication();
-    this.serverSslRequireAuthentication = value;
+    this.serverSslRequireAuthentication = (Boolean)checkAttribute(SERVER_SSL_REQUIRE_AUTHENTICATION_NAME, value);
   }
 
   @Override
@@ -3352,8 +3255,7 @@ public class DistributionConfigImpl
 
   @Override
   public void setServerSSLProtocols(String protocols) {
-    checkServerSSLProtocols();
-    this.serverSslProtocols = protocols;    
+    this.serverSslProtocols = (String)checkAttribute(SERVER_SSL_PROTOCOLS_NAME, protocols);
   }
 
   @Override
@@ -3363,32 +3265,31 @@ public class DistributionConfigImpl
 
   @Override
   public void setServerSSLCiphers(String ciphers) {
-   checkServerSSLCiphers();
-    this.serverSslCiphers = ciphers;
+    this.serverSslCiphers = (String)checkAttribute(SERVER_SSL_CIPHERS_NAME, ciphers);
   }
 
   public void setServerSSLKeyStore( String value ) {
-    checkServerSSLKeyStore( value );
+    value = (String)checkAttribute(SERVER_SSL_KEYSTORE_NAME, value);
    this.getServerSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_NAME, value);
    this.serverSSLKeyStore = value;
   }
   public void setServerSSLKeyStoreType( String value ) {
-    checkServerSSLKeyStoreType( value );
+    value = (String)checkAttribute(SERVER_SSL_KEYSTORE_TYPE_NAME, value);
     this.getServerSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_TYPE_NAME, value);
     this.serverSSLKeyStoreType = value;
   }
   public void setServerSSLKeyStorePassword( String value ) {
-    checkServerSSLKeyStorePassword( value );
+    value = (String) checkAttribute(SERVER_SSL_KEYSTORE_PASSWORD_NAME,  value );
     this.getServerSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_PASSWORD_NAME, value);
     this.serverSSLKeyStorePassword = value;
   }
   public void setServerSSLTrustStore( String value ) {
-    checkServerSSLTrustStore( value );
+    value = (String)checkAttribute(SERVER_SSL_TRUSTSTORE_NAME, value);
     this.getServerSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_NAME, value);
     this.serverSSLTrustStore = value;
   }
   public void setServerSSLTrustStorePassword( String value ) {
-    checkServerSSLTrustStorePassword( value );
+    value = (String)checkAttribute(SERVER_SSL_TRUSTSTORE_PASSWORD_NAME, value);
     this.getServerSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_PASSWORD_NAME, value);
     this.serverSSLTrustStorePassword = value;
   }
@@ -3424,8 +3325,7 @@ public class DistributionConfigImpl
 
   @Override
   public void setGatewaySSLEnabled(boolean value) {
-    checkServerSSLEnabled();
-    this.gatewaySSLEnabled = value;
+    this.gatewaySSLEnabled = (Boolean)checkAttribute(SERVER_SSL_ENABLED_NAME, value);
     
   }
 
@@ -3436,8 +3336,7 @@ public class DistributionConfigImpl
 
   @Override
   public void setGatewaySSLRequireAuthentication(boolean value) {
-    checkGatewaySSLRequireAuthentication();
-    this.gatewaySslRequireAuthentication = value;
+    this.gatewaySslRequireAuthentication = (Boolean)checkAttribute(GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME, value);
   }
 
   @Override
@@ -3447,8 +3346,7 @@ public class DistributionConfigImpl
 
   @Override
   public void setGatewaySSLProtocols(String protocols) {
-    checkServerSSLProtocols();
-    this.gatewaySslProtocols = protocols;    
+    this.gatewaySslProtocols = (String)checkAttribute(SERVER_SSL_PROTOCOLS_NAME, protocols);
   }
 
   @Override
@@ -3458,32 +3356,31 @@ public class DistributionConfigImpl
 
   @Override
   public void setGatewaySSLCiphers(String ciphers) {
-   checkGatewaySSLCiphers();
-    this.gatewaySslCiphers = ciphers;
+    this.gatewaySslCiphers = (String)checkAttribute(GATEWAY_SSL_CIPHERS_NAME, ciphers);
   }
 
   public void setGatewaySSLKeyStore( String value ) {
-    checkGatewaySSLKeyStore( value );
+    checkAttribute(GATEWAY_SSL_KEYSTORE_NAME, value);
    this.getGatewaySSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_NAME, value);
    this.gatewaySSLKeyStore = value;
   }
   public void setGatewaySSLKeyStoreType( String value ) {
-    checkGatewaySSLKeyStoreType( value );
+    checkAttribute(GATEWAY_SSL_KEYSTORE_TYPE_NAME, value);
     this.getGatewaySSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_TYPE_NAME, value);
     this.gatewaySSLKeyStoreType = value;
   }
   public void setGatewaySSLKeyStorePassword( String value ) {
-    checkGatewaySSLKeyStorePassword( value );
+    checkAttribute(GATEWAY_SSL_KEYSTORE_PASSWORD_NAME, value);
     this.getGatewaySSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_PASSWORD_NAME, value);
     this.gatewaySSLKeyStorePassword = value;
   }
   public void setGatewaySSLTrustStore( String value ) {
-    checkGatewaySSLTrustStore( value );
+    checkAttribute(GATEWAY_SSL_TRUSTSTORE_NAME, value);
     this.getGatewaySSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_NAME, value);
     this.gatewaySSLTrustStore = value;
   }
   public void setGatewaySSLTrustStorePassword( String value ) {
-    checkGatewaySSLTrustStorePassword( value );
+    checkAttribute(GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME, value);
     this.getGatewaySSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_PASSWORD_NAME, value);
     this.gatewaySSLTrustStorePassword = value;
   }
@@ -3560,7 +3457,7 @@ public class DistributionConfigImpl
 
   @Override
   public void setHttpServiceSSLKeyStore(String httpServiceSSLKeyStore) {
-    checkHttpServiceSSLKeyStore(httpServiceSSLKeyStore);
+    checkAttribute(HTTP_SERVICE_SSL_KEYSTORE_NAME, httpServiceSSLKeyStore);
     this.getHttpServiceSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_NAME, httpServiceSSLKeyStore);
     this.httpServiceSSLKeyStore = httpServiceSSLKeyStore;
   }
@@ -3572,7 +3469,7 @@ public class DistributionConfigImpl
 
   @Override
   public void setHttpServiceSSLKeyStoreType(String httpServiceSSLKeyStoreType) {
-    checkHttpServiceSSLKeyStoreType(httpServiceSSLKeyStoreType);
+    checkAttribute(HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME, httpServiceSSLKeyStoreType);
     this.getHttpServiceSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_TYPE_NAME, httpServiceSSLKeyStoreType);
     this.httpServiceSSLKeyStoreType = httpServiceSSLKeyStoreType;
   }
@@ -3584,7 +3481,7 @@ public class DistributionConfigImpl
 
   @Override
   public void setHttpServiceSSLKeyStorePassword(String httpServiceSSLKeyStorePassword) {
-    checkHttpServiceSSLKeyStorePassword(httpServiceSSLKeyStorePassword);
+    checkAttribute(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, httpServiceSSLKeyStorePassword);
     this.getHttpServiceSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_PASSWORD_NAME,
         httpServiceSSLKeyStorePassword);
     this.httpServiceSSLKeyStorePassword = httpServiceSSLKeyStorePassword;
@@ -3597,7 +3494,7 @@ public class DistributionConfigImpl
 
   @Override
   public void setHttpServiceSSLTrustStore(String httpServiceSSLTrustStore) {
-    checkHttpServiceSSLTrustStore(httpServiceSSLTrustStore);
+    checkAttribute(HTTP_SERVICE_SSL_TRUSTSTORE_NAME, httpServiceSSLTrustStore);
     this.getHttpServiceSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_NAME, httpServiceSSLTrustStore);
     this.httpServiceSSLTrustStore = httpServiceSSLTrustStore;
   }
@@ -3609,7 +3506,7 @@ public class DistributionConfigImpl
   
   @Override
   public void setHttpServiceSSLTrustStorePassword(String httpServiceSSLTrustStorePassword) {
-    checkHttpServiceSSLTrustStorePassword(httpServiceSSLTrustStorePassword);
+    checkAttribute(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME, httpServiceSSLTrustStorePassword);
     this.getHttpServiceSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_PASSWORD_NAME,
         httpServiceSSLTrustStorePassword);
     this.httpServiceSSLTrustStorePassword = httpServiceSSLTrustStorePassword;
@@ -3631,4 +3528,6 @@ public class DistributionConfigImpl
     this.distributedTransactions = value;
   }
 
+
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
index 299744a..f2e3a62 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
@@ -17,12 +17,14 @@
    
 package com.gemstone.gemfire.distributed.internal;
 
-import java.io.File;
-
 import com.gemstone.gemfire.GemFireIOException;
 import com.gemstone.gemfire.internal.ConfigSource;
 import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppenders;
 
+import java.io.File;
+import java.util.Arrays;
+import java.util.List;
+
 /**
  * Provides an implementation of <code>DistributionConfig</code> that
  * is used at runtime by a {@link InternalDistributedSystem}. It allows
@@ -56,33 +58,23 @@ public final class RuntimeDistributionConfigImpl
   }
 
   ////////////////////  Configuration Methods  ////////////////////
-
   @Override
   public void setLogLevel(int value) {
-    checkLogLevel(value);
-    this.logLevel = value;
+    this.logLevel = (Integer)checkAttribute(LOG_LEVEL_NAME, value);
     getAttSourceMap().put(LOG_LEVEL_NAME, ConfigSource.runtime());
     this.ds.getInternalLogWriter().setLogWriterLevel(value);
     LogWriterAppenders.configChanged(LogWriterAppenders.Identifier.MAIN);
   }
-  @Override
-  public boolean isLogLevelModifiable() {
-    return true;
-  }
   
   @Override
   public void setStatisticSamplingEnabled(boolean value) {
-    checkStatisticSamplingEnabled(value);
-    this.statisticSamplingEnabled = value;
+    this.statisticSamplingEnabled = (Boolean)checkAttribute(STATISTIC_SAMPLING_ENABLED_NAME, value);
     getAttSourceMap().put(STATISTIC_SAMPLING_ENABLED_NAME, ConfigSource.runtime());
   }
-  @Override
-  public boolean isStatisticSamplingEnabledModifiable() {
-    return true;
-  }
+
   @Override
   public void setStatisticSampleRate(int value) {
-    checkStatisticSampleRate(value);
+    value = (Integer)checkAttribute(STATISTIC_SAMPLE_RATE_NAME, value);
     if (value < DEFAULT_STATISTIC_SAMPLE_RATE) {
       // fix 48228
       this.ds.getLogWriter().info("Setting statistic-sample-rate to " + DEFAULT_STATISTIC_SAMPLE_RATE + " instead of the requested " + value + " because VSD does not work with sub-second sampling.");
@@ -90,13 +82,10 @@ public final class RuntimeDistributionConfigImpl
     }
     this.statisticSampleRate = value;
   }
-  @Override
-  public boolean isStatisticSampleRateModifiable() {
-    return true;
-  }
+
   @Override
   public void setStatisticArchiveFile(File value) {
-    checkStatisticArchiveFile(value);
+    value = (File)checkAttribute(STATISTIC_ARCHIVE_FILE_NAME, value);
     if (value == null) {
       value = new File("");
     }
@@ -108,55 +97,42 @@ public final class RuntimeDistributionConfigImpl
     this.statisticArchiveFile = value;
     getAttSourceMap().put(STATISTIC_ARCHIVE_FILE_NAME, ConfigSource.runtime());
   }
-  @Override
-  public boolean isStatisticArchiveFileModifiable() {
-    return true;
-  }
+
 
   @Override
   public void setArchiveDiskSpaceLimit(int value) {
-    checkArchiveDiskSpaceLimit(value);
-    this.archiveDiskSpaceLimit = value;
+    this.archiveDiskSpaceLimit = (Integer)checkAttribute(ARCHIVE_DISK_SPACE_LIMIT_NAME, value);
     getAttSourceMap().put(ARCHIVE_DISK_SPACE_LIMIT_NAME, ConfigSource.runtime());
   }
-  @Override
-  public boolean isArchiveDiskSpaceLimitModifiable() {
-    return true;
-  }
+
   @Override
   public void setArchiveFileSizeLimit(int value) {
-    checkArchiveFileSizeLimit(value);
-    this.archiveFileSizeLimit = value;
+    this.archiveFileSizeLimit = (Integer)checkAttribute(ARCHIVE_FILE_SIZE_LIMIT_NAME, value);
     getAttSourceMap().put(ARCHIVE_FILE_SIZE_LIMIT_NAME, ConfigSource.runtime());
   }
-  @Override
-  public boolean isArchiveFileSizeLimitModifiable() {
-    return true;
-  }
+
   @Override
   public void setLogDiskSpaceLimit(int value) {
-    checkLogDiskSpaceLimit(value);
-    this.logDiskSpaceLimit = value;
+    this.logDiskSpaceLimit = (Integer)checkAttribute(LOG_DISK_SPACE_LIMIT_NAME, value);
     getAttSourceMap().put(LOG_DISK_SPACE_LIMIT_NAME, ConfigSource.runtime());
     LogWriterAppenders.configChanged(LogWriterAppenders.Identifier.MAIN);
   }
-  @Override
-  public boolean isLogDiskSpaceLimitModifiable() {
-    return true;
-  }
+
   @Override
   public void setLogFileSizeLimit(int value) {
-    checkLogFileSizeLimit(value);
-    this.logFileSizeLimit = value;
+    this.logFileSizeLimit = (Integer)checkAttribute(LOG_FILE_SIZE_LIMIT_NAME, value);
     getAttSourceMap().put(this.LOG_FILE_SIZE_LIMIT_NAME, ConfigSource.runtime());
     LogWriterAppenders.configChanged(LogWriterAppenders.Identifier.MAIN);
   }
-  @Override
-  public boolean isLogFileSizeLimitModifiable() {
-    return true;
-  }
 
   public DistributionConfig takeSnapshot() {
     return new DistributionConfigSnapshot(this);
   }
+
+  public List<String> getModifiableAttributes(){
+    String[] modifiables = {HTTP_SERVICE_PORT_NAME,JMX_MANAGER_HTTP_PORT_NAME, ARCHIVE_DISK_SPACE_LIMIT_NAME,
+            ARCHIVE_FILE_SIZE_LIMIT_NAME, LOG_DISK_SPACE_LIMIT_NAME, LOG_FILE_SIZE_LIMIT_NAME,
+            LOG_LEVEL_NAME, STATISTIC_ARCHIVE_FILE_NAME, STATISTIC_SAMPLE_RATE_NAME, STATISTIC_SAMPLING_ENABLED_NAME};
+    return Arrays.asList(modifiables);
+  };
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
index ddf2970..ee4aceb 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
@@ -17,31 +17,18 @@
 
 package com.gemstone.gemfire.internal;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.reflect.Array;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.TreeSet;
-
 import com.gemstone.gemfire.InternalGemFireException;
 import com.gemstone.gemfire.UnmodifiableException;
-import com.gemstone.gemfire.distributed.internal.AbstractDistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.FlowControlParams;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 
+import java.io.*;
+import java.lang.reflect.Array;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+
 /**
  * Provides an implementation of the {@link Config} interface
  * that implements functionality that all {@link Config} implementations
@@ -71,16 +58,6 @@ public abstract class AbstractConfig implements Config {
   protected boolean _modifiableDefault() {
     return false;
   }
-
-  /**
-   * Checks to see if the named attribute can be modified.
-   * @throws UnmodifiableException if it is unmodifiable.
-   */
-  protected void _checkIfModifiable(String attName) {
-    if (!isAttributeModifiable(attName)) {
-      throw new UnmodifiableException(_getUnmodifiableMsg(attName));
-    }
-  }
   
   /**
    * Use {@link #toLoggerString()} instead. If you need to override this in a 
@@ -117,7 +94,6 @@ public abstract class AbstractConfig implements Config {
   public Map<String, String> getConfigPropsFromSource(ConfigSource source) {
     Map<String, String> configProps = new HashMap<String, String>();
     String[] validAttributeNames = getAttributeNames();
-    boolean sourceFound = false;
     Map<String, ConfigSource> sm = getAttSourceMap();
     
     for (int i=0; i < validAttributeNames.length; i++) {
@@ -128,14 +104,6 @@ public abstract class AbstractConfig implements Config {
         }
       } else if (!source.equals(sm.get(attName))) {
         continue;
-      } 
-      if (!sourceFound) {
-        sourceFound = true;
-        if (source == null) {
-          //configProps.put(sourceHeader, "### GemFire Properties using default values ###");
-        } else {
-          //configProps.put(sourceHeader, "### GemFire Properties defined with " + source.getDescription() + " ###");
-        }
       }
       configProps.put(attName, this.getAttribute(attName));
     }
@@ -328,12 +296,18 @@ public abstract class AbstractConfig implements Config {
     Object result = getAttributeObject(attName);
     if (result instanceof String) {
       return (String)result;
-    } if (attName.equalsIgnoreCase(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME)) {
+    }
+
+    if (attName.equalsIgnoreCase(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME)) {
       int[] value = (int[])result;
       return ""+value[0]+"-"+value[1];
-    } else if (result.getClass().isArray()) {
+    }
+
+    if (result.getClass().isArray()) {
       return SystemAdmin.join((Object[])result);
-    } else if (result instanceof InetAddress) {
+    }
+
+    if (result instanceof InetAddress) {
       InetAddress addr = (InetAddress)result;
       String addrName = null;
       if (addr.isMulticastAddress() || !SocketCreator.resolve_dns) {
@@ -342,9 +316,9 @@ public abstract class AbstractConfig implements Config {
         addrName = SocketCreator.getHostName(addr);
       }
       return addrName;
-    } else {
-      return result.toString();
     }
+
+    return result.toString();
   }
 
   public ConfigSource getAttributeSource(String attName) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/main/java/com/gemstone/gemfire/internal/ConfigSource.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/ConfigSource.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/ConfigSource.java
index 08f51e4..6991b3b 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/ConfigSource.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/ConfigSource.java
@@ -29,10 +29,31 @@ public class ConfigSource implements Serializable {
   public enum Type {API, SYSTEM_PROPERTY, FILE, SECURE_FILE, XML, RUNTIME, LAUNCHER};
   private final Type type;
   private final String description;
-  
-  private ConfigSource(Type t, String d) {
+
+  private ConfigSource(Type t) {
     this.type = t;
-    this.description = d;
+    switch (t) {
+      case API: this.description = "api"; break;
+      case SYSTEM_PROPERTY: this.description = "system property"; break;
+      case FILE: this.description = "file"; break;
+      case SECURE_FILE: this.description = "secure file"; break;
+      case XML: this.description = "cache.xml"; break;
+      case RUNTIME: this.description = "runtime modification"; break;
+      case LAUNCHER: this.description = "launcher"; break;
+      default:
+        this.description = "";
+    }
+  }
+
+  private ConfigSource(String fileName, boolean secure) {
+    if(secure) {
+      this.type = Type.SECURE_FILE;
+      this.description = (fileName==null)?"secure file":fileName;
+    }
+    else {
+      this.type = Type.FILE;
+      this.description = (fileName==null)?"file":fileName;
+    }
   }
   /**
    * @return returns the type of this source
@@ -41,32 +62,20 @@ public class ConfigSource implements Serializable {
     return this.type;
   }
   public String getDescription() {
-    String result = this.description;
-    if (result == null) {
-      switch (getType()) {
-      case API: result = "api"; break;
-      case SYSTEM_PROPERTY: result = "system property"; break;
-      case FILE: result = "file"; break;
-      case SECURE_FILE: result = "secure file"; break;
-      case XML: result = "cache.xml"; break;
-      case RUNTIME: result = "runtime modification"; break;
-      case LAUNCHER: result = "launcher"; break;
-      }
-    }
-    return result;
+    return this.description;
   }
 
-  private static final ConfigSource API_SINGLETON = new ConfigSource(Type.API, null);
-  private static final ConfigSource SYSPROP_SINGLETON = new ConfigSource(Type.SYSTEM_PROPERTY, null);
-  private static final ConfigSource XML_SINGLETON = new ConfigSource(Type.XML, null);
-  private static final ConfigSource RUNTIME_SINGLETON = new ConfigSource(Type.RUNTIME, null);
-  private static final ConfigSource LAUNCHER_SINGLETON = new ConfigSource(Type.LAUNCHER, null);
+  private static final ConfigSource API_SINGLETON = new ConfigSource(Type.API);
+  private static final ConfigSource SYSPROP_SINGLETON = new ConfigSource(Type.SYSTEM_PROPERTY);
+  private static final ConfigSource XML_SINGLETON = new ConfigSource(Type.XML);
+  private static final ConfigSource RUNTIME_SINGLETON = new ConfigSource(Type.RUNTIME);
+  private static final ConfigSource LAUNCHER_SINGLETON = new ConfigSource(Type.LAUNCHER);
   
   public static ConfigSource api() {return API_SINGLETON;}
   public static ConfigSource sysprop() {return SYSPROP_SINGLETON;}
   public static ConfigSource xml() {return XML_SINGLETON;}
   public static ConfigSource runtime() {return RUNTIME_SINGLETON;}
-  public static ConfigSource file(String fileName, boolean secure) {return new ConfigSource(secure ? Type.SECURE_FILE : Type.FILE, fileName);}
+  public static ConfigSource file(String fileName, boolean secure) {return new ConfigSource(fileName, secure);}
   public static ConfigSource launcher() {return LAUNCHER_SINGLETON;}
   
   @Override
@@ -87,14 +96,9 @@ public class ConfigSource implements Serializable {
     if (getClass() != obj.getClass())
       return false;
     ConfigSource other = (ConfigSource) obj;
-    if (description == null) {
-      if (other.description != null)
-        return false;
-    } else if (!description.equals(other.description))
-      return false;
-    if (type != other.type)
-      return false;
-    return true;
+
+    return (type == other.type
+            && description.equals(other.description));
   }
   
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/LogConfig.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/LogConfig.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/LogConfig.java
index 8c8dd5c..3e4fbc6 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/LogConfig.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/LogConfig.java
@@ -46,7 +46,17 @@ public interface LogConfig {
    * property
    */
   public int getLogDiskSpaceLimit();
-  
+
+  /**
+   * Returns the value of the <a
+   * href="../DistributedSystem.html#name">"name"</a> property
+   * Gets the member's name.
+   * A name is optional and by default empty.
+   * If set it must be unique in the ds.
+   * When set its used by tools to help identify the member.
+   * <p> The default value is: {@link #DEFAULT_NAME}.
+   * @return the system's name.
+   */
   public String getName();
   
   public String toLoggerString();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
new file mode 100644
index 0000000..d2b5643
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@ -0,0 +1,313 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed.internal;
+
+import com.gemstone.gemfire.InternalGemFireException;
+import com.gemstone.gemfire.UnmodifiableException;
+import com.gemstone.gemfire.internal.ConfigSource;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.lang.reflect.Method;
+import java.util.*;
+
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+/**
+ * Created by jiliao on 2/2/16.
+ */
+@Category(UnitTest.class)
+
+public class DistributionConfigJUnitTest {
+  static Map<String, ConfigAttribute> attributes;
+  static Map<String, Method> setters;
+  static Map<String, Method> getters;
+  static Map<String, Method> isModifiables;
+  static Map<String, Method> checkers;
+  static String[] attNames;
+  DistributionConfigImpl config;
+
+  @BeforeClass
+  public static void beforeClass() {
+    attributes = DistributionConfig.attributes;
+    setters = DistributionConfig.setters;
+    getters = DistributionConfig.getters;
+    attNames = DistributionConfig.dcValidAttributeNames;
+    checkers = AbstractDistributionConfig.checkers;
+  }
+
+  @Before
+  public void before() {
+    config = new DistributionConfigImpl(new Properties());
+  }
+
+  @Test
+  public void testGetAttributeNames() {
+    String[] attNames = AbstractDistributionConfig._getAttNames();
+    assertEquals(attNames.length, 140);
+
+    List boolList = new ArrayList();
+    List intList = new ArrayList();
+    List fileList = new ArrayList();
+    List stringList = new ArrayList();
+    List otherList = new ArrayList();
+    for (String attName : attNames) {
+      Class clazz = AbstractDistributionConfig._getAttributeType(attName);
+      if (clazz.equals(Boolean.class)) {
+        boolList.add(attName);
+      } else if (clazz.equals(Integer.class)) {
+        intList.add(attName);
+      } else if (clazz.equals(String.class)) {
+        stringList.add(attName);
+      } else if (clazz.equals(File.class)) {
+        fileList.add(attName);
+      } else {
+        otherList.add(attName);
+      }
+    }
+
+    System.out.println("boolList: " + boolList);
+    System.out.println();
+    System.out.println("intList: " + intList);
+    System.out.println();
+    System.out.println("stringlList: " + stringList);
+    System.out.println();
+    System.out.println("filelList: " + fileList);
+    System.out.println();
+    System.out.println("otherList: " + otherList);
+    assertEquals(boolList.size(), 30);
+    assertEquals(intList.size(), 33);
+    assertEquals(stringList.size(), 69);
+    assertEquals(fileList.size(), 5);
+    assertEquals(otherList.size(), 3);
+  }
+
+  @Test
+  public void sameCount() {
+    assertEquals(attributes.size(), setters.size());
+    assertEquals(setters.size(), getters.size());
+  }
+
+  @Test
+  public void everyAttrHasValidSetter() {
+    for (String attr : attributes.keySet()) {
+      Method setter = setters.get(attr);
+      assertNotNull(attr + " should have a setter", setter);
+      assertTrue(setter.getName().startsWith("set"));
+      assertEquals(setter.getParameterCount(), 1);
+
+      if (!(attr.equalsIgnoreCase(DistributionConfig.LOG_LEVEL_NAME) || attr.equalsIgnoreCase(DistributionConfig.SECURITY_LOG_LEVEL_NAME))) {
+        Class clazz = attributes.get(attr).type();
+        try {
+          setter.invoke(mock(DistributionConfig.class), any(clazz));
+        } catch (Exception e) {
+          throw new RuntimeException("Error calling setter " + setter.getName(), e);
+        }
+      }
+
+    }
+  }
+
+  @Test
+  public void everyAttrHasValidGetter() {
+    for (String attr : attributes.keySet()) {
+      Method getter = getters.get(attr);
+      assertNotNull(attr + " should have a getter", getter);
+      assertTrue(getter.getName().startsWith("get"));
+      assertEquals(getter.getParameterCount(), 0);
+
+      if (!(attr.equalsIgnoreCase(DistributionConfig.LOG_LEVEL_NAME) || attr.equalsIgnoreCase(DistributionConfig.SECURITY_LOG_LEVEL_NAME))) {
+        Class clazz = attributes.get(attr).type();
+        Class returnClass = getter.getReturnType();
+        if (returnClass.isPrimitive()) {
+          returnClass = classMap.get(returnClass);
+        }
+        assertEquals(returnClass, clazz);
+      }
+    }
+  }
+
+  @Test
+  public void everyGetterSetterSameNameSameType() {
+    for (String attr : getters.keySet()) {
+      Method getter = getters.get(attr);
+      Method setter = setters.get(attr);
+      assertNotNull("every getter should have a corresponding setter " + attr, setter);
+      String setterName = setter.getName();
+      String getterName = getter.getName();
+      assertEquals(setterName.substring(setterName.indexOf("set") + 3), getterName.substring(getterName.indexOf("get") + 3));
+      assertEquals(setter.getParameterTypes()[0], getter.getReturnType());
+    }
+
+    for (String attr : setters.keySet()) {
+      Method getter = getters.get(attr);
+      assertNotNull("every setter should have a corresponding getter: " + attr, getter);
+    }
+  }
+
+  @Test
+  public void everySetterHasAttributeDefined() {
+    for (String attr : setters.keySet()) {
+      ConfigAttribute configAttribute = attributes.get(attr);
+      assertNotNull(attr + " should be defined a ConfigAttribute", configAttribute);
+    }
+  }
+
+  @Test
+  public void everyGetterHasAttributeDefined() {
+    for (String attr : getters.keySet()) {
+      ConfigAttribute configAttribute = attributes.get(attr);
+      assertNotNull(attr + " should be defined a ConfigAttribute", configAttribute);
+    }
+  }
+
+  @Test
+  public void testGetAttributeObject() {
+    assertEquals(config.getAttributeObject(DistributionConfig.LOG_LEVEL_NAME), "config");
+    assertEquals(config.getAttributeObject(DistributionConfig.SECURITY_LOG_LEVEL_NAME), "config");
+    assertEquals(config.getAttributeObject(DistributionConfig.REDUNDANCY_ZONE_NAME), "");
+    assertEquals(config.getAttributeObject(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME).getClass(), Boolean.class);
+  }
+
+  @Test
+  public void testCheckerChecksValidAttribute() {
+    for (String att : checkers.keySet()) {
+      assertTrue(attributes.containsKey(att));
+      Method checker = checkers.get(att);
+      assertEquals(checker.getParameterCount(), 1);
+      assertEquals("invalid checker: " + checker.getName(), checker.getReturnType(), checker.getParameterTypes()[0]);
+
+      //TODO assert checker and setter accepts this same type of parameter
+    }
+  }
+
+  @Test
+  public void testDistributionConfigImplModifiable() {
+    // default DistributionConfigImpl contains only 2 modifiable attributes
+    List modifiables = new ArrayList<>();
+    for (String attName : attNames) {
+      if (config.isAttributeModifiable(attName)) {
+        modifiables.add(attName);
+      }
+    }
+    assertEquals(modifiables.size(), 2);
+    assertEquals(modifiables.get(0), "http-service-port");
+    assertEquals(modifiables.get(1), "jmx-manager-http-port");
+  }
+
+  @Test
+  public void testRuntimeConfigModifiable() {
+    InternalDistributedSystem ds = mock(InternalDistributedSystem.class);
+    when(ds.getOriginalConfig()).thenReturn(config);
+    RuntimeDistributionConfigImpl runtime = new RuntimeDistributionConfigImpl(ds);
+    List modifiables = new ArrayList<>();
+    for (String attName : attNames) {
+      if (runtime.isAttributeModifiable(attName)) {
+        modifiables.add(attName);
+      }
+    }
+    assertEquals(modifiables.size(), 10);
+    assertEquals(modifiables.get(0), "archive-disk-space-limit");
+    assertEquals(modifiables.get(1), "archive-file-size-limit");
+    assertEquals(modifiables.get(2), "http-service-port");
+    assertEquals(modifiables.get(3), "jmx-manager-http-port");
+    assertEquals(modifiables.get(4), "log-disk-space-limit");
+    assertEquals(modifiables.get(5), "log-file-size-limit");
+    assertEquals(modifiables.get(6), "log-level");
+    assertEquals(modifiables.get(7), "statistic-archive-file");
+    assertEquals(modifiables.get(8), "statistic-sample-rate");
+    assertEquals(modifiables.get(9), "statistic-sampling-enabled");
+
+  }
+
+  @Test(expected = IllegalArgumentException.class)
+  public void testSetInvalidAttributeObject() {
+    config.setAttributeObject("fake attribute", "test", ConfigSource.api());
+  }
+
+  @Test(expected = UnmodifiableException.class)
+  public void testSetUnmodifiableAttributeObject() {
+    config.setAttributeObject("archive-disk-space-limit", 0, ConfigSource.api());
+  }
+
+  @Test
+  public void testValidAttributeObject() {
+    config.setAttributeObject("http-service-port", 8080, ConfigSource.api());
+    assertEquals(config.getHttpServicePort(), 8080);
+  }
+
+  @Test(expected = IllegalArgumentException.class)
+  public void testOutOfRangeAttributeObject() {
+    config.setAttributeObject("http-service-port", -1, ConfigSource.api());
+  }
+
+  @Test
+  public void testLogLevel() {
+    config.modifiable = true;
+    config.setAttribute(DistributionConfig.LOG_LEVEL_NAME, "config", ConfigSource.api());
+    assertEquals(config.getLogLevel(), 700);
+
+    config.setAttributeObject(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "debug", ConfigSource.api());
+    assertEquals(config.getSecurityLogLevel(), 500);
+  }
+
+  @Test
+  public void testValidLocatorAddress() {
+    String address = "81.240.0.1[7056]";
+    config.modifiable = true;
+    config.setStartLocator(address);
+    assertEquals(config.getStartLocator(), address);
+  }
+
+  @Test(expected = InternalGemFireException.class)
+  public void testInvalidLocatorAddress() {
+    String address = "bad.bad[7056]";
+    config.modifiable = true;
+    config.setStartLocator(address);
+  }
+
+  @Test
+  public void testAttributesAlwaysModifiable() {
+    config.modifiable = false;
+    assertTrue(config.isAttributeModifiable(DistributionConfig.HTTP_SERVICE_PORT_NAME));
+    assertTrue(config.isAttributeModifiable("jmx-manager-http-port"));
+
+    config.modifiable = true;
+    assertTrue(config.isAttributeModifiable(DistributionConfig.HTTP_SERVICE_PORT_NAME));
+    assertTrue(config.isAttributeModifiable("jmx-manager-http-port"));
+  }
+
+  public final static Map<Class<?>, Class<?>> classMap = new HashMap<Class<?>, Class<?>>();
+
+  static {
+    classMap.put(boolean.class, Boolean.class);
+    classMap.put(byte.class, Byte.class);
+    classMap.put(short.class, Short.class);
+    classMap.put(char.class, Character.class);
+    classMap.put(int.class, Integer.class);
+    classMap.put(long.class, Long.class);
+    classMap.put(float.class, Float.class);
+    classMap.put(double.class, Double.class);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/test/java/com/gemstone/gemfire/internal/ConfigSourceJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/ConfigSourceJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/ConfigSourceJUnitTest.java
new file mode 100644
index 0000000..73cd9a0
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/ConfigSourceJUnitTest.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal;
+
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import static org.junit.Assert.*;
+
+/**
+ * Created by jiliao on 2/2/16.
+ */
+@Category(UnitTest.class)
+public class ConfigSourceJUnitTest {
+  @Test
+  public void testDescriptions() {
+    ConfigSource cs = ConfigSource.api();
+    assertEquals(cs.getDescription(), "api");
+
+    cs = ConfigSource.file("test", true);
+    assertEquals(cs.getDescription(), "test");
+
+    cs = ConfigSource.file("test2", false);
+    assertEquals(cs.getDescription(), "test2");
+
+    cs = ConfigSource.file(null, true);
+    assertEquals(cs.getDescription(), "secure file");
+
+    cs = ConfigSource.file(null, false);
+    assertEquals(cs.getDescription(), "file");
+
+    cs = ConfigSource.file("", true);
+    assertEquals(cs.getDescription(), "");
+
+    cs = ConfigSource.launcher();
+    assertEquals(cs.getDescription(), "launcher");
+
+    cs = ConfigSource.sysprop();
+    assertEquals(cs.getDescription(), "system property");
+
+    cs = ConfigSource.runtime();
+    assertEquals(cs.getDescription(), "runtime modification");
+
+    cs = ConfigSource.xml();
+    assertEquals(cs.getDescription(), "cache.xml");
+  }
+
+  @Test
+  public void testEquals() {
+    ConfigSource cs1 = ConfigSource.file("name", true);
+    ConfigSource cs2 = ConfigSource.file("name", false);
+    assertFalse(cs1.equals(cs2));
+
+    cs1 = ConfigSource.file("name", true);
+    cs2 = ConfigSource.file("name", true);
+    assertTrue(cs1.equals(cs2));
+
+    cs1 = ConfigSource.file(null, true);
+    cs2 = ConfigSource.file(null, false);
+    assertFalse(cs1.equals(cs2));
+
+    cs1 = ConfigSource.file(null, true);
+    cs2 = ConfigSource.file(null, true);
+    assertTrue(cs1.equals(cs2));
+
+    cs1 = ConfigSource.file(null, true);
+    cs2 = ConfigSource.file("", true);
+    assertFalse(cs1.equals(cs2));
+
+    cs1 = ConfigSource.xml();
+    cs2 = ConfigSource.xml();
+    assertTrue(cs1.equals(cs2));
+  }
+}


[02/33] incubator-geode git commit: GEODE-657: Prevent two backups from happening at the same time

Posted by ds...@apache.org.
GEODE-657: Prevent two backups from happening at the same time

Adding a dlock to prevent two backups from occuring at the same time.


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

Branch: refs/heads/feature/GEODE-831
Commit: 2b2e619e35a44c6e5f1f9881b5fba46d884a3934
Parents: 401280d
Author: Barry Oglesby <bo...@pivotal.io>
Authored: Thu Dec 10 16:41:14 2015 -0800
Committer: Dan Smith <up...@apache.org>
Committed: Thu Feb 11 16:42:27 2016 -0800

----------------------------------------------------------------------
 .../internal/AdminDistributedSystemImpl.java    | 25 +++++---
 .../admin/internal/BackupDataStoreHelper.java   | 60 ++++++++++++++++++++
 .../admin/internal/BackupDataStoreResult.java   | 41 +++++++++++++
 .../gemfire/internal/i18n/LocalizedStrings.java |  1 +
 .../internal/beans/DistributedSystemBridge.java | 35 ++++++------
 5 files changed, 136 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2b2e619e/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
index 5709fce..4e84936 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
@@ -2421,31 +2421,38 @@ implements com.gemstone.gemfire.admin.AdminDistributedSystem,
 
   public static BackupStatus backupAllMembers(DM dm, File targetDir, File baselineDir)
       throws AdminException {
+    BackupStatus status = null;
+    if (BackupDataStoreHelper.obtainLock(dm)) {
+    try {
     Set<PersistentID> missingMembers = getMissingPersistentMembers(dm);
     Set recipients = dm.getOtherDistributionManagerIds();
     
     SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");
     targetDir = new File(targetDir, format.format(new Date()));
-    FlushToDiskRequest.send(dm, recipients);
-    Map<DistributedMember, Set<PersistentID>> existingDataStores 
-        = PrepareBackupRequest.send(dm, recipients);
-    Map<DistributedMember, Set<PersistentID>> successfulMembers 
-        = FinishBackupRequest.send(dm, recipients, targetDir, baselineDir);
+    BackupDataStoreResult result = BackupDataStoreHelper.backupAllMembers(
+        dm, recipients, targetDir, baselineDir);
     
     // It's possible that when calling getMissingPersistentMembers, some members are 
     // still creating/recovering regions, and at FinishBackupRequest.send, the 
     // regions at the members are ready. Logically, since the members in successfulMembers
     // should override the previous missingMembers
-    for(Set<PersistentID> onlineMembersIds : successfulMembers.values()) {
+    for(Set<PersistentID> onlineMembersIds : result.getSuccessfulMembers().values()) {
       missingMembers.removeAll(onlineMembersIds);
     }
     
-    existingDataStores.keySet().removeAll(successfulMembers.keySet());
-    for(Set<PersistentID> lostMembersIds : existingDataStores.values()) {
+    result.getExistingDataStores().keySet().removeAll(result.getSuccessfulMembers().keySet());
+    for(Set<PersistentID> lostMembersIds : result.getExistingDataStores().values()) {
       missingMembers.addAll(lostMembersIds);
     }
     
-    return new BackupStatusImpl(successfulMembers, missingMembers);
+    status = new BackupStatusImpl(result.getSuccessfulMembers(), missingMembers);
+    } finally {
+      BackupDataStoreHelper.releaseLock(dm);
+    }
+    } else {
+      throw new AdminException(LocalizedStrings.DistributedSystem_BACKUP_ALREADY_IN_PROGRESS.toLocalizedString());
+    }
+    return status;
   }
   
   public Map<DistributedMember, Set<PersistentID>> compactAllDiskStores() throws AdminException {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2b2e619e/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreHelper.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreHelper.java
new file mode 100644
index 0000000..26a70a8
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreHelper.java
@@ -0,0 +1,60 @@
+package com.gemstone.gemfire.admin.internal;
+
+import java.io.File;
+import java.util.Map;
+import java.util.Set;
+
+import com.gemstone.gemfire.cache.persistence.PersistentID;
+import com.gemstone.gemfire.distributed.DistributedLockService;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.internal.Assert;
+
+public class BackupDataStoreHelper {
+
+  private static String LOCK_SERVICE_NAME = BackupDataStoreHelper.class.getSimpleName();
+
+  private static String LOCK_NAME = LOCK_SERVICE_NAME + "_token";
+  
+  private static Object LOCK_SYNC = new Object();
+
+  @SuppressWarnings("rawtypes")
+  public static BackupDataStoreResult backupAllMembers(
+      DM dm, Set recipients, File targetDir, File baselineDir) {
+    FlushToDiskRequest.send(dm, recipients);
+
+    boolean abort= true;
+    Map<DistributedMember, Set<PersistentID>> successfulMembers;
+    Map<DistributedMember, Set<PersistentID>> existingDataStores;
+    try {
+      existingDataStores = PrepareBackupRequest.send(dm, recipients);
+      abort = false;
+    } finally {
+      successfulMembers = FinishBackupRequest.send(dm, recipients, targetDir, baselineDir, abort);
+    }
+    return new BackupDataStoreResult(existingDataStores, successfulMembers);
+  }
+  
+  private static DistributedLockService getLockService(DM dm) {
+    DistributedLockService dls = DistributedLockService.getServiceNamed(LOCK_SERVICE_NAME);
+    if (dls == null) {
+      synchronized (LOCK_SYNC) {
+        dls = DistributedLockService.getServiceNamed(LOCK_SERVICE_NAME);
+        if (dls == null) {
+          // Create the DistributedLockService
+          dls = DistributedLockService.create(LOCK_SERVICE_NAME, dm.getSystem());
+        }
+      }
+    }
+    Assert.assertTrue(dls != null);
+    return dls;
+  }
+  
+  public static boolean obtainLock(DM dm) {
+    return getLockService(dm).lock(LOCK_NAME, 0, -1);
+  }
+  
+  public static void releaseLock(DM dm) {
+    getLockService(dm).unlock(LOCK_NAME);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2b2e619e/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreResult.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreResult.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreResult.java
new file mode 100644
index 0000000..f8a8911
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreResult.java
@@ -0,0 +1,41 @@
+package com.gemstone.gemfire.admin.internal;
+
+import java.util.Map;
+import java.util.Set;
+
+import com.gemstone.gemfire.cache.persistence.PersistentID;
+import com.gemstone.gemfire.distributed.DistributedMember;
+
+public class BackupDataStoreResult {
+  
+  private Map<DistributedMember, Set<PersistentID>> existingDataStores;
+
+  private Map<DistributedMember, Set<PersistentID>> successfulMembers;
+
+  public BackupDataStoreResult(
+      Map<DistributedMember, Set<PersistentID>> existingDataStores,
+      Map<DistributedMember, Set<PersistentID>> successfulMembers) {
+    this.existingDataStores = existingDataStores;
+    this.successfulMembers = successfulMembers;
+  }
+
+  public Map<DistributedMember, Set<PersistentID>> getExistingDataStores() {
+    return this.existingDataStores;
+  }
+
+  public Map<DistributedMember, Set<PersistentID>> getSuccessfulMembers() {
+    return this.successfulMembers;
+  }
+  
+  public String toString() {
+    return new StringBuilder()
+      .append(getClass().getSimpleName())
+      .append("[")
+      .append("existingDataStores=")
+      .append(this.existingDataStores)
+      .append("; successfulMembers=")
+      .append(this.successfulMembers)
+      .append("]")
+      .toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2b2e619e/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
index f6edb9b..8147718 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
@@ -2144,6 +2144,7 @@ public class LocalizedStrings extends ParentLocalizedStrings {
   public static final StringId AUTH_PEER_AUTHENTICATION_MISSING_CREDENTIALS = new StringId(6610, "Failed to find credentials from [{0}] using Authenticator [{1}]");
   public static final StringId AUTH_FAILED_TO_ACQUIRE_AUTHINITIALIZE_INSTANCE = new StringId(6611, "AuthInitialize instance could not be obtained");
   public static final StringId AUTH_FAILED_TO_OBTAIN_CREDENTIALS_IN_0_USING_AUTHINITIALIZE_1_2 = new StringId(6612, "Failed to obtain credentials using AuthInitialize [{1}]. {2}");
+  public static final StringId DistributedSystem_BACKUP_ALREADY_IN_PROGRESS = new StringId(6613, "A backup is already in progress.");
   
   /** Testing strings, messageId 90000-99999 **/
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2b2e619e/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridge.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridge.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridge.java
index 5034f60..9427831 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridge.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridge.java
@@ -44,9 +44,8 @@ import javax.management.ObjectName;
 
 import org.apache.logging.log4j.Logger;
 
-import com.gemstone.gemfire.admin.internal.FinishBackupRequest;
-import com.gemstone.gemfire.admin.internal.FlushToDiskRequest;
-import com.gemstone.gemfire.admin.internal.PrepareBackupRequest;
+import com.gemstone.gemfire.admin.internal.BackupDataStoreHelper;
+import com.gemstone.gemfire.admin.internal.BackupDataStoreResult;
 import com.gemstone.gemfire.cache.persistence.PersistentID;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.internal.DM;
@@ -59,6 +58,7 @@ import com.gemstone.gemfire.internal.admin.remote.RevokePersistentIDRequest;
 import com.gemstone.gemfire.internal.admin.remote.ShutdownAllRequest;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberPattern;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.management.CacheServerMXBean;
@@ -521,6 +521,7 @@ public class DistributedSystemBridge {
    */
   public DiskBackupStatus backupAllMembers(String targetDirPath, String baselineDirPath)
       throws Exception {
+    if (BackupDataStoreHelper.obtainLock(dm)) {
     try {
       
       if(targetDirPath == null || targetDirPath.isEmpty()){
@@ -540,26 +541,21 @@ public class DistributedSystemBridge {
       Set<PersistentID> missingMembers = MissingPersistentIDsRequest.send(dm);
       Set recipients = dm.getOtherDistributionManagerIds();
 
-      FlushToDiskRequest.send(dm, recipients);
+      BackupDataStoreResult result = BackupDataStoreHelper.backupAllMembers(dm, recipients, targetDir, baselineDir);
 
-      Map<DistributedMember, Set<PersistentID>> existingDataStores = PrepareBackupRequest
-          .send(dm, recipients);
-      Map<DistributedMember, Set<PersistentID>> successfulMembers = FinishBackupRequest
-          .send(dm, recipients, targetDir, baselineDir);
-
-      Iterator<DistributedMember> it = successfulMembers.keySet().iterator();
+      Iterator<DistributedMember> it = result.getSuccessfulMembers().keySet().iterator();
 
       Map<String, String[]> backedUpDiskStores = new HashMap<String, String[]>();
       while (it.hasNext()) {
         DistributedMember member = it.next();
-        Set<PersistentID> setOfDisk = successfulMembers.get(member);
+        Set<PersistentID> setOfDisk = result.getSuccessfulMembers().get(member);
         String[] setOfDiskStr = new String[setOfDisk.size()];
         int j = 0;
         for (PersistentID id : setOfDisk) {
           setOfDiskStr[j] = id.getDirectory();
           j++;
         }
-        backedUpDiskStores.put(member.getName(), setOfDiskStr);
+        backedUpDiskStores.put(member.getId(), setOfDiskStr);
       }
 
       // It's possible that when calling getMissingPersistentMembers, some
@@ -569,17 +565,17 @@ public class DistributedSystemBridge {
       // regions at the members are ready. Logically, since the members in
       // successfulMembers
       // should override the previous missingMembers
-      for (Set<PersistentID> onlineMembersIds : successfulMembers.values()) {
+      for (Set<PersistentID> onlineMembersIds : result.getSuccessfulMembers().values()) {
         missingMembers.removeAll(onlineMembersIds);
       }
 
-      existingDataStores.keySet().removeAll(successfulMembers.keySet());
+      result.getExistingDataStores().keySet().removeAll(result.getSuccessfulMembers().keySet());
       String[] setOfMissingDiskStr = null;
 
-      if (existingDataStores.size() > 0) {
-        setOfMissingDiskStr = new String[existingDataStores.size()];
+      if (result.getExistingDataStores().size() > 0) {
+        setOfMissingDiskStr = new String[result.getExistingDataStores().size()];
         int j = 0;
-        for (Set<PersistentID> lostMembersIds : existingDataStores.values()) {
+        for (Set<PersistentID> lostMembersIds : result.getExistingDataStores().values()) {
           for (PersistentID id : lostMembersIds) {
             setOfMissingDiskStr[j] = id.getDirectory();
             j++;
@@ -595,6 +591,11 @@ public class DistributedSystemBridge {
 
     } catch (Exception e) {
       throw new Exception(e.getLocalizedMessage());
+    } finally {
+      BackupDataStoreHelper.releaseLock(dm);
+    }
+    } else {
+      throw new Exception(LocalizedStrings.DistributedSystem_BACKUP_ALREADY_IN_PROGRESS.toLocalizedString());
     }
   }
 


[11/33] incubator-geode git commit: GEODE-26: Remove mavenLocal from repositories

Posted by ds...@apache.org.
GEODE-26: Remove mavenLocal from repositories


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

Branch: refs/heads/feature/GEODE-831
Commit: ee7b041adb7be0debc16e631ca4024b8d8652d53
Parents: 7005990
Author: Anthony Baker <ab...@apache.org>
Authored: Wed Feb 10 19:41:02 2016 -0800
Committer: Anthony Baker <ab...@apache.org>
Committed: Thu Feb 11 19:56:10 2016 -0800

----------------------------------------------------------------------
 build.gradle | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ee7b041a/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 7e3fc34..c0c304e 100755
--- a/build.gradle
+++ b/build.gradle
@@ -43,7 +43,6 @@ allprojects {
   gradle.startParameter.continueOnFailure = true
   
   repositories {
-    mavenLocal()
     mavenCentral()
     maven { url "http://repo.spring.io/release" }
     maven { url "http://repo.spring.io/milestone" }


[15/33] incubator-geode git commit: GEODE-890:CompiledLike member variables are not thread safe

Posted by ds...@apache.org.
GEODE-890:CompiledLike member variables are not thread safe

Member variables in CompiledLike need to be thread safe.
Added the member variables into the execution context, this should
prevent threads/queries from sharing these variable values and
prevent a possible stack overflow/ infinite loop from occuring.

Added a Multithreaded test helper and test to reproduce the original issue.


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

Branch: refs/heads/feature/GEODE-831
Commit: 09c0c8dd8bc9d83392e53fbb92aee7e45317de1d
Parents: db654a7
Author: Jason Huynh <hu...@gmail.com>
Authored: Wed Feb 10 14:11:41 2016 -0800
Committer: Jason Huynh <hu...@gmail.com>
Committed: Fri Feb 12 10:45:29 2016 -0800

----------------------------------------------------------------------
 .../cache/query/internal/CompiledLike.java      |  55 ++++--
 .../cache/query/internal/ExecutionContext.java  |   4 +
 .../query/internal/QueryExecutionContext.java   |  12 +-
 .../cache/query/MultithreadedTester.java        |  73 +++++++
 .../functional/ParameterBindingJUnitTest.java   | 192 ++++++++++---------
 .../query/internal/QCompilerJUnitTest.java      |  49 ++---
 .../QueryExecutionContextJUnitTest.java         |  63 ++++++
 7 files changed, 310 insertions(+), 138 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/09c0c8dd/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledLike.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledLike.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledLike.java
index 6abcd62..9560456 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledLike.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledLike.java
@@ -46,11 +46,11 @@ public class CompiledLike extends CompiledComparison
 
   final static int WILDCARD_UNDERSCORE = 1;
   
-  private int wildcardType = -1;
+  private Object wildcardTypeKey = new Object();
   
-  private int wildcardPosition = -1;
+  private Object wildcardPositionKey = new Object();
   
-  private int patternLength = 0;
+  private Object patternLengthKey = new Object();
   
   final static String LOWEST_STRING = "";
 
@@ -64,7 +64,7 @@ public class CompiledLike extends CompiledComparison
 
   private final CompiledValue var;
 
-  private boolean isIndexEvaluated = false;
+  private Object isIndexEvaluatedKey = new Object();
   
   //private final CompiledBindArgument bindArg;
   private final CompiledValue bindArg;
@@ -75,6 +75,21 @@ public class CompiledLike extends CompiledComparison
     this.bindArg = pattern;
   }
 
+  private int getWildcardPosition(ExecutionContext context) {
+    return (Integer)context.cacheGet(wildcardPositionKey, -1);
+  }
+  
+  private int getWildcardType(ExecutionContext context) {
+    return (Integer)context.cacheGet(wildcardTypeKey, -1);
+  }
+  
+  private int getPatternLength(ExecutionContext context) {
+    return (Integer) context.cacheGet(patternLengthKey, 0);
+  }
+  
+  private boolean getIsIndexEvaluated(ExecutionContext context) {
+    return (Boolean) context.cacheGet(isIndexEvaluatedKey, false);
+  }
   
   OrganizedOperands organizeOperands(ExecutionContext context,
       boolean completeExpansionNeeded, RuntimeIterator[] indpndntItrs)
@@ -88,8 +103,8 @@ public class CompiledLike extends CompiledComparison
     } else {
       // 2 or 3 conditions; create junctions
       if ((getOperator() == OQLLexerTokenTypes.TOK_NE)
-          && (wildcardPosition == patternLength - 1)
-          && (wildcardType == WILDCARD_PERCENT)) {
+          && (getWildcardPosition(context) == getPatternLength(context) - 1)
+          && (getWildcardType(context) == WILDCARD_PERCENT)) {
         // negation supported only for trailing %
         // GroupJunction is created since the boundary conditions go out of
         // range and will be evaluated as false if a RangeJunction was used
@@ -128,13 +143,13 @@ public class CompiledLike extends CompiledComparison
       QueryInvocationTargetException {
     String pattern = (String) this.bindArg.evaluate(context);
     // check if it is filter evaluatable
-    CompiledComparison[] cvs = getRangeIfSargable(this.var, pattern);
+    CompiledComparison[] cvs = getRangeIfSargable(context, this.var, pattern);
 
     for (CompiledComparison cc : cvs) {
       // negation supported only for trailing %
       if ((getOperator() == OQLLexerTokenTypes.TOK_NE)
-          && (wildcardPosition == patternLength - 1)
-          && (wildcardType == WILDCARD_PERCENT)) {
+          && (getWildcardPosition(context) == getPatternLength(context) - 1)
+          && (getWildcardType(context) == WILDCARD_PERCENT)) {
         cc.negate();
       }
       cc.computeDependencies(context);
@@ -202,13 +217,15 @@ public class CompiledLike extends CompiledComparison
    * @param pattern
    * @return The generated CompiledComparisons
    */
-  CompiledComparison[] getRangeIfSargable(CompiledValue var, String pattern) {
+  CompiledComparison[] getRangeIfSargable(ExecutionContext context, CompiledValue var, String pattern) {
     CompiledComparison[] cv = null;
     StringBuffer buffer = new StringBuffer(pattern);
     // check if the string has a % or _ anywhere
-    wildcardPosition = checkIfSargableAndRemoveEscapeChars(buffer);
-    patternLength = buffer.length();
-    isIndexEvaluated = true;
+    int wildcardPosition = checkIfSargableAndRemoveEscapeChars(context, buffer);
+    context.cachePut(wildcardPositionKey, wildcardPosition);
+    int patternLength = buffer.length();
+    context.cachePut(patternLengthKey, patternLength);
+    context.cachePut(isIndexEvaluatedKey, true);
     // if wildcardPosition is >= 0 means it is sargable
     if (wildcardPosition >= 0) {
       int len = patternLength;
@@ -249,7 +266,7 @@ public class CompiledLike extends CompiledComparison
         
         // if % is not the last char in the string.
         // or the wildchar is _ which could be anywhere
-        if (len < (patternLength - 1) || wildcardType == WILDCARD_UNDERSCORE) {
+        if (len < (patternLength - 1) || getWildcardType(context) == WILDCARD_UNDERSCORE) {
           // negation not supported if % is not the last char and also for a _
           // anywhere
           if (getOperator() == OQLLexerTokenTypes.TOK_NE) {
@@ -374,17 +391,17 @@ public class CompiledLike extends CompiledComparison
    * @param buffer
    * @return position of wildcard if sargable otherwise -1
    */
-  int checkIfSargableAndRemoveEscapeChars(StringBuffer buffer) {
+  int checkIfSargableAndRemoveEscapeChars(ExecutionContext context, StringBuffer buffer) {
     int len = buffer.length();
     int wildcardPosition = -1;
     for (int i = 0; i < len; ++i) {
       char ch = buffer.charAt(i);
       if (ch == UNDERSCORE) {
-        wildcardType = WILDCARD_UNDERSCORE;
+        context.cachePut(wildcardTypeKey, WILDCARD_UNDERSCORE);
         wildcardPosition = i; // the position of the wildcard
         break;
       } else if (ch == PERCENT) {
-        wildcardType = WILDCARD_PERCENT;
+        context.cachePut(wildcardTypeKey, WILDCARD_PERCENT);
         wildcardPosition = i; // the position of the wildcard
         break;
       } else if (ch == BACKSLASH) {
@@ -434,7 +451,7 @@ public class CompiledLike extends CompiledComparison
       NameResolutionException, QueryInvocationTargetException
   {
     //reset the isIndexEvaluated flag here since index is not being used here
-    isIndexEvaluated = false;
+    context.cachePut(isIndexEvaluatedKey, false);
 
     Pattern pattern = (Pattern)context.cacheGet(this.bindArg);
     if(pattern == null) {
@@ -484,7 +501,7 @@ public class CompiledLike extends CompiledComparison
      * re-filterevaluation of this CompiledLike.
      */
     PlanInfo result = null;
-    if (isIndexEvaluated) {
+    if (getIsIndexEvaluated(context)) {
       result = new PlanInfo();
       result.evalAsFilter = false;
     } else {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/09c0c8dd/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/ExecutionContext.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/ExecutionContext.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/ExecutionContext.java
index 08212ea..f4df8e4 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/ExecutionContext.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/ExecutionContext.java
@@ -656,6 +656,10 @@ public class ExecutionContext {
   public Object cacheGet(Object key) {
     return null;
   }
+  
+  public Object cacheGet(Object key, Object defaultValue) {
+    return defaultValue;
+  }
 
   public boolean isCqQueryContext() {
     return false;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/09c0c8dd/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/QueryExecutionContext.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/QueryExecutionContext.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/QueryExecutionContext.java
index b8b88b2..8f59145 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/QueryExecutionContext.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/QueryExecutionContext.java
@@ -116,6 +116,10 @@ public class QueryExecutionContext extends ExecutionContext {
   }
 
   public Object cacheGet(Object key) {
+    return cacheGet(key, null);
+  }
+  
+  public Object cacheGet(Object key, Object defaultValue) {
     //execCache can be empty in cases where we are doing adds to indexes
     //in that case, we use a default execCache
     int scopeId = -1;
@@ -123,7 +127,13 @@ public class QueryExecutionContext extends ExecutionContext {
       scopeId = (Integer) execCacheStack.peek();
     }
     Map execCache = (Map)execCaches.get(scopeId);
-    return execCache != null? execCache.get(key): null;
+    if (execCache == null) {
+      return defaultValue;
+    }
+    if (execCache.containsKey(key)) {
+      return execCache.get(key);
+    }
+    return defaultValue;
   }
 
   public void pushExecCache(int scopeNum) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/09c0c8dd/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/MultithreadedTester.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/MultithreadedTester.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/MultithreadedTester.java
new file mode 100644
index 0000000..3142566
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/MultithreadedTester.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.cache.query;
+
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
+
+public class MultithreadedTester {
+
+  
+  public static Collection<Object> runMultithreaded(Collection<Callable> callables) throws InterruptedException {
+    final CountDownLatch allRunnablesAreSubmitted = new CountDownLatch(1);
+    final CountDownLatch callablesComplete = new CountDownLatch(callables.size());
+    final ExecutorService executor = Executors.newFixedThreadPool(callables.size());
+    final LinkedList<Future> futures = new LinkedList<>();
+    //Submit all tasks to the executor
+    callables.parallelStream().forEach(callable -> {
+      futures.add(executor.submit(() -> {
+        try {
+          allRunnablesAreSubmitted.await(60, TimeUnit.SECONDS);
+          return callable.call();
+        }
+        catch (Throwable t) {
+          return t;
+        }
+        finally {
+          callablesComplete.countDown();
+        }
+      }));
+    });
+    //Unlock all tasks
+    allRunnablesAreSubmitted.countDown();
+    //Wait until all tasks are complete
+    callablesComplete.await(60, TimeUnit.SECONDS);
+    executor.shutdown();
+    return convertFutureToResult(futures);
+  }
+
+  private static Collection<Object> convertFutureToResult(final Collection<Future> futures) {
+    List<Object> results = new LinkedList<Object>();
+    futures.forEach(future-> {
+      try {
+        results.add(future.get());
+      }
+      catch (Exception e) {
+        results.add(e);
+      }
+    });
+    return results;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/09c0c8dd/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/ParameterBindingJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/ParameterBindingJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/ParameterBindingJUnitTest.java
index 9b34aa9..fb42f0a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/ParameterBindingJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/ParameterBindingJUnitTest.java
@@ -22,12 +22,16 @@
  */
 package com.gemstone.gemfire.cache.query.functional;
 
-import static org.junit.Assert.fail;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.stream.IntStream;
 
 import org.junit.After;
 import org.junit.Before;
@@ -36,7 +40,10 @@ import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.query.CacheUtils;
+import com.gemstone.gemfire.cache.query.Index;
+import com.gemstone.gemfire.cache.query.MultithreadedTester;
 import com.gemstone.gemfire.cache.query.Query;
+import com.gemstone.gemfire.cache.query.QueryService;
 import com.gemstone.gemfire.cache.query.data.Portfolio;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
@@ -46,129 +53,126 @@ import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
  */
 @Category(IntegrationTest.class)
 public class ParameterBindingJUnitTest {
-  
+  String regionName = "Portfolios";
+
   @Before
   public void setUp() throws java.lang.Exception {
     CacheUtils.startCache();
-    Region region = CacheUtils.createRegion("Portfolios", Portfolio.class);
-    region.put("0",new Portfolio(0));
-    region.put("1",new Portfolio(1));
-    region.put("2",new Portfolio(2));
-    region.put("3",new Portfolio(3));
   }
-  
+
+  private Region createRegion(String regionName) {
+    return CacheUtils.createRegion(regionName, Portfolio.class);
+  }
+
+  private Index createIndex(String indexName, String indexedExpression, String regionPath) throws Exception {
+    QueryService qs = CacheUtils.getQueryService();
+    return qs.createIndex(indexName, indexedExpression, regionPath);
+  }
+
+  private void populateRegion(Region region, int numEntries) {
+    IntStream.range(0, numEntries).parallel().forEach(i -> {
+      region.put("" + i, new Portfolio(i));
+    });
+  }
+
+  private Region createAndPopulateRegion(String regionName, int numEntries) {
+    Region region = createRegion(regionName);
+    populateRegion(region, numEntries);
+    return region;
+  }
+
   @After
   public void tearDown() throws java.lang.Exception {
     CacheUtils.closeCache();
   }
-  
+
+  private void validateQueryWithBindParameter(String queryString, Object[] bindParameters, int expectedSize) throws Exception {
+    Query query = CacheUtils.getQueryService().newQuery(queryString);
+    Object result = query.execute(bindParameters);
+    assertEquals(expectedSize, ((Collection) result).size());
+  }
+
   @Test
   public void testBindCollectionInFromClause() throws Exception {
-    Query query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM $1 ");
-    Object params[] = new Object[1];
-    Region region = CacheUtils.getRegion("/Portfolios");
-    params[0] = region.values();
-    Object result = query.execute(params);
-    if(result instanceof Collection){
-      int resultSize = ((Collection)result).size();
-      if( resultSize != region.values().size())
-        fail("Results not as expected");
-    }else
-      fail("Invalid result");
+    int numEntries = 4;
+    Region region = createAndPopulateRegion(regionName, numEntries);
+    Object params[] = new Object[] { region.values() };
+    validateQueryWithBindParameter("SELECT DISTINCT * FROM $1 ", params, numEntries);
   }
-  
+
   @Test
   public void testBindArrayInFromClause() throws Exception {
-    Query query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM $1 ");
-    Object params[] = new Object[1];
-    Region region = CacheUtils.getRegion("/Portfolios");
-    params[0] = region.values().toArray();
-    Object result = query.execute(params);
-    if(result instanceof Collection){
-      int resultSize = ((Collection)result).size();
-      if( resultSize != region.values().size())
-        fail("Results not as expected");
-    }else
-      fail("Invalid result");
+    int numEntries = 4;
+    Region region = createAndPopulateRegion(regionName, numEntries);
+    Object params[] = new Object[] { region.values().toArray() };
+    validateQueryWithBindParameter("SELECT DISTINCT * FROM $1 ", params, numEntries);
   }
-  
+
   @Test
   public void testBindMapInFromClause() throws Exception {
-    Query query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM $1 ");
-    Object params[] = new Object[1];
+    int numEntries = 4;
+    Region region = createAndPopulateRegion(regionName, numEntries);
     Map map = new HashMap();
-    Region region = CacheUtils.getRegion("/Portfolios");
-    Iterator iter = region.entries(false).iterator();
-    while(iter.hasNext()){
-      Region.Entry entry = (Region.Entry)iter.next();
+    Iterator iter = region.entrySet().iterator();
+    while (iter.hasNext()) {
+      Region.Entry entry = (Region.Entry) iter.next();
       map.put(entry.getKey(), entry.getValue());
     }
-    params[0] = map;
-    Object result = query.execute(params);
-    if(result instanceof Collection){
-      int resultSize = ((Collection)result).size();
-      if( resultSize != region.values().size())
-        fail("Results not as expected");
-    }else
-      fail("Invalid result");
+    Object params[] = new Object[] { map };
+    validateQueryWithBindParameter("SELECT DISTINCT * FROM $1 ", params, numEntries);
   }
-  
+
   @Test
   public void testBindRegionInFromClause() throws Exception {
-    Query query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM $1 ");
-    Object params[] = new Object[1];
-    Region region = CacheUtils.getRegion("/Portfolios");
-    params[0] = region;
-    Object result = query.execute(params);
-    if(result instanceof Collection){
-      int resultSize = ((Collection)result).size();
-      if( resultSize != region.values().size())
-        fail("Results not as expected");
-    }else
-      fail("Invalid result");
+    int numEntries = 4;
+    Region region = createAndPopulateRegion(regionName, numEntries);
+    Object params[] = new Object[] { region };
+    validateQueryWithBindParameter("SELECT DISTINCT * FROM $1 ", params, numEntries);
   }
-  
-  
+
   @Test
-  public void testBindValueAsMethodParamter() throws Exception {
+  public void testStringBindValueAsMethodParameter() throws Exception {
+    int numEntries = 4;
+    Region region = createAndPopulateRegion(regionName, numEntries);
     Query query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM /Portfolios where status.equals($1)");
-    Object params[] = new Object[1];
-    params[0] = "active";
-    Object result = query.execute(params);
-    if(result instanceof Collection){
-      int resultSize = ((Collection)result).size();
-      if( resultSize != 2)
-        fail("Results not as expected");
-    }else
-      fail("Invalid result");
+    Object params[] = new Object[] { "active" };
+    validateQueryWithBindParameter("SELECT DISTINCT * FROM /Portfolios where status.equals($1)", params, 2);
   }
-  
+
   @Test
-  public void testBindString() throws Exception {
+  public void testBindStringAsBindParameter() throws Exception {
+    int numEntries = 4;
+    Region region = createAndPopulateRegion(regionName, numEntries);
     Query query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM /Portfolios where status = $1");
-    Object params[] = new Object[1];
-    params[0] = "active";
-    Object result = query.execute(params);
-    if(result instanceof Collection){
-      int resultSize = ((Collection)result).size();
-      if( resultSize != 2)
-        fail("Results not as expected");
-    }else
-      fail("Invalid result");
+    Object params[] = new Object[] { "active" };
+    validateQueryWithBindParameter("SELECT DISTINCT * FROM /Portfolios where status = $1", params, 2);
   }
-  
+
   @Test
   public void testBindInt() throws Exception {
-    Query query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM /Portfolios where ID = $1");
-    Object params[] = new Object[1];
-    params[0] = new Integer(1);
-    Object result = query.execute(params);
-    if(result instanceof Collection){
-      int resultSize = ((Collection)result).size();
-      if( resultSize != 1)
-        fail("Results not as expected");
-    }else
-      fail("Invalid result");
+    int numEntries = 4;
+    Region region = createAndPopulateRegion(regionName, numEntries);
+    Object params[] = new Object[] { new Integer(1) };
+    validateQueryWithBindParameter("SELECT DISTINCT * FROM /Portfolios where ID = $1", params, 1);
+  }
+
+  @Test
+  public void testMultithreadedBindUsingSameQueryObject() throws Exception {
+    int numObjects = 10000;
+    Region region = createAndPopulateRegion("Portfolios", numObjects);
+    createIndex("Status Index", "status", "/Portfolios");
+    final Query query = CacheUtils.getQueryService().newQuery("SELECT * FROM /Portfolios where status like $1");
+    final Object[] bindParam = new Object[] { "%a%" };
+    Collection<Callable> callables = new ConcurrentLinkedQueue<>();
+    IntStream.range(0, 1000).parallel().forEach(i -> {
+      callables.add(() -> {
+        return query.execute(bindParam);
+      });
+    });
+    Collection<Object> results = MultithreadedTester.runMultithreaded(callables);
+    results.forEach(result -> {
+      assertTrue(result.getClass().getName() + " was not an expected result", result instanceof Collection);
+      assertEquals(numObjects, ((Collection)result).size());
+    });
   }
-  
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/09c0c8dd/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QCompilerJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QCompilerJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QCompilerJUnitTest.java
index 2510c36..dd714d3 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QCompilerJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QCompilerJUnitTest.java
@@ -46,82 +46,83 @@ import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 @Category(IntegrationTest.class)
 public class QCompilerJUnitTest {
 
+  QueryExecutionContext context = new QueryExecutionContext(null, null);
   @Test
   public void testStringConditioningForLike_1() {
     String s1 = "abc%";
     StringBuffer buffer = new StringBuffer(s1);
     CompiledLike cl = new CompiledLike(null, null);
-    int wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(buffer);
+    int wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(context, buffer);
     assertEquals(3,wildCardPosition);
     assertEquals(s1, buffer.toString());
     
     s1 = "abc\\%abc";
     buffer = new StringBuffer(s1);
-    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(buffer);
+    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(context, buffer);
     assertEquals(-1,wildCardPosition);
     assertEquals(buffer.toString(), "abc%abc");
     
     s1 = "abc\\\\%abc";
     buffer = new StringBuffer(s1);
-    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(buffer);
+    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(context, buffer);
     assertEquals(4,wildCardPosition);
     assertEquals(buffer.toString(), "abc\\%abc");
 
     s1 = "abc\\\\\\%abc";
     buffer = new StringBuffer(s1);
-    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(buffer);
+    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(context, buffer);
     assertEquals(-1,wildCardPosition);
     assertEquals(buffer.toString(), "abc\\%abc");
 
     s1 = "%";
     buffer = new StringBuffer(s1);
-    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(buffer);
+    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(context, buffer);
     assertEquals(0,wildCardPosition);
     assertEquals(buffer.toString(), s1);
 
     s1 = "%abc";
     buffer = new StringBuffer(s1);
-    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(buffer);
+    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(context, buffer);
     assertEquals(0,wildCardPosition);
     assertEquals(buffer.toString(), "%abc");
 
     s1 = "%%abc";
     buffer = new StringBuffer(s1);
-    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(buffer);
+    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(context, buffer);
     assertEquals(0,wildCardPosition);
     assertEquals(buffer.toString(), "%%abc");
 
     s1 = "%\\%abc";
     buffer = new StringBuffer(s1);
-    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(buffer);
+    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(context, buffer);
     assertEquals(0,wildCardPosition);
     assertEquals(buffer.toString(), "%\\%abc");
 
     s1 = "_abc";
     buffer = new StringBuffer(s1);
 
-    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(buffer);
+    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(context, buffer);
     assertEquals(0,wildCardPosition);
     assertEquals(buffer.toString(), "_abc");
     
     s1 = "\\_abc";
     buffer = new StringBuffer(s1);
     
-    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(buffer);
+    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(context, buffer);
     assertEquals(-1,wildCardPosition);
     assertEquals(buffer.toString(), "_abc");
     
     s1 = "ab\\%c%d";
     buffer = new StringBuffer(s1);
     
-    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(buffer);
+    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(context, buffer);
     assertEquals(4,wildCardPosition);
     assertEquals(buffer.toString(), "ab%c%d");
     
     s1 = "ab\\__d";
     buffer = new StringBuffer(s1);
     
-    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(buffer);
+    wildCardPosition = cl.checkIfSargableAndRemoveEscapeChars(context, buffer);
     assertEquals(3,wildCardPosition);
     assertEquals(buffer.toString(), "ab__d");
   }
@@ -132,7 +133,7 @@ public class QCompilerJUnitTest {
     CompiledLiteral literal = new CompiledLiteral(pattern);
     CompiledID cid = new CompiledID("val");
     CompiledLike cl = new CompiledLike(cid, literal);
-    CompiledComparison[] cc = cl.getRangeIfSargable(cid, pattern);
+    CompiledComparison[] cc = cl.getRangeIfSargable(context,cid, pattern);
     assertEquals(1, cc.length);
    
     ArrayList cv = (ArrayList) cc[0].getChildren();
@@ -145,7 +146,7 @@ public class QCompilerJUnitTest {
     pattern = "ab%";
     literal = new CompiledLiteral(pattern);
     cl = new CompiledLike(cid, literal);
-    cc = cl.getRangeIfSargable(cid, pattern);
+    cc = cl.getRangeIfSargable(context,cid, pattern);
     assertEquals(2, cc.length);
     
     cv = (ArrayList) cc[0].getChildren();
@@ -165,7 +166,7 @@ public class QCompilerJUnitTest {
     pattern = "a%c";
     literal = new CompiledLiteral(pattern);
     cl = new CompiledLike(cid, literal);
-    cc = cl.getRangeIfSargable(cid, pattern);
+    cc = cl.getRangeIfSargable(context,cid, pattern);
     assertEquals(3, cc.length);
 
     cv = (ArrayList) cc[0].getChildren();
@@ -187,7 +188,7 @@ public class QCompilerJUnitTest {
     pattern = "%bc";
     literal = new CompiledLiteral(pattern);
     cl = new CompiledLike(cid, literal);
-    cc = cl.getRangeIfSargable(cid, pattern);
+    cc = cl.getRangeIfSargable(context,cid, pattern);
     assertEquals(2, cc.length);
  
     cv = (ArrayList) cc[0].getChildren();
@@ -202,7 +203,7 @@ public class QCompilerJUnitTest {
     pattern = "ab_";
     literal = new CompiledLiteral(pattern);
     cl = new CompiledLike(cid, literal);
-    cc = cl.getRangeIfSargable(cid, pattern);
+    cc = cl.getRangeIfSargable(context,cid, pattern);
     assertEquals(3, cc.length);
     
     cv = (ArrayList) cc[0].getChildren();
@@ -224,7 +225,7 @@ public class QCompilerJUnitTest {
     pattern = "_bc";
     literal = new CompiledLiteral(pattern);
     cl = new CompiledLike(cid, literal);
-    cc = cl.getRangeIfSargable(cid, pattern);
+    cc = cl.getRangeIfSargable(context,cid, pattern);
     assertEquals(2, cc.length);
 
     cv = (ArrayList) cc[0].getChildren();
@@ -239,7 +240,7 @@ public class QCompilerJUnitTest {
     pattern = "a_c";
     literal = new CompiledLiteral(pattern);
     cl = new CompiledLike(cid, literal);
-    cc = cl.getRangeIfSargable(cid, pattern);
+    cc = cl.getRangeIfSargable(context,cid, pattern);
     assertEquals(3, cc.length);
     
     cv = (ArrayList) cc[0].getChildren();
@@ -261,7 +262,7 @@ public class QCompilerJUnitTest {
     pattern = "_b%";
     literal = new CompiledLiteral(pattern);
     cl = new CompiledLike(cid, literal);
-    cc = cl.getRangeIfSargable(cid, pattern);
+    cc = cl.getRangeIfSargable(context,cid, pattern);
     assertEquals(2, cc.length);
 
     cv = (ArrayList) cc[0].getChildren();
@@ -276,7 +277,7 @@ public class QCompilerJUnitTest {
     pattern = "a\\%bc";
     literal = new CompiledLiteral(pattern);
     cl = new CompiledLike(cid, literal);
-    cc = cl.getRangeIfSargable(cid, pattern);
+    cc = cl.getRangeIfSargable(context,cid, pattern);
     assertEquals(1, cc.length);
 
     cv = (ArrayList) cc[0].getChildren();
@@ -290,7 +291,7 @@ public class QCompilerJUnitTest {
     literal = new CompiledLiteral(pattern);
     cl = new CompiledLike(cid, literal);
     cl.negate();
-    cc = cl.getRangeIfSargable(cid, pattern);
+    cc = cl.getRangeIfSargable(context,cid, pattern);
     assertEquals(2, cc.length);
     
     cv = (ArrayList) cc[0].getChildren();
@@ -311,7 +312,7 @@ public class QCompilerJUnitTest {
     literal = new CompiledLiteral(pattern);
     cl = new CompiledLike(cid, literal);
     cl.negate();
-    cc = cl.getRangeIfSargable(cid, pattern);
+    cc = cl.getRangeIfSargable(context, cid, pattern);
     assertEquals(2, cc.length);
 
     cv = (ArrayList) cc[0].getChildren();
@@ -327,7 +328,7 @@ public class QCompilerJUnitTest {
     literal = new CompiledLiteral(pattern);
     cl = new CompiledLike(cid, literal);
     cl.negate();
-    cc = cl.getRangeIfSargable(cid, pattern);
+    cc = cl.getRangeIfSargable(context, cid, pattern);
     assertEquals(2, cc.length);
 
     cv = (ArrayList) cc[0].getChildren();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/09c0c8dd/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryExecutionContextJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryExecutionContextJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryExecutionContextJUnitTest.java
new file mode 100644
index 0000000..ed789c5
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryExecutionContextJUnitTest.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.cache.query.internal;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.cache.query.internal.QueryExecutionContext;
+
+public class QueryExecutionContextJUnitTest {
+
+  @Test
+  public void testNullReturnedFromCacheGetWhenNoValueWasPut() {
+    Object key = new Object();
+    QueryExecutionContext context = new QueryExecutionContext(null, null);
+    assertNull(context.cacheGet(key));
+  }
+  
+  @Test
+  public void testPutValueReturnedFromCacheGet() {
+    Object key = new Object();
+    Object value = new Object();
+    QueryExecutionContext context = new QueryExecutionContext(null, null);
+    context.cachePut(key, value);
+    assertEquals(value, context.cacheGet(key));
+  }
+  
+  @Test
+  public void testDefaultReturnedFromCacheGetWhenNoValueWasPut() {
+    Object key = new Object();
+    Object value = new Object();
+    QueryExecutionContext context = new QueryExecutionContext(null, null);
+    assertEquals(value, context.cacheGet(key, value));
+  }
+  
+  @Test
+  public void testExecCachesCanBePushedAndValuesRetrievedAtTheCorrectLevel() {
+    Object key = new Object();
+    Object value = new Object();
+    QueryExecutionContext context = new QueryExecutionContext(null, null);
+    context.pushExecCache(1);
+    context.cachePut(key, value);
+    context.pushExecCache(2);
+    assertNull(context.cacheGet(key));
+    context.popExecCache();
+    assertEquals(value, context.cacheGet(key));
+  }
+  
+}


[10/33] incubator-geode git commit: Update version to 1.0.0-incubating.M2-SNAPSHOT

Posted by ds...@apache.org.
Update version to 1.0.0-incubating.M2-SNAPSHOT


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

Branch: refs/heads/feature/GEODE-831
Commit: dcf6bef40ce84a77037399be6eaf1b0a9ee6b598
Parents: ee7b041
Author: Anthony Baker <ab...@apache.org>
Authored: Wed Feb 10 20:12:53 2016 -0800
Committer: Anthony Baker <ab...@apache.org>
Committed: Thu Feb 11 19:56:10 2016 -0800

----------------------------------------------------------------------
 build.gradle      | 2 +-
 gradle.properties | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dcf6bef4/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index c0c304e..8fa7e5d 100755
--- a/build.gradle
+++ b/build.gradle
@@ -35,7 +35,7 @@ dependencyVersions.load(new FileInputStream("${project.projectDir}/gradle/depend
 dependencyVersions.keys().each{ k -> project.ext[k] = dependencyVersions[k]}
 
 allprojects {
-  version = versionNumber + '-' + releaseType
+  version = versionNumber + releaseType
   ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
 
   // We want to see all test results.  This is equivalatent to setting --continue

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dcf6bef4/gradle.properties
----------------------------------------------------------------------
diff --git a/gradle.properties b/gradle.properties
index 6741627..6106175 100755
--- a/gradle.properties
+++ b/gradle.properties
@@ -14,11 +14,11 @@
 # limitations under the License.
 
 # Set the release type using the following conventions:
-# M? - Milestone 
-# RC? - Release candidate
-# RELEASE - Final build
+# -SNAPSHOT - development version
+# .M?       - milestone release
+# <blank>   - release
 versionNumber = 1.0.0-incubating
-releaseType = SNAPSHOT
+releaseType = .M2-SNAPSHOT
 
 org.gradle.daemon = true
 org.gradle.jvmargs = -Xmx2048m


[19/33] incubator-geode git commit: Fixed broken links in README.md file.

Posted by ds...@apache.org.
Fixed broken links in README.md file.


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

Branch: refs/heads/feature/GEODE-831
Commit: 00c69b6709b9187909266f3d58fef1d87679e8fc
Parents: 7c195af
Author: Swapnil Bawaskar <sb...@pivotal.io>
Authored: Tue Feb 16 07:57:24 2016 -0800
Committer: Swapnil Bawaskar <sb...@pivotal.io>
Committed: Tue Feb 16 07:58:07 2016 -0800

----------------------------------------------------------------------
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/00c69b67/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 8663791..017fbfe 100755
--- a/README.md
+++ b/README.md
@@ -87,8 +87,8 @@ Geode applications can be written in a number of client technologies:
 * Java using the Geode client API or embedded using the Geode peer API
 * [Spring Data GemFire](http://projects.spring.io/spring-data-gemfire/) or [Spring Cache](http://docs.spring.io/spring/docs/current/spring-framework-reference/html/cache.html)
 * [Python](https://github.com/gemfire/py-gemfire-rest)
-* [REST](http://geode-docs.cfapps.io/docs/geode_rest/book_intro.html)
-* [[memcached|Moving from memcached to gemcached]]
+* [REST](http://geode.docs.pivotal.io/docs/rest_apps/book_intro.html)
+* [memcached](https://cwiki.apache.org/confluence/display/GEODE/Moving+from+memcached+to+gemcached)
 
 
 # Build environment in Docker


[05/33] incubator-geode git commit: GEODE-913: refactor AbstractDistributionConfig

Posted by ds...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index f8ff21a..3af8c15 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -17,10 +17,6 @@
 
 package com.gemstone.gemfire.distributed.internal;
 
-import java.io.File;
-import java.net.InetAddress;
-import java.util.Properties;
-
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.internal.Config;
 import com.gemstone.gemfire.internal.ConfigSource;
@@ -29,6 +25,12 @@ import com.gemstone.gemfire.internal.logging.LogConfig;
 import com.gemstone.gemfire.internal.tcp.Connection;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
 
+import java.io.File;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.InetAddress;
+import java.util.*;
+
 /**
  * Provides accessor (and in some cases mutator) methods for the
  * various GemFire distribution configuration properties.  The
@@ -49,7 +51,6 @@ import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
  */
 public interface DistributionConfig extends Config, LogConfig {
 
-
   ////////////////////  Instance Methods  ////////////////////
 
   /**
@@ -62,7 +63,9 @@ public interface DistributionConfig extends Config, LogConfig {
    * <p> The default value is: {@link #DEFAULT_NAME}.
    * @return the system's name.
    */
+  @ConfigAttributeGetter(name=NAME_NAME)
   public String getName();
+
   /**
    * Sets the member's name.
    * <p> The name can not be changed while the system is running.
@@ -71,16 +74,15 @@ public interface DistributionConfig extends Config, LogConfig {
    * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
    *   when writing to the system's configuration file.
    */
+  @ConfigAttributeSetter(name=NAME_NAME)
   public void setName(String value);
-  /**
-   * Returns true if the value of the <code>name</code> attribute can currently
-   * be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isNameModifiable();
+
   /** The name of the "name" property */
+  @ConfigAttribute(type=String.class)
   public static final String NAME_NAME = "name";
 
+
+
   /**
    * The default system name.
    * <p> Actual value of this constant is <code>""</code>.
@@ -92,22 +94,16 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#mcast-port">"mcast-port"</a>
    * property
    */
+  @ConfigAttributeGetter(name=MCAST_PORT_NAME)
   public int getMcastPort();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#mcast-port">"mcast-port"</a>
    * property
    */
+  @ConfigAttributeSetter(name=MCAST_PORT_NAME)
   public void setMcastPort(int value);
-  /**
-   * Returns true if the value of the
-   * attribute can currently be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isMcastPortModifiable();
 
-  /** The name of the "mcastPort" property */
-  public static final String MCAST_PORT_NAME = "mcast-port";
 
   /** The default value of the "mcastPort" property */
   public static final int DEFAULT_MCAST_PORT = 0;
@@ -122,27 +118,25 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   public static final int MAX_MCAST_PORT = 65535;
 
+  /** The name of the "mcastPort" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_MCAST_PORT, max=MAX_MCAST_PORT)
+  public static final String MCAST_PORT_NAME = "mcast-port";
 
   /**
    * Returns the value of the <a
    * href="../DistributedSystem.html#tcp-port">"tcp-port"</a>
    * property
    */
+  @ConfigAttributeGetter(name=TCP_PORT_NAME)
   public int getTcpPort();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#tcp-port">"tcp-port"</a>
    * property
    */
+  @ConfigAttributeSetter(name=TCP_PORT_NAME)
   public void setTcpPort(int value);
-  /**
-   * Returns true if the value of the
-   * attribute can currently be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isTcpPortModifiable();
-  /** The name of the "tcpPort" property */
-  public static final String TCP_PORT_NAME = "tcp-port";
+
   /** The default value of the "tcpPort" property */
   public static final int DEFAULT_TCP_PORT = 0;
   /**
@@ -155,28 +149,28 @@ public interface DistributionConfig extends Config, LogConfig {
    * <p> Actual value of this constant is <code>65535</code>.
    */
   public static final int MAX_TCP_PORT = 65535;
-
+  /** The name of the "tcpPort" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_TCP_PORT, max=MAX_TCP_PORT)
+  public static final String TCP_PORT_NAME = "tcp-port";
 
   /**
    * Returns the value of the <a
    * href="../DistributedSystem.html#mcast-address">"mcast-address"</a>
    * property
    */
+  @ConfigAttributeGetter(name=MCAST_ADDRESS_NAME)
   public InetAddress getMcastAddress();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#mcast-address">"mcast-address"</a>
    * property
    */
+  @ConfigAttributeSetter(name=MCAST_ADDRESS_NAME)
   public void setMcastAddress(InetAddress value);
-  /**
-   * Returns true if the value of the
-   * attribute can currently be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isMcastAddressModifiable();
+
 
   /** The name of the "mcastAddress" property */
+  @ConfigAttribute(type=InetAddress.class)
   public static final String MCAST_ADDRESS_NAME = "mcast-address";
 
   /** The default value of the "mcastAddress" property.
@@ -189,22 +183,15 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#mcast-ttl">"mcast-ttl"</a>
    * property
    */
+  @ConfigAttributeGetter(name=MCAST_TTL_NAME)
   public int getMcastTtl();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#mcast-ttl">"mcast-ttl"</a>
    * property
    */
+  @ConfigAttributeSetter(name=MCAST_TTL_NAME)
   public void setMcastTtl(int value);
-  /**
-   * Returns true if the value of the
-   * attribute can currently be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isMcastTtlModifiable();
-
-  /** The name of the "mcastTtl" property */
-  public static final String MCAST_TTL_NAME = "mcast-ttl";
 
   /** The default value of the "mcastTtl" property */
   public static final int DEFAULT_MCAST_TTL = 32;
@@ -218,32 +205,28 @@ public interface DistributionConfig extends Config, LogConfig {
    * <p> Actual value of this constant is <code>255</code>.
    */
   public static final int MAX_MCAST_TTL = 255;
-  
-  
-  public static final int MIN_DISTRIBUTED_SYSTEM_ID = -1;
-  
-  public static final int MAX_DISTRIBUTED_SYSTEM_ID = 255;
+
+  /** The name of the "mcastTtl" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_MCAST_TTL, max=MAX_MCAST_TTL)
+  public static final String MCAST_TTL_NAME = "mcast-ttl";
 
   /**
    * Returns the value of the <a
    * href="../DistributedSystem.html#bind-address">"bind-address"</a>
    * property
    */
+  @ConfigAttributeGetter(name=BIND_ADDRESS_NAME)
   public String getBindAddress();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#bind-address">"bind-address"</a>
    * property
    */
+  @ConfigAttributeSetter(name=BIND_ADDRESS_NAME)
   public void setBindAddress(String value);
-  /**
-   * Returns true if the value of the
-   * attribute can currently be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isBindAddressModifiable();
 
   /** The name of the "bindAddress" property */
+  @ConfigAttribute(type=String.class)
   public static final String BIND_ADDRESS_NAME = "bind-address";
 
   /** The default value of the "bindAddress" property.
@@ -256,21 +239,18 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#server-bind-address">"server-bind-address"</a>
    * property
    */
+  @ConfigAttributeGetter(name=SERVER_BIND_ADDRESS_NAME)
   public String getServerBindAddress();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#server-bind-address">"server-bind-address"</a>
    * property
    */
+  @ConfigAttributeSetter(name=SERVER_BIND_ADDRESS_NAME)
   public void setServerBindAddress(String value);
-  /**
-   * Returns true if the value of the
-   * attribute can currently be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isServerBindAddressModifiable();
 
   /** The name of the "serverBindAddress" property */
+  @ConfigAttribute(type=String.class)
   public static final String SERVER_BIND_ADDRESS_NAME = "server-bind-address";
 
   /** The default value of the "serverBindAddress" property.
@@ -282,6 +262,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * Returns the value of the <a
    * href="../DistributedSystem.html#locators">"locators"</a> property
    */
+  @ConfigAttributeGetter(name=LOCATORS_NAME)
   public String getLocators();
   /**
    * Sets the system's locator list.
@@ -295,15 +276,11 @@ public interface DistributionConfig extends Config, LogConfig {
    * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
    *   when writing to the system's configuration file.
    */
+  @ConfigAttributeSetter(name=LOCATORS_NAME)
   public void setLocators(String value);
-  /**
-   * Returns true if the value of the
-   * attribute can currently be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isLocatorsModifiable();
 
   /** The name of the "locators" property */
+  @ConfigAttribute(type=String.class)
   public static final String LOCATORS_NAME = "locators";
 
   /** The default value of the "locators" property */
@@ -313,17 +290,20 @@ public interface DistributionConfig extends Config, LogConfig {
    * Locator wait time - how long to wait for a locator to start before giving up &
    * throwing a GemFireConfigException
    */
+  @ConfigAttribute(type=Integer.class)
   public static final String LOCATOR_WAIT_TIME_NAME = "locator-wait-time";
-  public static final int DEFAULT_LOCATOR_WAIT_TIME = 0; 
+  public static final int DEFAULT_LOCATOR_WAIT_TIME = 0;
+  @ConfigAttributeGetter(name=LOCATOR_WAIT_TIME_NAME)
   public int getLocatorWaitTime();
+  @ConfigAttributeSetter(name=LOCATOR_WAIT_TIME_NAME)
   public void setLocatorWaitTime(int seconds);
-  public boolean isLocatorWaitTimeModifiable();
   
   
   /**
    * returns the value of the <a href="../DistribytedSystem.html#start-locator">"start-locator"
    * </a> property
    */
+  @ConfigAttributeGetter(name=START_LOCATOR_NAME)
   public String getStartLocator();
   /**
    * Sets the start-locator property.  This is a string in the form
@@ -331,15 +311,13 @@ public interface DistributionConfig extends Config, LogConfig {
    * a locator prior to connecting
    * @param value must be of the form <code>hostName[portNum]</code>
    */
+  @ConfigAttributeSetter(name=START_LOCATOR_NAME)
   public void setStartLocator(String value);
-  /**
-   * returns true if the value of the attribute can currently be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isStartLocatorModifiable();
+
   /**
    * The name of the "start-locator" property
    */
+  @ConfigAttribute(type=String.class)
   public static final String START_LOCATOR_NAME = "start-locator";
   /**
    * The default value of the "start-locator" property
@@ -350,6 +328,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * Returns the value of the <a
    * href="../DistributedSystem.html#deploy-working-dir">"deploy-working-dir"</a> property
    */
+  @ConfigAttributeGetter(name=DEPLOY_WORKING_DIR)
   public File getDeployWorkingDir();
   
   /**
@@ -359,17 +338,13 @@ public interface DistributionConfig extends Config, LogConfig {
    * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
    *   when writing to the system's configuration file.
    */
+  @ConfigAttributeSetter(name=DEPLOY_WORKING_DIR)
   public void setDeployWorkingDir(File value);
   
   /**
-   * Returns true if the value of the deploy-working-dir attribute can 
-   * currently be modified. Some attributes can not be modified while the system is running.
-   */
-  public boolean isDeployWorkingDirModifiable();
-  
-  /**
    * The name of the "deploy-working-dir" property.
    */
+  @ConfigAttribute(type=File.class)
   public static final String DEPLOY_WORKING_DIR = "deploy-working-dir";
   
   /**
@@ -382,6 +357,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * Returns the value of the <a
    * href="../DistributedSystem.html#user-command-packages">"user-command-packages"</a> property
    */
+  @ConfigAttributeGetter(name=USER_COMMAND_PACKAGES)
   public String getUserCommandPackages();
   
   /**
@@ -391,17 +367,13 @@ public interface DistributionConfig extends Config, LogConfig {
    * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
    *   when writing to the system's configuration file.
    */
+  @ConfigAttributeSetter(name=USER_COMMAND_PACKAGES)
   public void setUserCommandPackages(String value);
   
   /**
-   * Returns true if the value of the user-command-packages attribute can 
-   * currently be modified. Some attributes can not be modified while the system is running.
-   */
-  public boolean isUserCommandPackagesModifiable();
-  
-  /**
    * The name of the "user-command-packages" property.
    */
+  @ConfigAttribute(type=String.class)
   public static final String USER_COMMAND_PACKAGES = "user-command-packages";
   
   /**
@@ -416,6 +388,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @return <code>null</code> if logging information goes to standard
    *         out
    */
+  @ConfigAttributeGetter(name=LOG_FILE_NAME)
   public File getLogFile();
   /**
    * Sets the system's log file.
@@ -426,14 +399,11 @@ public interface DistributionConfig extends Config, LogConfig {
    * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
    *   when writing to the system's configuration file.
    */
+  @ConfigAttributeSetter(name=LOG_FILE_NAME)
   public void setLogFile(File value);
-  /**
-   * Returns true if the value of the logFile attribute can currently
-   * be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isLogFileModifiable();
+
   /** The name of the "logFile" property */
+  @ConfigAttribute(type=File.class)
   public static final String LOG_FILE_NAME = "log-file";
 
   /**
@@ -449,6 +419,7 @@ public interface DistributionConfig extends Config, LogConfig {
    *
    * @see com.gemstone.gemfire.internal.logging.LogWriterImpl
    */
+  @ConfigAttributeGetter(name=LOG_LEVEL_NAME)
   public int getLogLevel();
   /**
    * Sets the value of the <a
@@ -456,19 +427,10 @@ public interface DistributionConfig extends Config, LogConfig {
    *
    * @see com.gemstone.gemfire.internal.logging.LogWriterImpl
    */
+  @ConfigAttributeSetter(name=LOG_LEVEL_NAME)
   public void setLogLevel(int value);
 
   /**
-   * Returns true if the value of the logLevel attribute can currently
-   * be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isLogLevelModifiable();
-
-  /** The name of the "logLevel" property */
-  public static final String LOG_LEVEL_NAME = "log-level";
-
-  /**
    * The default log level.
    * <p> Actual value of this constant is {@link InternalLogWriter#CONFIG_LEVEL}.
    */
@@ -484,23 +446,26 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   public static final int MAX_LOG_LEVEL = InternalLogWriter.NONE_LEVEL;
 
+  /** The name of the "logLevel" property */
+  // type is String because the config file contains "config", "debug", "fine" etc, not a code, but the setter/getter accepts int
+  @ConfigAttribute(type=String.class)
+  public static final String LOG_LEVEL_NAME = "log-level";
+
   /**
    * Returns the value of the <a
    * href="../DistributedSystem.html#statistic-sampling-enabled">"statistic-sampling-enabled"</a>
    * property
    */
+  @ConfigAttributeGetter(name=STATISTIC_SAMPLING_ENABLED_NAME)
   public boolean getStatisticSamplingEnabled();
   /**
    * Sets StatisticSamplingEnabled
    */
+  @ConfigAttributeSetter(name=STATISTIC_SAMPLING_ENABLED_NAME)
   public void setStatisticSamplingEnabled(boolean newValue);
-  /**
-   * Returns true if the value of the StatisticSamplingEnabled attribute can currently
-   * be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isStatisticSamplingEnabledModifiable();
+
   /** The name of the "statisticSamplingEnabled" property */
+  @ConfigAttribute(type=Boolean.class)
   public static final String STATISTIC_SAMPLING_ENABLED_NAME =
     "statistic-sampling-enabled";
 
@@ -512,19 +477,16 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#statistic-sample-rate">"statistic-sample-rate"</a>
    * property
    */
+  @ConfigAttributeGetter(name=STATISTIC_SAMPLE_RATE_NAME)
   public int getStatisticSampleRate();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#statistic-sample-rate">"statistic-sample-rate"</a>
    * property
    */
+  @ConfigAttributeSetter(name=STATISTIC_SAMPLE_RATE_NAME)
   public void setStatisticSampleRate(int value);
-  /**
-   * Returns true if the value of the statisticSampleRate attribute can currently
-   * be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isStatisticSampleRateModifiable();
+
   /**
    * The default statistic sample rate.
    * <p> Actual value of this constant is <code>1000</code> milliseconds.
@@ -542,6 +504,7 @@ public interface DistributionConfig extends Config, LogConfig {
   public static final int MAX_STATISTIC_SAMPLE_RATE = 60000;
 
   /** The name of the "statisticSampleRate" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_STATISTIC_SAMPLE_RATE, max=MAX_STATISTIC_SAMPLE_RATE)
   public static final String STATISTIC_SAMPLE_RATE_NAME =
     "statistic-sample-rate";
 
@@ -550,18 +513,16 @@ public interface DistributionConfig extends Config, LogConfig {
    *
    * @return <code>null</code> if no file was specified
    */
+  @ConfigAttributeGetter(name=STATISTIC_ARCHIVE_FILE_NAME)
   public File getStatisticArchiveFile();
   /**
    * Sets the value of the <a href="../DistributedSystem.html#statistic-archive-file">"statistic-archive-file"</a> property.
    */
+  @ConfigAttributeSetter(name=STATISTIC_ARCHIVE_FILE_NAME)
   public void setStatisticArchiveFile(File value);
-  /**
-   * Returns true if the value of the statisticArchiveFile attribute can currently
-   * be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isStatisticArchiveFileModifiable();
+
   /** The name of the "statisticArchiveFile" property */
+  @ConfigAttribute(type=File.class)
   public static final String STATISTIC_ARCHIVE_FILE_NAME =
     "statistic-archive-file";
 
@@ -578,20 +539,18 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cache-xml-file">"cache-xml-file"</a>
    * property
    */
+  @ConfigAttributeGetter(name=CACHE_XML_FILE_NAME)
   public File getCacheXmlFile();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#cache-xml-file">"cache-xml-file"</a>
    * property
    */
+  @ConfigAttributeSetter(name=CACHE_XML_FILE_NAME)
   public void setCacheXmlFile(File value);
-  /**
-   * Returns true if the value of the
-   * attribute can currently be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isCacheXmlFileModifiable();
+
   /** The name of the "cacheXmlFile" property */
+  @ConfigAttribute(type=File.class)
   public static final String CACHE_XML_FILE_NAME = "cache-xml-file";
 
   /** The default value of the "cacheXmlFile" property */
@@ -602,6 +561,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#ack-wait-threshold">"ack-wait-threshold"</a>
    * property
    */
+  @ConfigAttributeGetter(name=ACK_WAIT_THRESHOLD_NAME)
   public int getAckWaitThreshold();
 
   /**
@@ -610,15 +570,8 @@ public interface DistributionConfig extends Config, LogConfig {
    * property
      * Setting this value too low will cause spurious alerts.
      */
+  @ConfigAttributeSetter(name=ACK_WAIT_THRESHOLD_NAME)
   public void setAckWaitThreshold(int newThreshold);
-  /**
-   * Returns true if the value of the AckWaitThreshold attribute can currently
-   * be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isAckWaitThresholdModifiable();
-  /** The name of the "ackWaitThreshold" property */
-  public static final String ACK_WAIT_THRESHOLD_NAME = "ack-wait-threshold";
 
   /**
    * The default AckWaitThreshold.
@@ -635,12 +588,17 @@ public interface DistributionConfig extends Config, LogConfig {
    * <p> Actual value of this constant is <code>MAX_INT</code> seconds.
    */
   public static final int MAX_ACK_WAIT_THRESHOLD = Integer.MAX_VALUE;
+  /** The name of the "ackWaitThreshold" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_ACK_WAIT_THRESHOLD)
+  public static final String ACK_WAIT_THRESHOLD_NAME = "ack-wait-threshold";
+
 
   /**
    * Returns the value of the <a
    * href="../DistributedSystem.html#ack-severe-alert-threshold">"ack-severe-alert-threshold"</a>
    * property
    */
+  @ConfigAttributeGetter(name=ACK_SEVERE_ALERT_THRESHOLD_NAME)
   public int getAckSevereAlertThreshold();
 
   /**
@@ -649,15 +607,9 @@ public interface DistributionConfig extends Config, LogConfig {
    * property
      * Setting this value too low will cause spurious forced disconnects.
      */
+  @ConfigAttributeSetter(name=ACK_SEVERE_ALERT_THRESHOLD_NAME)
   public void setAckSevereAlertThreshold(int newThreshold);
-  /**
-   * Returns true if the value of the ackSevereAlertThreshold attribute can currently
-   * be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isAckSevereAlertThresholdModifiable();
-  /** The name of the "ackSevereAlertThreshold" property */
-  public static final String ACK_SEVERE_ALERT_THRESHOLD_NAME = "ack-severe-alert-threshold";
+
   /**
    * The default ackSevereAlertThreshold.
    * <p> Actual value of this constant is <code>0</code> seconds, which
@@ -675,26 +627,25 @@ public interface DistributionConfig extends Config, LogConfig {
    * <p> Actual value of this constant is <code>MAX_INT</code> seconds.
    */
   public static final int MAX_ACK_SEVERE_ALERT_THRESHOLD = Integer.MAX_VALUE;
-
+  /** The name of the "ackSevereAlertThreshold" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_ACK_SEVERE_ALERT_THRESHOLD)
+  public static final String ACK_SEVERE_ALERT_THRESHOLD_NAME = "ack-severe-alert-threshold";
 
   /**
    * Returns the value of the <a
    * href="../DistributedSystem.html#archive-file-size-limit">"archive-file-size-limit"</a>
    * property
    */
+  @ConfigAttributeGetter(name=ARCHIVE_FILE_SIZE_LIMIT_NAME)
   public int getArchiveFileSizeLimit();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#archive-file-size-limit">"archive-file-size-limit"</a>
    * property
    */
+  @ConfigAttributeSetter(name=ARCHIVE_FILE_SIZE_LIMIT_NAME)
   public void setArchiveFileSizeLimit(int value);
-  /**
-   * Returns true if the value of the ArchiveFileSizeLimit attribute can currently
-   * be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isArchiveFileSizeLimitModifiable();
+
   /**
    * The default statistic archive file size limit.
    * <p> Actual value of this constant is <code>0</code> megabytes.
@@ -712,6 +663,7 @@ public interface DistributionConfig extends Config, LogConfig {
   public static final int MAX_ARCHIVE_FILE_SIZE_LIMIT = 1000000;
 
   /** The name of the "ArchiveFileSizeLimit" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_ARCHIVE_FILE_SIZE_LIMIT, max=MAX_ARCHIVE_FILE_SIZE_LIMIT)
   public static final String ARCHIVE_FILE_SIZE_LIMIT_NAME =
     "archive-file-size-limit";
   /**
@@ -719,19 +671,16 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#archive-disk-space-limit">"archive-disk-space-limit"</a>
    * property
    */
+  @ConfigAttributeGetter(name=ARCHIVE_DISK_SPACE_LIMIT_NAME)
   public int getArchiveDiskSpaceLimit();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#archive-disk-space-limit">"archive-disk-space-limit"</a>
    * property
    */
+  @ConfigAttributeSetter(name=ARCHIVE_DISK_SPACE_LIMIT_NAME)
   public void setArchiveDiskSpaceLimit(int value);
-  /**
-   * Returns true if the value of the ArchiveDiskSpaceLimit attribute can currently
-   * be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isArchiveDiskSpaceLimitModifiable();
+
   /**
    * The default archive disk space limit.
    * <p> Actual value of this constant is <code>0</code> megabytes.
@@ -749,6 +698,7 @@ public interface DistributionConfig extends Config, LogConfig {
   public static final int MAX_ARCHIVE_DISK_SPACE_LIMIT = 1000000;
 
   /** The name of the "ArchiveDiskSpaceLimit" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_ARCHIVE_DISK_SPACE_LIMIT, max=MAX_ARCHIVE_DISK_SPACE_LIMIT)
   public static final String ARCHIVE_DISK_SPACE_LIMIT_NAME =
     "archive-disk-space-limit";
   /**
@@ -756,19 +706,16 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#log-file-size-limit">"log-file-size-limit"</a>
    * property
    */
+  @ConfigAttributeGetter(name=LOG_FILE_SIZE_LIMIT_NAME)
   public int getLogFileSizeLimit();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#log-file-size-limit">"log-file-size-limit"</a>
    * property
    */
+  @ConfigAttributeSetter(name=LOG_FILE_SIZE_LIMIT_NAME)
   public void setLogFileSizeLimit(int value);
-  /**
-   * Returns true if the value of the LogFileSizeLimit attribute can currently
-   * be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isLogFileSizeLimitModifiable();
+
   /**
    * The default log file size limit.
    * <p> Actual value of this constant is <code>0</code> megabytes.
@@ -786,6 +733,7 @@ public interface DistributionConfig extends Config, LogConfig {
   public static final int MAX_LOG_FILE_SIZE_LIMIT = 1000000;
 
   /** The name of the "LogFileSizeLimit" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_LOG_FILE_SIZE_LIMIT, max=MAX_LOG_FILE_SIZE_LIMIT)
   public static final String LOG_FILE_SIZE_LIMIT_NAME =
     "log-file-size-limit";
 
@@ -794,19 +742,16 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#log-disk-space-limit">"log-disk-space-limit"</a>
    * property
    */
+  @ConfigAttributeGetter(name=LOG_DISK_SPACE_LIMIT_NAME)
   public int getLogDiskSpaceLimit();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#log-disk-space-limit">"log-disk-space-limit"</a>
    * property
    */
+  @ConfigAttributeSetter(name=LOG_DISK_SPACE_LIMIT_NAME)
   public void setLogDiskSpaceLimit(int value);
-  /**
-   * Returns true if the value of the LogDiskSpaceLimit attribute can currently
-   * be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isLogDiskSpaceLimitModifiable();
+
   /**
    * The default log disk space limit.
    * <p> Actual value of this constant is <code>0</code> megabytes.
@@ -824,6 +769,7 @@ public interface DistributionConfig extends Config, LogConfig {
   public static final int MAX_LOG_DISK_SPACE_LIMIT = 1000000;
 
   /** The name of the "LogDiskSpaceLimit" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_LOG_DISK_SPACE_LIMIT, max=MAX_LOG_DISK_SPACE_LIMIT)
   public static final String LOG_DISK_SPACE_LIMIT_NAME =
     "log-disk-space-limit";
 
@@ -833,6 +779,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    * @deprecated as of 8.0 use {@link #getClusterSSLEnabled} instead.
    */
+  @ConfigAttributeGetter(name=SSL_ENABLED_NAME)
   public boolean getSSLEnabled();
 
   /**
@@ -845,6 +792,7 @@ public interface DistributionConfig extends Config, LogConfig {
   /** The name of the "SSLEnabled" property 
    * @deprecated as of 8.0 use {@link #CLUSTER_SSL_ENABLED_NAME} instead.
    */
+  @ConfigAttribute(type=Boolean.class)
   public static final String SSL_ENABLED_NAME =
     "ssl-enabled";
 
@@ -854,6 +802,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    * @deprecated as of 8.0 use {@link #setClusterSSLEnabled} instead.
    */
+  @ConfigAttributeSetter(name=SSL_ENABLED_NAME)
   public void setSSLEnabled( boolean enabled );
 
   /**
@@ -862,6 +811,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    * @deprecated as of 8.0 use {@link #getClusterSSLProtocols} instead.
    */
+  @ConfigAttributeGetter(name=SSL_PROTOCOLS_NAME)
    public String getSSLProtocols( );
 
   /**
@@ -870,6 +820,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    * @deprecated as of 8.0 use {@link #setClusterSSLProtocols} instead.
    */
+  @ConfigAttributeSetter(name=SSL_PROTOCOLS_NAME)
    public void setSSLProtocols( String protocols );
 
   /**
@@ -881,6 +832,7 @@ public interface DistributionConfig extends Config, LogConfig {
   /** The name of the "SSLProtocols" property 
    * @deprecated as of 8.0 use {@link #CLUSTER_SSL_PROTOCOLS_NAME} instead.
    */
+  @ConfigAttribute(type=String.class)
   public static final String SSL_PROTOCOLS_NAME =
     "ssl-protocols";
 
@@ -890,6 +842,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    * @deprecated as of 8.0 use {@link #getClusterSSLCiphers} instead.
    */
+  @ConfigAttributeGetter(name=SSL_CIPHERS_NAME)
    public String getSSLCiphers( );
 
   /**
@@ -898,6 +851,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    * @deprecated as of 8.0 use {@link #setClusterSSLCiphers} instead.
    */
+  @ConfigAttributeSetter(name=SSL_CIPHERS_NAME)
    public void setSSLCiphers( String ciphers );
 
    /**
@@ -909,6 +863,7 @@ public interface DistributionConfig extends Config, LogConfig {
   /** The name of the "SSLCiphers" property 
    * @deprecated as of 8.0 use {@link #CLUSTER_SSL_CIPHERS_NAME} instead.
    */
+  @ConfigAttribute(type=String.class)
   public static final String SSL_CIPHERS_NAME =
     "ssl-ciphers";
 
@@ -918,6 +873,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    * @deprecated as of 8.0 use {@link #getClusterSSLRequireAuthentication} instead.
    */
+  @ConfigAttributeGetter(name=SSL_REQUIRE_AUTHENTICATION_NAME)
    public boolean getSSLRequireAuthentication( );
 
   /**
@@ -926,6 +882,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    * @deprecated as of 8.0 use {@link #setClusterSSLRequireAuthentication} instead.
    */
+  @ConfigAttributeSetter(name=SSL_REQUIRE_AUTHENTICATION_NAME)
    public void setSSLRequireAuthentication( boolean enabled );
 
    /**
@@ -937,6 +894,7 @@ public interface DistributionConfig extends Config, LogConfig {
   /** The name of the "SSLRequireAuthentication" property 
    * @deprecated as of 8.0 use {@link #CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME} instead.
    */
+  @ConfigAttribute(type=Boolean.class)
   public static final String SSL_REQUIRE_AUTHENTICATION_NAME =
     "ssl-require-authentication";
 
@@ -945,6 +903,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-enabled">"cluster-ssl-enabled"</a>
    * property.
    */
+  @ConfigAttributeGetter(name=CLUSTER_SSL_ENABLED_NAME)
   public boolean getClusterSSLEnabled();
 
   /**
@@ -952,7 +911,8 @@ public interface DistributionConfig extends Config, LogConfig {
    * <p> Actual value of this constant is <code>false</code>.
    */
   public static final boolean DEFAULT_CLUSTER_SSL_ENABLED = false;
-    /** The name of the "ClusterSSLEnabled" property */
+  /** The name of the "ClusterSSLEnabled" property */
+  @ConfigAttribute(type=Boolean.class)
   public static final String CLUSTER_SSL_ENABLED_NAME =
     "cluster-ssl-enabled";
 
@@ -961,6 +921,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-enabled">"cluster-ssl-enabled"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=CLUSTER_SSL_ENABLED_NAME)
   public void setClusterSSLEnabled( boolean enabled );
 
   /**
@@ -968,6 +929,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-protocols">"cluster-ssl-protocols"</a>
    * property.
    */
+  @ConfigAttributeGetter(name=CLUSTER_SSL_PROTOCOLS_NAME)
    public String getClusterSSLProtocols( );
 
   /**
@@ -975,6 +937,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-protocols">"cluster-ssl-protocols"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=CLUSTER_SSL_PROTOCOLS_NAME)
    public void setClusterSSLProtocols( String protocols );
 
   /**
@@ -983,6 +946,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   public static final String DEFAULT_CLUSTER_SSL_PROTOCOLS = "any";
   /** The name of the "ClusterSSLProtocols" property */
+  @ConfigAttribute(type=String.class)
   public static final String CLUSTER_SSL_PROTOCOLS_NAME =
     "cluster-ssl-protocols";
 
@@ -991,6 +955,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-ciphers">"cluster-ssl-ciphers"</a>
    * property.
    */
+  @ConfigAttributeGetter(name=CLUSTER_SSL_CIPHERS_NAME)
    public String getClusterSSLCiphers( );
 
   /**
@@ -998,6 +963,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-ciphers">"cluster-ssl-ciphers"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=CLUSTER_SSL_CIPHERS_NAME)
    public void setClusterSSLCiphers( String ciphers );
 
    /**
@@ -1006,6 +972,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   public static final String DEFAULT_CLUSTER_SSL_CIPHERS = "any";
   /** The name of the "ClusterSSLCiphers" property */
+  @ConfigAttribute(type=String.class)
   public static final String CLUSTER_SSL_CIPHERS_NAME =
     "cluster-ssl-ciphers";
 
@@ -1014,6 +981,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-require-authentication">"cluster-ssl-require-authentication"</a>
    * property.
    */
+  @ConfigAttributeGetter(name=CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME)
    public boolean getClusterSSLRequireAuthentication( );
 
   /**
@@ -1021,6 +989,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-require-authentication">"cluster-ssl-require-authentication"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME)
    public void setClusterSSLRequireAuthentication( boolean enabled );
 
    /**
@@ -1029,6 +998,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   public static final boolean DEFAULT_CLUSTER_SSL_REQUIRE_AUTHENTICATION = true;
   /** The name of the "ClusterSSLRequireAuthentication" property */
+  @ConfigAttribute(type=Boolean.class)
   public static final String CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME =
     "cluster-ssl-require-authentication";
 
@@ -1038,6 +1008,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-keystore">"cluster-ssl-keystore"</a>
    * property.
    */
+  @ConfigAttributeGetter(name=CLUSTER_SSL_KEYSTORE_NAME)
   public String getClusterSSLKeyStore( );
   
   /**
@@ -1045,6 +1016,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-keystore">"cluster-ssl-keystore"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=CLUSTER_SSL_KEYSTORE_NAME)
   public void setClusterSSLKeyStore( String keyStore);
   
   /**
@@ -1054,6 +1026,7 @@ public interface DistributionConfig extends Config, LogConfig {
   public static final String DEFAULT_CLUSTER_SSL_KEYSTORE = "";
   
   /** The name of the "ClusterSSLKeyStore" property */
+  @ConfigAttribute(type=String.class)
   public static final String CLUSTER_SSL_KEYSTORE_NAME = "cluster-ssl-keystore";
   
   /**
@@ -1061,6 +1034,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-keystore-type">"cluster-ssl-keystore-type"</a>
    * property.
    */
+  @ConfigAttributeGetter(name=CLUSTER_SSL_KEYSTORE_TYPE_NAME)
   public String getClusterSSLKeyStoreType( );
   
   /**
@@ -1068,6 +1042,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-keystore-type">"cluster-ssl-keystore-type"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=CLUSTER_SSL_KEYSTORE_TYPE_NAME)
   public void setClusterSSLKeyStoreType( String keyStoreType);
   
   /**
@@ -1077,6 +1052,7 @@ public interface DistributionConfig extends Config, LogConfig {
   public static final String DEFAULT_CLUSTER_SSL_KEYSTORE_TYPE = "";
   
   /** The name of the "ClusterSSLKeyStoreType" property */
+  @ConfigAttribute(type=String.class)
   public static final String CLUSTER_SSL_KEYSTORE_TYPE_NAME = "cluster-ssl-keystore-type";
   
   /**
@@ -1084,6 +1060,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-keystore-password">"cluster-ssl-keystore-password"</a>
    * property.
    */
+  @ConfigAttributeGetter(name=CLUSTER_SSL_KEYSTORE_PASSWORD_NAME)
   public String getClusterSSLKeyStorePassword( );
   
   /**
@@ -1091,6 +1068,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-keystore-password">"cluster-ssl-keystore-password"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=CLUSTER_SSL_KEYSTORE_PASSWORD_NAME)
   public void setClusterSSLKeyStorePassword( String keyStorePassword);
   
   /**
@@ -1100,6 +1078,7 @@ public interface DistributionConfig extends Config, LogConfig {
   public static final String DEFAULT_CLUSTER_SSL_KEYSTORE_PASSWORD = "";
   
   /** The name of the "ClusterSSLKeyStorePassword" property */
+  @ConfigAttribute(type=String.class)
   public static final String CLUSTER_SSL_KEYSTORE_PASSWORD_NAME = "cluster-ssl-keystore-password";
   
   /**
@@ -1107,6 +1086,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-truststore">"cluster-ssl-truststore"</a>
    * property.
    */
+  @ConfigAttributeGetter(name=CLUSTER_SSL_TRUSTSTORE_NAME)
   public String getClusterSSLTrustStore( );
   
   /**
@@ -1114,6 +1094,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-truststore">"cluster-ssl-truststore"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=CLUSTER_SSL_TRUSTSTORE_NAME)
   public void setClusterSSLTrustStore( String trustStore);
   
   /**
@@ -1123,6 +1104,7 @@ public interface DistributionConfig extends Config, LogConfig {
   public static final String DEFAULT_CLUSTER_SSL_TRUSTSTORE = "";
   
   /** The name of the "ClusterSSLTrustStore" property */
+  @ConfigAttribute(type=String.class)
   public static final String CLUSTER_SSL_TRUSTSTORE_NAME = "cluster-ssl-truststore";
   
   /**
@@ -1130,6 +1112,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-truststore-password">"cluster-ssl-truststore-password"</a>
    * property.
    */
+  @ConfigAttributeGetter(name=CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME)
   public String getClusterSSLTrustStorePassword( );
   
   /**
@@ -1137,6 +1120,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#cluster-ssl-truststore-password">"cluster-ssl-truststore-password"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME)
   public void setClusterSSLTrustStorePassword( String trusStorePassword);
   /**
    * The default cluster-ssl-truststore-password value.
@@ -1145,6 +1129,7 @@ public interface DistributionConfig extends Config, LogConfig {
   public static final String DEFAULT_CLUSTER_SSL_TRUSTSTORE_PASSWORD = "";
   
   /** The name of the "ClusterSSLKeyStorePassword" property */
+  @ConfigAttribute(type=String.class)
   public static final String CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME = "cluster-ssl-truststore-password";
   
   
@@ -1213,22 +1198,17 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#socket-lease-time">"socket-lease-time"</a>
    * property
    */
+  @ConfigAttributeGetter(name=SOCKET_LEASE_TIME_NAME)
   public int getSocketLeaseTime();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#socket-lease-time">"socket-lease-time"</a>
    * property
    */
+  @ConfigAttributeSetter(name=SOCKET_LEASE_TIME_NAME)
   public void setSocketLeaseTime(int value);
-  /**
-   * Returns true if the value of the
-   * attribute can currently be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isSocketLeaseTimeModifiable();
 
-  /** The name of the "socketLeaseTime" property */
-  public static final String SOCKET_LEASE_TIME_NAME = "socket-lease-time";
+
 
   /** The default value of the "socketLeaseTime" property */
   public static final int DEFAULT_SOCKET_LEASE_TIME = 60000;
@@ -1243,27 +1223,25 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   public static final int MAX_SOCKET_LEASE_TIME = 600000;
 
+  /** The name of the "socketLeaseTime" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_SOCKET_LEASE_TIME, max=MAX_SOCKET_LEASE_TIME)
+  public static final String SOCKET_LEASE_TIME_NAME = "socket-lease-time";
+
   /**
    * Returns the value of the <a
    * href="../DistributedSystem.html#socket-buffer-size">"socket-buffer-size"</a>
    * property
    */
+  @ConfigAttributeGetter(name=SOCKET_BUFFER_SIZE_NAME)
   public int getSocketBufferSize();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#socket-buffer-size">"socket-buffer-size"</a>
    * property
    */
+  @ConfigAttributeSetter(name=SOCKET_BUFFER_SIZE_NAME)
   public void setSocketBufferSize(int value);
-  /**
-   * Returns true if the value of the
-   * attribute can currently be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isSocketBufferSizeModifiable();
 
-  /** The name of the "socketBufferSize" property */
-  public static final String SOCKET_BUFFER_SIZE_NAME = "socket-buffer-size";
 
   /** The default value of the "socketBufferSize" property */
   public static final int DEFAULT_SOCKET_BUFFER_SIZE = 32768;
@@ -1281,11 +1259,17 @@ public interface DistributionConfig extends Config, LogConfig {
   public static final boolean VALIDATE = Boolean.getBoolean("gemfire.validateMessageSize");
   public static final int VALIDATE_CEILING = Integer.getInteger("gemfire.validateMessageSizeCeiling",  8 * 1024 * 1024).intValue();
 
+  /** The name of the "socketBufferSize" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_SOCKET_BUFFER_SIZE, max=MAX_SOCKET_BUFFER_SIZE)
+  public static final String SOCKET_BUFFER_SIZE_NAME = "socket-buffer-size";
+
+
   /**
    * Get the value of the
    * <a href="../DistributedSystem.html#mcast-send-buffer-size">"mcast-send-buffer-size"</a>
    * property
    */
+  @ConfigAttributeGetter(name=MCAST_SEND_BUFFER_SIZE_NAME)
   public int getMcastSendBufferSize();
 
   /**
@@ -1293,18 +1277,9 @@ public interface DistributionConfig extends Config, LogConfig {
    * <a href="../DistributedSystem.html#mcast-send-buffer-size">"mcast-send-buffer-size"</a>
    * property
    */
+  @ConfigAttributeSetter(name=MCAST_SEND_BUFFER_SIZE_NAME)
   public void setMcastSendBufferSize(int value);
 
-  /**
-   * Returns true if the corresponding property is currently modifiable.
-   * Some attributes can't be modified while a DistributedSystem is running.
-   */
-  public boolean isMcastSendBufferSizeModifiable();
-
-  /**
-   * The name of the corresponding property
-   */
-  public static final String MCAST_SEND_BUFFER_SIZE_NAME = "mcast-send-buffer-size";
 
   /**
    * The default value of the corresponding property
@@ -1319,10 +1294,17 @@ public interface DistributionConfig extends Config, LogConfig {
   public static final int MIN_MCAST_SEND_BUFFER_SIZE = 2048;
 
   /**
+   * The name of the corresponding property
+   */
+  @ConfigAttribute(type=Integer.class, min=MIN_MCAST_SEND_BUFFER_SIZE)
+  public static final String MCAST_SEND_BUFFER_SIZE_NAME = "mcast-send-buffer-size";
+
+  /**
    * Get the value of the
    * <a href="../DistributedSystem.html#mcast-recv-buffer-size">"mcast-recv-buffer-size"</a>
    * property
    */
+  @ConfigAttributeGetter(name=MCAST_RECV_BUFFER_SIZE_NAME)
   public int getMcastRecvBufferSize();
 
   /**
@@ -1330,18 +1312,9 @@ public interface DistributionConfig extends Config, LogConfig {
    * <a href="../DistributedSystem.html#mcast-recv-buffer-size">"mcast-recv-buffer-size"</a>
    * property
    */
+  @ConfigAttributeSetter(name=MCAST_RECV_BUFFER_SIZE_NAME)
   public void setMcastRecvBufferSize(int value);
 
-  /**
-   * Returns true if the corresponding property is currently modifiable.
-   * Some attributes can't be modified while a DistributedSystem is running.
-   */
-  public boolean isMcastRecvBufferSizeModifiable();
-
-  /**
-   * The name of the corresponding property
-   */
-  public static final String MCAST_RECV_BUFFER_SIZE_NAME = "mcast-recv-buffer-size";
 
   /**
    * The default value of the corresponding property
@@ -1354,7 +1327,11 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   public static final int MIN_MCAST_RECV_BUFFER_SIZE = 2048;
 
-
+  /**
+   * The name of the corresponding property
+   */
+  @ConfigAttribute(type=Integer.class, min=MIN_MCAST_RECV_BUFFER_SIZE)
+  public static final String MCAST_RECV_BUFFER_SIZE_NAME = "mcast-recv-buffer-size";
 
 
   /**
@@ -1362,6 +1339,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * <a href="../DistributedSystem.html#mcast-flow-control">"mcast-flow-control"</a>
    * property.
    */
+  @ConfigAttributeGetter(name=MCAST_FLOW_CONTROL_NAME)
   public FlowControlParams getMcastFlowControl();
 
   /**
@@ -1369,17 +1347,13 @@ public interface DistributionConfig extends Config, LogConfig {
    * <a href="../DistributedSystem.html#mcast-flow-control">"mcast-flow-control"</a>
    * property
    */
+  @ConfigAttributeSetter(name=MCAST_FLOW_CONTROL_NAME)
   public void setMcastFlowControl(FlowControlParams values);
 
   /**
-   * Returns true if the corresponding property is currently modifiable.
-   * Some attributes can't be modified while a DistributedSystem is running.
-   */
-  public boolean isMcastFlowControlModifiable();
-
-  /**
    * The name of the corresponding property
    */
+  @ConfigAttribute(type=FlowControlParams.class)
   public static final String MCAST_FLOW_CONTROL_NAME = "mcast-flow-control";
 
   /**
@@ -1423,6 +1397,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * <a href="../DistributedSystem.html#udp-fragment-size">"udp-fragment-size"</a>
    * property.
    */
+  @ConfigAttributeGetter(name=UDP_FRAGMENT_SIZE_NAME)
   public int getUdpFragmentSize();
 
   /**
@@ -1430,20 +1405,10 @@ public interface DistributionConfig extends Config, LogConfig {
    * <a href="../DistributedSystem.html#udp-fragment-size">"udp-fragment-size"</a>
    * property
    */
+  @ConfigAttributeSetter(name=UDP_FRAGMENT_SIZE_NAME)
   public void setUdpFragmentSize(int value);
 
   /**
-   * Returns true if the corresponding property is currently modifiable.
-   * Some attributes can't be modified while a DistributedSystem is running.
-   */
-  public boolean isUdpFragmentSizeModifiable();
-
-  /**
-   * The name of the corresponding property
-   */
-  public static final String UDP_FRAGMENT_SIZE_NAME = "udp-fragment-size";
-
-  /**
    * The default value of the corresponding property
    */
   public static final int DEFAULT_UDP_FRAGMENT_SIZE = 60000;
@@ -1456,7 +1421,11 @@ public interface DistributionConfig extends Config, LogConfig {
   */
   public static final int MAX_UDP_FRAGMENT_SIZE = 60000;
 
-
+  /**
+   * The name of the corresponding property
+   */
+  @ConfigAttribute(type=Integer.class, min=MIN_UDP_FRAGMENT_SIZE, max=MAX_UDP_FRAGMENT_SIZE)
+  public static final String UDP_FRAGMENT_SIZE_NAME = "udp-fragment-size";
 
 
 
@@ -1466,6 +1435,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * <a href="../DistributedSystem.html#udp-send-buffer-size">"udp-send-buffer-size"</a>
    * property
    */
+  @ConfigAttributeGetter(name=UDP_SEND_BUFFER_SIZE_NAME)
   public int getUdpSendBufferSize();
 
   /**
@@ -1473,20 +1443,10 @@ public interface DistributionConfig extends Config, LogConfig {
    * <a href="../DistributedSystem.html#udp-send-buffer-size">"udp-send-buffer-size"</a>
    * property
    */
+  @ConfigAttributeSetter(name=UDP_SEND_BUFFER_SIZE_NAME)
   public void setUdpSendBufferSize(int value);
 
   /**
-   * Returns true if the corresponding property is currently modifiable.
-   * Some attributes can't be modified while a DistributedSystem is running.
-   */
-  public boolean isUdpSendBufferSizeModifiable();
-
-  /**
-   * The name of the corresponding property
-   */
-  public static final String UDP_SEND_BUFFER_SIZE_NAME = "udp-send-buffer-size";
-
-  /**
    * The default value of the corresponding property
    */
   public static final int DEFAULT_UDP_SEND_BUFFER_SIZE = 65535;
@@ -1497,13 +1457,18 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   public static final int MIN_UDP_SEND_BUFFER_SIZE = 2048;
 
-
+  /**
+   * The name of the corresponding property
+   */
+  @ConfigAttribute(type=Integer.class, min=MIN_UDP_SEND_BUFFER_SIZE)
+  public static final String UDP_SEND_BUFFER_SIZE_NAME = "udp-send-buffer-size";
 
   /**
    * Get the value of the
    * <a href="../DistributedSystem.html#udp-recv-buffer-size">"udp-recv-buffer-size"</a>
    * property
    */
+  @ConfigAttributeGetter(name=UDP_RECV_BUFFER_SIZE_NAME)
   public int getUdpRecvBufferSize();
 
   /**
@@ -1511,20 +1476,10 @@ public interface DistributionConfig extends Config, LogConfig {
    * <a href="../DistributedSystem.html#udp-recv-buffer-size">"udp-recv-buffer-size"</a>
    * property
    */
+  @ConfigAttributeSetter(name=UDP_RECV_BUFFER_SIZE_NAME)
   public void setUdpRecvBufferSize(int value);
 
   /**
-   * Returns true if the corresponding property is currently modifiable.
-   * Some attributes can't be modified while a DistributedSystem is running.
-   */
-  public boolean isUdpRecvBufferSizeModifiable();
-
-  /**
-   * The name of the corresponding property
-   */
-  public static final String UDP_RECV_BUFFER_SIZE_NAME = "udp-recv-buffer-size";
-
-  /**
    * The default value of the unicast receive buffer size property
    */
   public static final int DEFAULT_UDP_RECV_BUFFER_SIZE = 1048576;
@@ -1543,24 +1498,28 @@ public interface DistributionConfig extends Config, LogConfig {
 
 
   /**
+   * The name of the corresponding property
+   */
+  @ConfigAttribute(type=Integer.class, min=MIN_UDP_RECV_BUFFER_SIZE)
+  public static final String UDP_RECV_BUFFER_SIZE_NAME = "udp-recv-buffer-size";
+
+  /**
    * Returns the value of the <a
    * href="../DistributedSystem.html#disable-tcp">"disable-tcp"</a>
    * property
    */
+  @ConfigAttributeGetter(name=DISABLE_TCP_NAME)
   public boolean getDisableTcp();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#disable-tcp">"disable-tcp"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=DISABLE_TCP_NAME)
   public void setDisableTcp(boolean newValue);
-  /**
-   * Returns true if the value of the DISABLE_TCP attribute can currently
-   * be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isDisableTcpModifiable();
+
   /** The name of the corresponding property */
+  @ConfigAttribute(type=Boolean.class)
   public static final String DISABLE_TCP_NAME = "disable-tcp";
 
   /** The default value of the corresponding property */
@@ -1570,6 +1529,7 @@ public interface DistributionConfig extends Config, LogConfig {
   /**
    * Turns on timing statistics for the distributed system
    */
+  @ConfigAttributeSetter(name=ENABLE_TIME_STATISTICS_NAME)
   public void setEnableTimeStatistics(boolean newValue);
 
   /**
@@ -1577,9 +1537,11 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#enable-time-statistics">enable-time-statistics</a>
    * property
    */
+  @ConfigAttributeGetter(name=ENABLE_TIME_STATISTICS_NAME)
   public boolean getEnableTimeStatistics();
 
   /** the name of the corresponding property */
+  @ConfigAttribute(type=Boolean.class)
   public static final String ENABLE_TIME_STATISTICS_NAME = "enable-time-statistics";
 
   /** The default value of the corresponding property */
@@ -1590,7 +1552,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * Sets the value for 
    <a href="../DistributedSystem.html#use-cluster-configuration">use-shared-configuration</a>
    */
-  
+  @ConfigAttributeSetter(name=USE_CLUSTER_CONFIGURATION_NAME)
   public void setUseSharedConfiguration(boolean newValue);
 
   /**
@@ -1598,9 +1560,11 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#use-cluster-configuration">use-cluster-configuration</a>
    * property
    */
+  @ConfigAttributeGetter(name=USE_CLUSTER_CONFIGURATION_NAME)
   public boolean getUseSharedConfiguration();
 
   /** the name of the corresponding property */
+  @ConfigAttribute(type=Boolean.class)
   public static final String USE_CLUSTER_CONFIGURATION_NAME = "use-cluster-configuration";
 
   /** The default value of the corresponding property */
@@ -1610,7 +1574,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * Sets the value for 
    <a href="../DistributedSystem.html#enable-cluster-configuration">enable-cluster-configuration</a>
    */
-  
+  @ConfigAttributeSetter(name=ENABLE_CLUSTER_CONFIGURATION_NAME)
   public void setEnableClusterConfiguration(boolean newValue);
 
   /**
@@ -1618,13 +1582,16 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#enable-cluster-configuration">enable-cluster-configuration</a>
    * property
    */
+  @ConfigAttributeGetter(name=ENABLE_CLUSTER_CONFIGURATION_NAME)
   public boolean getEnableClusterConfiguration();
 
   /** the name of the corresponding property */
+  @ConfigAttribute(type=Boolean.class)
   public static final String ENABLE_CLUSTER_CONFIGURATION_NAME = "enable-cluster-configuration";
   /** The default value of the corresponding property */
   public static final boolean DEFAULT_ENABLE_CLUSTER_CONFIGURATION = true;
-  
+
+  @ConfigAttribute(type=Boolean.class)
   public static final String LOAD_CLUSTER_CONFIG_FROM_DIR_NAME = "load-cluster-configuration-from-dir";
   public static final boolean DEFAULT_LOAD_CLUSTER_CONFIG_FROM_DIR = false;
   
@@ -1633,6 +1600,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * <a href="../DistributedSystem.html#cluster-configuration-dir">cluster-configuration-dir</a>
    * property
    */
+  @ConfigAttributeGetter(name=LOAD_CLUSTER_CONFIG_FROM_DIR_NAME)
   public boolean getLoadClusterConfigFromDir();
   
   /**
@@ -1640,21 +1608,28 @@ public interface DistributionConfig extends Config, LogConfig {
    * <a href="../DistributedSystem.html#cluster-configuration-dir">cluster-configuration-dir</a>
    * property
    */
+  @ConfigAttributeSetter(name=LOAD_CLUSTER_CONFIG_FROM_DIR_NAME)
   public void setLoadClusterConfigFromDir(boolean newValue);
-  
+
+  @ConfigAttribute(type=String.class)
   public static final String CLUSTER_CONFIGURATION_DIR = "cluster-configuration-dir";
   public static final String DEFAULT_CLUSTER_CONFIGURATION_DIR = System.getProperty("user.dir");
-  
-  public String getClusterConfigDir(); 
+
+  @ConfigAttributeGetter(name=CLUSTER_CONFIGURATION_DIR)
+  public String getClusterConfigDir();
+  @ConfigAttributeSetter(name=CLUSTER_CONFIGURATION_DIR)
   public void setClusterConfigDir(final String clusterConfigDir);
   
   /** Turns on network partition detection */
+  @ConfigAttributeSetter(name=ENABLE_NETWORK_PARTITION_DETECTION_NAME)
   public void setEnableNetworkPartitionDetection(boolean newValue);
   /**
    * Returns the value of the enable-network-partition-detection property
    */
+  @ConfigAttributeGetter(name=ENABLE_NETWORK_PARTITION_DETECTION_NAME)
   public boolean getEnableNetworkPartitionDetection();
   /** the name of the corresponding property */
+  @ConfigAttribute(type=Boolean.class)
   public static final String ENABLE_NETWORK_PARTITION_DETECTION_NAME =
     "enable-network-partition-detection";
   public static final boolean DEFAULT_ENABLE_NETWORK_PARTITION_DETECTION = false;
@@ -1664,6 +1639,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * <a href="../DistributedSystem.html#member-timeout">"member-timeout"</a>
    * property
    */
+  @ConfigAttributeGetter(name=MEMBER_TIMEOUT_NAME)
   public int getMemberTimeout();
 
   /**
@@ -1671,20 +1647,10 @@ public interface DistributionConfig extends Config, LogConfig {
    * <a href="../DistributedSystem.html#member-timeout">"member-timeout"</a>
    * property
    */
+  @ConfigAttributeSetter(name=MEMBER_TIMEOUT_NAME)
   public void setMemberTimeout(int value);
 
   /**
-   * Returns true if the corresponding property is currently modifiable.
-   * Some attributes can't be modified while a DistributedSystem is running.
-   */
-  public boolean isMemberTimeoutModifiable();
-
-  /**
-   * The name of the corresponding property
-   */
-  public static final String MEMBER_TIMEOUT_NAME = "member-timeout";
-
-  /**
    * The default value of the corresponding property
    */
   public static final int DEFAULT_MEMBER_TIMEOUT = 5000;
@@ -1694,14 +1660,21 @@ public interface DistributionConfig extends Config, LogConfig {
 
   /**The maximum member-timeout setting of 600000 millieseconds */
   public static final int MAX_MEMBER_TIMEOUT = 600000;
+  /**
+   * The name of the corresponding property
+   */
+  @ConfigAttribute(type=Integer.class, min=MIN_MEMBER_TIMEOUT, max=MAX_MEMBER_TIMEOUT)
+  public static final String MEMBER_TIMEOUT_NAME = "member-timeout";
 
-
+  @ConfigAttribute(type=int[].class)
   public static final String MEMBERSHIP_PORT_RANGE_NAME = "membership-port-range";
   
   public static final int[] DEFAULT_MEMBERSHIP_PORT_RANGE = new int[]{1024,65535};
-  
+
+  @ConfigAttributeGetter(name=MEMBERSHIP_PORT_RANGE_NAME)
   public int[] getMembershipPortRange();
-  
+
+  @ConfigAttributeSetter(name=MEMBERSHIP_PORT_RANGE_NAME)
   public void setMembershipPortRange(int[] range);
   
   /**
@@ -1709,20 +1682,18 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#conserve-sockets">"conserve-sockets"</a>
    * property
    */
+  @ConfigAttributeGetter(name=CONSERVE_SOCKETS_NAME)
   public boolean getConserveSockets();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#conserve-sockets">"conserve-sockets"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=CONSERVE_SOCKETS_NAME)
   public void setConserveSockets(boolean newValue);
-  /**
-   * Returns true if the value of the ConserveSockets attribute can currently
-   * be modified.
-   * Some attributes can not be modified while the system is running.
-   */
-  public boolean isConserveSocketsModifiable();
+
   /** The name of the "conserveSockets" property */
+  @ConfigAttribute(type=Boolean.class)
   public static final String CONSERVE_SOCKETS_NAME = "conserve-sockets";
 
   /** The default value of the "conserveSockets" property */
@@ -1733,14 +1704,17 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#roles">"roles"</a>
    * property
    */
+  @ConfigAttributeGetter(name=ROLES_NAME)
   public String getRoles();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#roles">"roles"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=ROLES_NAME)
   public void setRoles(String roles);
   /** The name of the "roles" property */
+  @ConfigAttribute(type=String.class)
   public static final String ROLES_NAME = "roles";
   /** The default value of the "roles" property */
   public static final String DEFAULT_ROLES = "";
@@ -1748,6 +1722,7 @@ public interface DistributionConfig extends Config, LogConfig {
 
   /**
    * The name of the "max wait time for reconnect" property */
+  @ConfigAttribute(type=Integer.class)
   public static final String MAX_WAIT_TIME_FOR_RECONNECT_NAME = "max-wait-time-reconnect";
 
   /**
@@ -1758,16 +1733,19 @@ public interface DistributionConfig extends Config, LogConfig {
   /**
    * Sets the max wait timeout, in milliseconds, for reconnect.
    * */
+  @ConfigAttributeSetter(name=MAX_WAIT_TIME_FOR_RECONNECT_NAME)
   public void setMaxWaitTimeForReconnect( int timeOut);
 
   /**
    * Returns the max wait timeout, in milliseconds, for reconnect.
    * */
+  @ConfigAttributeGetter(name=MAX_WAIT_TIME_FOR_RECONNECT_NAME)
   public int getMaxWaitTimeForReconnect();
 
   /**
    * The name of the "max number of tries for reconnect" property.
    * */
+  @ConfigAttribute(type=Integer.class)
   public static final String MAX_NUM_RECONNECT_TRIES = "max-num-reconnect-tries";
 
   /**
@@ -1778,11 +1756,13 @@ public interface DistributionConfig extends Config, LogConfig {
   /**
    * Sets the max number of tries for reconnect.
    * */
+  @ConfigAttributeSetter(name=MAX_NUM_RECONNECT_TRIES)
   public void setMaxNumReconnectTries(int tries);
 
   /**
    * Returns the value for max number of tries for reconnect.
    * */
+  @ConfigAttributeGetter(name=MAX_NUM_RECONNECT_TRIES)
   public int getMaxNumReconnectTries();
 
   // ------------------- Asynchronous Messaging Properties -------------------
@@ -1792,22 +1772,16 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#async-distribution-timeout">
    * "async-distribution-timeout"</a> property.
    */
+  @ConfigAttributeGetter(name=ASYNC_DISTRIBUTION_TIMEOUT_NAME)
   public int getAsyncDistributionTimeout();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#async-distribution-timeout">
    * "async-distribution-timeout"</a> property.
    */
+  @ConfigAttributeSetter(name=ASYNC_DISTRIBUTION_TIMEOUT_NAME)
   public void setAsyncDistributionTimeout(int newValue);
-  /**
-   * Returns true if the value of the asyncDistributionTimeout attribute can
-   * currently be modified. Some attributes can not be modified while the
-   * system is running.
-   */
-  public boolean isAsyncDistributionTimeoutModifiable();
 
-  /** The name of the "asyncDistributionTimeout" property */
-  public static final String ASYNC_DISTRIBUTION_TIMEOUT_NAME = "async-distribution-timeout";
   /** The default value of "asyncDistributionTimeout" is <code>0</code>. */
   public static final int DEFAULT_ASYNC_DISTRIBUTION_TIMEOUT = 0;
   /** The minimum value of "asyncDistributionTimeout" is <code>0</code>. */
@@ -1815,55 +1789,48 @@ public interface DistributionConfig extends Config, LogConfig {
   /** The maximum value of "asyncDistributionTimeout" is <code>60000</code>. */
   public static final int MAX_ASYNC_DISTRIBUTION_TIMEOUT = 60000;
 
+  /** The name of the "asyncDistributionTimeout" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_ASYNC_DISTRIBUTION_TIMEOUT, max=MAX_ASYNC_DISTRIBUTION_TIMEOUT)
+  public static final String ASYNC_DISTRIBUTION_TIMEOUT_NAME = "async-distribution-timeout";
   /**
    * Returns the value of the <a
    * href="../DistributedSystem.html#async-queue-timeout">
    * "async-queue-timeout"</a> property.
    */
+  @ConfigAttributeGetter(name=ASYNC_QUEUE_TIMEOUT_NAME)
   public int getAsyncQueueTimeout();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#async-queue-timeout">
    * "async-queue-timeout"</a> property.
    */
+  @ConfigAttributeSetter(name=ASYNC_QUEUE_TIMEOUT_NAME)
   public void setAsyncQueueTimeout(int newValue);
-  /**
-   * Returns true if the value of the asyncQueueTimeout attribute can
-   * currently be modified. Some attributes can not be modified while the
-   * system is running.
-   */
-  public boolean isAsyncQueueTimeoutModifiable();
 
-  /** The name of the "asyncQueueTimeout" property */
-  public static final String ASYNC_QUEUE_TIMEOUT_NAME = "async-queue-timeout";
   /** The default value of "asyncQueueTimeout" is <code>60000</code>. */
   public static final int DEFAULT_ASYNC_QUEUE_TIMEOUT = 60000;
   /** The minimum value of "asyncQueueTimeout" is <code>0</code>. */
   public static final int MIN_ASYNC_QUEUE_TIMEOUT = 0;
   /** The maximum value of "asyncQueueTimeout" is <code>86400000</code>. */
   public static final int MAX_ASYNC_QUEUE_TIMEOUT = 86400000;
-
+  /** The name of the "asyncQueueTimeout" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_ASYNC_QUEUE_TIMEOUT, max=MAX_ASYNC_QUEUE_TIMEOUT)
+  public static final String ASYNC_QUEUE_TIMEOUT_NAME = "async-queue-timeout";
   /**
    * Returns the value of the <a
    * href="../DistributedSystem.html#async-max-queue-size">
    * "async-max-queue-size"</a> property.
    */
+  @ConfigAttributeGetter(name=ASYNC_MAX_QUEUE_SIZE_NAME)
   public int getAsyncMaxQueueSize();
   /**
    * Sets the value of the <a
    * href="../DistributedSystem.html#async-max-queue-size">
    * "async-max-queue-size"</a> property.
    */
+  @ConfigAttributeSetter(name=ASYNC_MAX_QUEUE_SIZE_NAME)
   public void setAsyncMaxQueueSize(int newValue);
-  /**
-   * Returns true if the value of the asyncMaxQueueSize attribute can
-   * currently be modified. Some attributes can not be modified while the
-   * system is running.
-   */
-  public boolean isAsyncMaxQueueSizeModifiable();
 
-  /** The name of the "asyncMaxQueueSize" property */
-  public static final String ASYNC_MAX_QUEUE_SIZE_NAME = "async-max-queue-size";
   /** The default value of "asyncMaxQueueSize" is <code>8</code>. */
   public static final int DEFAULT_ASYNC_MAX_QUEUE_SIZE = 8;
   /** The minimum value of "asyncMaxQueueSize" is <code>0</code>. */
@@ -1871,7 +1838,11 @@ public interface DistributionConfig extends Config, LogConfig {
   /** The maximum value of "asyncMaxQueueSize" is <code>1024</code>. */
   public static final int MAX_ASYNC_MAX_QUEUE_SIZE = 1024;
 
+  /** The name of the "asyncMaxQueueSize" property */
+  @ConfigAttribute(type=Integer.class, min=MIN_ASYNC_MAX_QUEUE_SIZE, max=MAX_ASYNC_MAX_QUEUE_SIZE)
+  public static final String ASYNC_MAX_QUEUE_SIZE_NAME = "async-max-queue-size";
   /** @since 5.7 */
+  @ConfigAttribute(type=String.class)
   public static final String CLIENT_CONFLATION_PROP_NAME = "conflate-events";
   /** @since 5.7 */
   public static final String CLIENT_CONFLATION_PROP_VALUE_DEFAULT = "server";
@@ -1882,11 +1853,14 @@ public interface DistributionConfig extends Config, LogConfig {
   
      
   /** @since 9.0 */
+  @ConfigAttribute(type=Boolean.class)
   public static final String DISTRIBUTED_TRANSACTIONS_NAME = "distributed-transactions";
   public static final boolean DEFAULT_DISTRIBUTED_TRANSACTIONS = false;
 
+  @ConfigAttributeGetter(name=DISTRIBUTED_TRANSACTIONS_NAME)
   public boolean getDistributedTransactions();
 
+  @ConfigAttributeSetter(name=DISTRIBUTED_TRANSACTIONS_NAME)
   public void setDistributedTransactions(boolean value);
   
   /**
@@ -1895,6 +1869,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    * @since 5.7
    */
+  @ConfigAttributeGetter(name=CLIENT_CONFLATION_PROP_NAME)
   public String getClientConflation();
   /**
    * Sets the value of the <a
@@ -1902,15 +1877,15 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    * @since 5.7
    */
+  @ConfigAttributeSetter(name=CLIENT_CONFLATION_PROP_NAME)
   public void setClientConflation(String clientConflation);
-  /** @since 5.7 */
-  public boolean isClientConflationModifiable();
   // -------------------------------------------------------------------------
   /**
    * Returns the value of the <a
    * href="../DistributedSystem.html#durable-client-id">"durable-client-id"</a>
    * property.
    */
+  @ConfigAttributeGetter(name=DURABLE_CLIENT_ID_NAME)
   public String getDurableClientId();
 
   /**
@@ -1918,16 +1893,11 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#durable-client-id">"durable-client-id"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=DURABLE_CLIENT_ID_NAME)
   public void setDurableClientId(String durableClientId);
 
-  /**
-   * Returns true if the value of the durableClientId attribute can currently
-   * be modified. Some attributes can not be modified while the system is
-   * running.
-   */
-  public boolean isDurableClientIdModifiable();
-
   /** The name of the "durableClientId" property */
+  @ConfigAttribute(type=String.class)
   public static final String DURABLE_CLIENT_ID_NAME = "durable-client-id";
 
   /**
@@ -1941,6 +1911,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#durable-client-timeout">"durable-client-timeout"</a>
    * property.
    */
+  @ConfigAttributeGetter(name=DURABLE_CLIENT_TIMEOUT_NAME)
   public int getDurableClientTimeout();
 
   /**
@@ -1948,16 +1919,11 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#durable-client-timeout">"durable-client-timeout"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=DURABLE_CLIENT_TIMEOUT_NAME)
   public void setDurableClientTimeout(int durableClientTimeout);
 
-  /**
-   * Returns true if the value of the durableClientTimeout attribute can
-   * currently be modified. Some attributes can not be modified while the
-   * system is running.
-   */
-  public boolean isDurableClientTimeoutModifiable();
-
   /** The name of the "durableClientTimeout" property */
+  @ConfigAttribute(type=Integer.class)
   public static final String DURABLE_CLIENT_TIMEOUT_NAME = "durable-client-timeout";
 
   /**
@@ -1970,6 +1936,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * Returns user module name for client authentication initializer in <a
    * href="../DistributedSystem.html#security-client-auth-init">"security-client-auth-init"</a>
    */
+  @ConfigAttributeGetter(name=SECURITY_CLIENT_AUTH_INIT_NAME)
   public String getSecurityClientAuthInit();
 
   /**
@@ -1977,16 +1944,11 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#security-client-auth-init">"security-client-auth-init"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=SECURITY_CLIENT_AUTH_INIT_NAME)
   public void setSecurityClientAuthInit(String attValue);
 
-  /**
-   * Returns true if the value of the authentication initializer method name can
-   * currently be modified. Some attributes can not be modified while the
-   * system is running.
-   */
-  public boolean isSecurityClientAuthInitModifiable();
-
   /** The name of user defined method name for "security-client-auth-init" property*/
+  @ConfigAttribute(type=String.class)
   public static final String SECURITY_CLIENT_AUTH_INIT_NAME = "security-client-auth-init";
 
   /**
@@ -1999,6 +1961,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * Returns user module name authenticating client credentials in <a
    * href="../DistributedSystem.html#security-client-authenticator">"security-client-authenticator"</a>
    */
+  @ConfigAttributeGetter(name=SECURITY_CLIENT_AUTHENTICATOR_NAME)
   public String getSecurityClientAuthenticator();
 
   /**
@@ -2006,16 +1969,11 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#security-client-authenticator">"security-client-authenticator"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=SECURITY_CLIENT_AUTHENTICATOR_NAME)
   public void setSecurityClientAuthenticator(String attValue);
 
-  /**
-   * Returns true if the value of the authenticating method name can
-   * currently be modified. Some attributes can not be modified while the
-   * system is running.
-   */
-  public boolean isSecurityClientAuthenticatorModifiable();
-
   /** The name of factory method for "security-client-authenticator" property */
+  @ConfigAttribute(type=String.class)
   public static final String SECURITY_CLIENT_AUTHENTICATOR_NAME = "security-client-authenticator";
 
   /**
@@ -2028,6 +1986,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * Returns name of algorithm to use for Diffie-Hellman key exchange <a
    * href="../DistributedSystem.html#security-client-dhalgo">"security-client-dhalgo"</a>
    */
+  @ConfigAttributeGetter(name=SECURITY_CLIENT_DHALGO_NAME)
   public String getSecurityClientDHAlgo();
 
   /**
@@ -2035,18 +1994,14 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#security-client-dhalgo">"security-client-dhalgo"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=SECURITY_CLIENT_DHALGO_NAME)
   public void setSecurityClientDHAlgo(String attValue);
 
   /**
-   * Returns true if the value of the Diffie-Hellman algorithm can currently be
-   * modified. Some attributes can not be modified while the system is running.
-   */
-  public boolean isSecurityClientDHAlgoModifiable();
-
-  /**
    * The name of the Diffie-Hellman symmetric algorithm "security-client-dhalgo"
    * property.
    */
+  @ConfigAttribute(type=String.class)
   public static final String SECURITY_CLIENT_DHALGO_NAME = "security-client-dhalgo";
 
   /**
@@ -2061,6 +2016,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * Returns user defined method name for peer authentication initializer in <a
    * href="../DistributedSystem.html#security-peer-auth-init">"security-peer-auth-init"</a>
    */
+  @ConfigAttributeGetter(name=SECURITY_PEER_AUTH_INIT_NAME)
   public String getSecurityPeerAuthInit();
 
   /**
@@ -2068,16 +2024,11 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#security-peer-auth-init">"security-peer-auth-init"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=SECURITY_PEER_AUTH_INIT_NAME)
   public void setSecurityPeerAuthInit(String attValue);
 
-  /**
-   * Returns true if the value of the AuthInit method name can
-   * currently be modified. Some attributes can not be modified while the
-   * system is running.
-   */
-  public boolean isSecurityPeerAuthInitModifiable();
-
   /** The name of user module for "security-peer-auth-init" property*/
+  @ConfigAttribute(type=String.class)
   public static final String SECURITY_PEER_AUTH_INIT_NAME = "security-peer-auth-init";
 
   /**
@@ -2090,6 +2041,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * Returns user defined method name authenticating peer's credentials in <a
    * href="../DistributedSystem.html#security-peer-authenticator">"security-peer-authenticator"</a>
    */
+  @ConfigAttributeGetter(name=SECURITY_PEER_AUTHENTICATOR_NAME)
   public String getSecurityPeerAuthenticator();
 
   /**
@@ -2097,16 +2049,11 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#security-peer-authenticator">"security-peer-authenticator"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=SECURITY_PEER_AUTHENTICATOR_NAME)
   public void setSecurityPeerAuthenticator(String attValue);
 
-  /**
-   * Returns true if the value of the security module name can
-   * currently be modified. Some attributes can not be modified while the
-   * system is running.
-   */
-  public boolean isSecurityPeerAuthenticatorModifiable();
-
   /** The name of user defined method for "security-peer-authenticator" property*/
+  @ConfigAttribute(type=String.class)
   public static final String SECURITY_PEER_AUTHENTICATOR_NAME = "security-peer-authenticator";
 
   /**
@@ -2119,6 +2066,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * Returns user module name authorizing client credentials in <a
    * href="../DistributedSystem.html#security-client-accessor">"security-client-accessor"</a>
    */
+  @ConfigAttributeGetter(name=SECURITY_CLIENT_ACCESSOR_NAME)
   public String getSecurityClientAccessor();
 
   /**
@@ -2126,9 +2074,11 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#security-client-accessor">"security-client-accessor"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=SECURITY_CLIENT_ACCESSOR_NAME)
   public void setSecurityClientAccessor(String attValue);
 
   /** The name of the factory method for "security-client-accessor" property */
+  @ConfigAttribute(type=String.class)
   public static final String SECURITY_CLIENT_ACCESSOR_NAME = "security-client-accessor";
 
   /**
@@ -2141,6 +2091,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * Returns user module name authorizing client credentials in <a
    * href="../DistributedSystem.html#security-client-accessor-pp">"security-client-accessor-pp"</a>
    */
+  @ConfigAttributeGetter(name=SECURITY_CLIENT_ACCESSOR_PP_NAME)
   public String getSecurityClientAccessorPP();
 
   /**
@@ -2148,9 +2099,11 @@ public interface DistributionConfig extends Config, LogConfig {
    * href="../DistributedSystem.html#security-client-accessor-pp">"security-client-accessor-pp"</a>
    * property.
    */
+  @ConfigAttributeSetter(name=SECURITY_CLIENT_ACCESSOR_PP_NAME)
   public void setSecurityClientAccessorPP(String attValue);
 
   /** The name of the factory method for "security-client-accessor-pp" property */
+  @ConfigAttribute(type=String.class)
   public static final String SECURITY_CLIENT_ACCESSOR_PP_NAME = "security-client-accessor-pp";
 
   /**
@@ -2164,6 +2117,7 @@ public interface DistributionConfig extends Config, LogConfig {
    *
    * @return the current security log-level
    */
+  @ConfigAttributeGetter(name=SECURITY_LOG_LEVEL_NAME)
   public int getSecurityLogLevel();
 
   /**
@@ -2172,19 +2126,16 @@ public interface DistributionConfig extends Config, LogConfig {
    * @param level
    *                the new security log-level
    */
+  @ConfigAttributeSetter(name=SECURITY_LOG_LEVEL_NAME)
   public void setSecurityLogLevel(int level);
 
   /**
-   * Returns true if the value of the logLevel attribute can currently be
-   * modified. Some attributes can not be modified while the system is running.
-   */
-  public boolean isSecurityLogLevelModifiable();
-
-  /**
    * The name of "security-log-level" property that sets the log-level for
    * security logger obtained using
    * {@link DistributedSystem#getSecurityLogWriter()}
    */
+  // type is String because the config file "config", "debug", "fine" etc, but the setter getter accepts int
+  @ConfigAttribute(type=String.class)
   public static final String SECURITY_LOG_LEVEL_NAME = "security-log-level";
 
   /**
@@ -2192,6 +2143,7 @@ public interface DistributionConfig extends Config, LogConfig {
    *
    * @return <code>null</code> if logging information goes to standard out
    */
+  @ConfigAttributeGetter(name=SECURITY_LOG_FILE_NAME)
   public File getSecurityLogFile();
 
   /**
@@ -2209,19 +2161,14 @@ public interface DistributionConfig extends Config, LogConfig {
    *                 if the set failure is caused by an error when writing to
    *                 the system's configuration file.
    */
+  @ConfigAttributeSetter(name=SECURITY_LOG_FILE_NAME)
   public void setSecurityLogFile(File value);
 
   /**
-   * Returns true if the value of the <code>security-log-file</code> attribute
-   * can currently be modified. Some attributes can not be modified while the
-   * system is running.
-   */
-  public boolean isSecurityLogFileModifiable();
-
-  /**
    * The name of the "security-log-file" property. This property is the path of
    * the file where security related messages are logged.
    */
+  @ConfigAttribute(type=File.class)
   public static final String SECURITY_LOG_FILE_NAME = "security-log-file";
 
   /**
@@ -2238,6 +2185,7 @@ public interface DistributionConfig extends Config, LogConfig {
    *
    * @return Timeout in milliseconds.
    */
+  @ConfigAttributeGetter(name=SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME)
   public int getSecurityPeerMembershipTimeout();
 
   /**
@@ -2245,17 +2193,9 @@ public interface DistributionConfig extends Config, LogConfig {
    * than peer handshake timeout.
    * @param attValue
    */
+  @ConfigAttributeSetter(name=SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME)
   public void setSecurityPeerMembershipTimeout(int attValue);
 
-  /**
-   * Returns true if the value of the peer membership timeout attribute can currently be modified.
-   * Some attributes can not be modified while the system is running.
-   * @return true if timeout is modifiable.
-   */
-  public boolean isSecurityPeerMembershipTimeoutModifiable();
-
-  /** The name of the peer membership check timeout property */
-  public static final String SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME = "security-peer-verifymember-timeout";
 
   /**
    * The default peer membership check timeout is 1 second.
@@ -2268,6 +2208,9 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   public static final int MAX_SECURITY_PEER_VERIFYMEMBER_TIMEOUT = 60000;
 
+  /** The name of the peer membership check timeout property */
+  @ConfigAttribute(type=Integer.class, min=0, max=MAX_SECURITY_PEER_VERIFYMEMBER_TIMEOUT)
+  public static final String SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME = "security-peer-verifymember-timeout";
   /**
    * Returns all properties starting with <a
    * href="../DistributedSystem.html#security-">"security-"</a>.
@@ -2288,13 +2231,6 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   public void setSecurity(String attName, String attValue);
 
-  /**
-   * Returns true if the value of the security attributes can
-   * currently be modified. Some attributes can not be modified while the
-   * system is running.
-   */
-  public boolean isSecurityModifiable();
-
   /** For the "security-" prefixed properties */
   public static final String SECURITY_PREFIX_NAME = "security-";
 
@@ -2322,6 +2258,7 @@ public interface DistributionConfig extends Config, LogConfig {
    /**
     * The property decides whether to remove unresponsive client from the server.
     */
+   @ConfigAttribute(type=Boolean.class)
    public static final String REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME = "remove-unresponsive-client";
 
    /**
@@ -2334,6 +2271,7 @@ public interface DistributionConfig extends Config, LogConfig {
     * property.
     * @since 6.0
     */
+   @ConfigAttributeGetter(name=REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME)
    public boolean getRemoveUnresponsiveClient();
    /**
     * Sets the value of the <a
@@ -2341,11 +2279,11 @@ public interface DistributionConfig extends Config, LogConfig {
     * property.
     * @since 6.0
     */
+   @ConfigAttributeSetter(name=REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME)
    public void setRemoveUnresponsiveClient(boolean value);
-   /** @since 6.0 */
-   public boolean isRemoveUnresponsiveClientModifiable();
 
    /** @since 6.3 */
+   @ConfigAttribute(type=Boolean.class)
    public static final String DELTA_PROPAGATION_PROP_NAME = "delta-propagation";
 
    public static final boolean DEFAULT_DELTA_PROPAGATION = true;
@@ -2355,6 +2293,7 @@ public interface DistributionConfig extends Config, LogConfig {
     * property.
     * @since 6.3
     */
+   @ConfigAttributeGetter(name=DELTA_PROPAGATION_PROP_NAME)
    public boolean getDeltaPropagation();
 
    /**
@@ -2363,32 +2302,38 @@ public interface DistributionConfig extends Config, LogConfig {
     * property.
     * @since 6.3
     */
+   @ConfigAttributeSetter(name=DELTA_PROPAGATION_PROP_NAME)
    public void setDeltaPropagation(boolean value);
 
-   /** @since 6.3 */
-   public boolean isDeltaPropagationModifiable();
-   
+  public static final int MIN_DISTRIBUTED_SYSTEM_ID = -1;
+  public static final int MAX_DISTRIBUTED_SYSTEM_ID = 255;
    /**
     * @since 6.6
     */
+   @ConfigAttribute(type=Integer.class)
    public static final String DISTRIBUTED_SYSTEM_ID_NAME = "distributed-system-id";
    public static final int DEFAULT_DISTRIBUTED_SYSTEM_ID = -1;
 
+  @ConfigAttribute(type=String.class)
    public static final String REDUNDANCY_ZONE_NAME = "redundancy-zone";
-   public static final String DEFAULT_REDUNDANCY_ZONE = null;
+   public static final String DEFAULT_REDUNDANCY_ZONE = "";
    
    /**
     * @since 6.6
     */
+   @ConfigAttributeSetter(name=DISTRIBUTED_SYSTEM_ID_NAME)
    public void setDistributedSystemId(int distributedSystemId);
 
+  @ConfigAttributeSetter(name=REDUNDANCY_ZONE_NAME)
    public void setRedundancyZone(String redundancyZone);
    
    /**
     * @since 6.6
     */
+   @ConfigAttributeGetter(name=DISTRIBUTED_SYSTEM_ID_NAME)
    public int getDistributedSystemId();
-   
+
+  @ConfigAttributeGetter(name=REDUNDANCY_ZONE_NAME)
    public String getRedundancyZone();
    
    /**
@@ -2410,14 +2355,17 @@ public interface DistributionConfig extends Config, LogConfig {
    /**
     * @since 6.6
     */
+   @ConfigAttribute(type=Boolean.class)
    public static final String ENFORCE_UNIQUE_HOST_NAME = "enforce-unique-host";
    /** Using the system property to set the default here to retain backwards compatibility
     * with customers that are already using this system property.
     */
    public static boolean DEFAULT_ENFORCE_UNIQUE_HOST = Boolean.getBoolean("gemfire.EnforceUniqueHostStorageAllocation");
-   
+
+  @ConfigAttributeSetter(name=ENFORCE_UNIQUE_HOST_NAME)
    public void setEnforceUniqueHost(boolean enforceUniqueHost);
-   
+
+  @ConfigAttributeGetter(name=ENFORCE_UNIQUE_HOST_NAME)
    public boolean getEnforceUniqueHost();
 
    public Properties getUserDefinedProps();
@@ -2430,6 +2378,7 @@ public interface DistributionConfig extends Config, LogConfig {
     * @return the value of the property
     * @since 7.0
     */
+   @ConfigAttributeGetter(name=GROUPS_NAME)
    public String getGroups();
    /**
     * Sets the groups gemfire property.
@@ -2440,17 +2389,13 @@ public interface DistributionConfig extends Config, LogConfig {
     *   when writing to the system's configuration file.
     * @since 7.0
     */
+   @ConfigAttributeSetter(name=GROUPS_NAME)
    public void setGroups(String value);
-   /**
-    * Returns true if the value of the <code>groups</code> attribute can currently
-    * be modified.
-    * Some attributes can not be modified while the system is running.
-    * @since 7.0
-    */
-   public boolean isGroupsModifiable();
+
    /** The name of the "groups" property 
     * @since 7.0
     */
+   @ConfigAttribute(type=String.class)
    public static final String GROUPS_NAME = "groups";
    /**
     * The default groups.
@@ -2461,40 +2406,53 @@ public interface DistributionConfig extends Config, LogConfig {
 
    /** Any cl

<TRUNCATED>


[30/33] incubator-geode git commit: GEODE-965: redundant cache server created during auto-reconnect

Posted by ds...@apache.org.
GEODE-965: redundant cache server created during auto-reconnect

If cluster configuration is enabled but a cache.xml is actually being
used to construct the cache then it is possible that after an auto-
reconnect a redundant CacheServer will be created.

There is an assumption made in writing the auto-reconnect code that if
cluster-configuration is enabled the cache will not be constructed
using a cache.xml file.

This change-set marks CacheServers that are created by gfsh or so
called "default" servers created by cache.xml processing so that
auto-reconnect will know whether they should be handled specially.


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

Branch: refs/heads/feature/GEODE-831
Commit: 197555616a479a5dde5c8939bdb52efd751cc901
Parents: d632bfb
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Wed Feb 17 07:54:17 2016 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Wed Feb 17 07:54:17 2016 -0800

----------------------------------------------------------------------
 .../gemfire/distributed/ServerLauncher.java     |  3 ++
 .../internal/InternalDistributedSystem.java     | 53 ++++++++++++++------
 .../gms/mgr/GMSMembershipManager.java           |  9 ++--
 .../gemfire/internal/cache/CacheServerImpl.java | 11 ++++
 .../internal/cache/CacheServerLauncher.java     |  4 +-
 .../internal/cache/GemFireCacheImpl.java        |  0
 .../cache/tier/sockets/CacheServerHelper.java   | 46 +++++++++--------
 .../internal/cache/xmlcache/CacheCreation.java  |  9 +++-
 .../ReconnectedCacheServerDUnitTest.java        | 27 ++++++++++
 9 files changed, 121 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19755561/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
old mode 100644
new mode 100755
index c991cc1..4a2ce52
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
@@ -53,6 +53,7 @@ import com.gemstone.gemfire.internal.cache.CacheConfig;
 import com.gemstone.gemfire.internal.cache.CacheServerLauncher;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerHelper;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.lang.ObjectUtils;
 import com.gemstone.gemfire.internal.lang.StringUtils;
@@ -948,6 +949,8 @@ public final class ServerLauncher extends AbstractLauncher<String> {
       if (getHostNameForClients() != null) {
         cacheServer.setHostnameForClients(getHostNameForClients());
       }
+      
+      CacheServerHelper.setIsDefaultServer(cacheServer);
 
       cacheServer.start();
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19755561/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
index 276efec..a193699 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
@@ -56,6 +56,7 @@ import com.gemstone.gemfire.admin.AlertLevel;
 import com.gemstone.gemfire.cache.CacheClosedException;
 import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.cache.execute.internal.FunctionServiceManager;
+import com.gemstone.gemfire.cache.server.CacheServer;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
@@ -2813,21 +2814,9 @@ public class InternalDistributedSystem
               config.setCacheXMLDescription(cacheXML);
             }
             cache = GemFireCacheImpl.create(this.reconnectDS, config);
-            if (cacheServerCreation != null) {
-              for (CacheServerCreation bridge: cacheServerCreation) {
-                CacheServerImpl impl = (CacheServerImpl)cache.addCacheServer();
-                impl.configureFrom(bridge);
-                try {
-                  if (!impl.isRunning()) {
-                    impl.start();
-                  }
-                } catch (IOException ex) {
-                  throw new GemFireIOException(
-                      LocalizedStrings.CacheCreation_WHILE_STARTING_CACHE_SERVER_0
-                          .toLocalizedString(impl), ex);
-                }
-              }
-            }
+            
+            createAndStartCacheServers(cacheServerCreation, cache);
+
             if (cache.getCachePerfStats().getReliableRegionsMissing() == 0){
               reconnectAttemptCounter = 0;
               logger.info("Reconnected properly");
@@ -2851,6 +2840,40 @@ public class InternalDistributedSystem
     }
   }
 
+
+  /**
+   * after an auto-reconnect we may need to recreate a cache server
+   * and start it
+   */
+  public void createAndStartCacheServers(
+      List<CacheServerCreation> cacheServerCreation, GemFireCacheImpl cache) {
+
+    List<CacheServer> servers = cache.getCacheServers();
+    
+    // if there used to be a cache server but now there isn't one we need
+    // to recreate it.
+    if (servers.isEmpty() && cacheServerCreation != null) {
+      for (CacheServerCreation bridge: cacheServerCreation) {
+        CacheServerImpl impl = (CacheServerImpl)cache.addCacheServer();
+        impl.configureFrom(bridge);
+      }
+    }
+    
+    servers = cache.getCacheServers();
+    for (CacheServer server: servers) {
+      try {
+        if (!server.isRunning()) {
+          server.start();
+        }
+      } catch (IOException ex) {
+        throw new GemFireIOException(
+            LocalizedStrings.CacheCreation_WHILE_STARTING_CACHE_SERVER_0
+                .toLocalizedString(server), ex);
+      }
+    }
+    
+  }
+
   /**
    * Validates that the configuration provided is the same as the configuration for this
    * InternalDistributedSystem

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19755561/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
index d75b28d..edfee10 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
@@ -84,6 +84,7 @@ import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.internal.SystemTimer;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheServerCreation;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
@@ -1615,9 +1616,11 @@ public class GMSMembershipManager implements MembershipManager, Manager
         // we need to retain a cache-server description if this JVM was started by gfsh
         List<CacheServerCreation> list = new ArrayList<CacheServerCreation>(cache.getCacheServers().size());
         for (Iterator it = cache.getCacheServers().iterator(); it.hasNext(); ) {
-          CacheServer cs = (CacheServer)it.next();
-          CacheServerCreation bsc = new CacheServerCreation(cache, cs);
-          list.add(bsc);
+          CacheServerImpl cs = (CacheServerImpl)it.next();
+          if (cs.isDefaultServer()) {
+            CacheServerCreation bsc = new CacheServerCreation(cache, cs);
+            list.add(bsc);
+          }
         }
         cache.getCacheConfig().setCacheServerCreation(list);
         logger.info("CacheServer configuration saved");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19755561/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java
index cd4f3e4..000120b 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java
@@ -114,6 +114,9 @@ public class CacheServerImpl
   
   private List<GatewayTransportFilter> gatewayTransportFilters = Collections.EMPTY_LIST;
   
+  /** is this a server created by a launcher as opposed to by an application or XML? */
+  private boolean isDefaultServer;
+  
   /**
    * Needed because this guy is an advisee
    * @since 5.7
@@ -261,6 +264,14 @@ public class CacheServerImpl
     return this.clientSubscriptionConfig;
   }
 
+  public boolean isDefaultServer() {
+    return isDefaultServer;
+  }
+
+  public void setIsDefaultServer() {
+    this.isDefaultServer = true;
+  }
+
   /**
    * Sets the configuration of <b>this</b> <code>CacheServer</code> based on
    * the configuration of <b>another</b> <code>CacheServer</code>.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19755561/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
index ac198e9..c5de84b 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
@@ -48,8 +48,8 @@ import com.gemstone.gemfire.i18n.LogWriterI18n;
 import com.gemstone.gemfire.internal.OSProcess;
 import com.gemstone.gemfire.internal.PureJavaMode;
 import com.gemstone.gemfire.internal.SocketCreator;
+import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerHelper;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.logging.PureLogWriter;
 import com.gemstone.gemfire.internal.process.StartupStatus;
 import com.gemstone.gemfire.internal.process.StartupStatusListener;
 import com.gemstone.gemfire.internal.util.IOUtils;
@@ -876,6 +876,8 @@ public class CacheServerLauncher  {
     if ((disable == null || !disable) && cache.getCacheServers().size() == 0) {
       // Create and add a cache server
       CacheServer server = cache.addCacheServer();
+      
+      CacheServerHelper.setIsDefaultServer(server);
 
       // Set its port if necessary
       Integer serverPort = CacheServerLauncher.getServerPort();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19755561/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19755561/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerHelper.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerHelper.java
index b120b57..b0b0be1 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerHelper.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerHelper.java
@@ -17,8 +17,10 @@
 
 package com.gemstone.gemfire.internal.cache.tier.sockets;
 
+import com.gemstone.gemfire.cache.server.CacheServer;
 import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.util.BlobHelper;
 
@@ -40,41 +42,48 @@ import java.util.zip.GZIPOutputStream;
  * @author Barry Oglesby
  * @since 3.5
  */
-public class CacheServerHelper
-  {
-  public static byte[] serialize(Object obj) throws IOException
-  {
+public class CacheServerHelper {
+  
+  public static void setIsDefaultServer(CacheServer server) {
+    if (server instanceof CacheServerImpl) {
+      ((CacheServerImpl)server).setIsDefaultServer();
+    }
+  }
+  
+  public static boolean isDefaultServer(CacheServer server) {
+    if ( !(server instanceof CacheServerImpl) ) {
+      return false;
+    }
+    return ((CacheServerImpl)server).isDefaultServer();
+  }
+  
+  public static byte[] serialize(Object obj) throws IOException {
     return serialize(obj, false);
   }
 
-  public static byte[] serialize(Object obj, boolean zipObject) throws IOException
-  {
+  public static byte[] serialize(Object obj, boolean zipObject) throws IOException {
     return zipObject
       ? zip(obj)
       : BlobHelper.serializeToBlob(obj);
   }
 
-  public static Object deserialize(byte[] blob) throws IOException, ClassNotFoundException
-  {
+  public static Object deserialize(byte[] blob) throws IOException, ClassNotFoundException {
     return deserialize(blob, false);
   }
 
-  public static Object deserialize(byte[] blob, boolean unzipObject) throws IOException, ClassNotFoundException
-  {
+  public static Object deserialize(byte[] blob, boolean unzipObject) throws IOException, ClassNotFoundException {
     return unzipObject
       ? unzip(blob)
       : BlobHelper.deserializeBlob(blob);
   }
 
-  public static Object deserialize(byte[] blob, Version version, boolean unzipObject) throws IOException, ClassNotFoundException
-  {
+  public static Object deserialize(byte[] blob, Version version, boolean unzipObject) throws IOException, ClassNotFoundException {
     return unzipObject
       ? unzip(blob)
       : BlobHelper.deserializeBlob(blob, version, null);
   }
   
-  public static byte[] zip(Object obj) throws IOException
-  {
+  public static byte[] zip(Object obj) throws IOException {
 //logger.info("CacheServerHelper: Zipping object to blob: " + obj);
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     GZIPOutputStream gz = new GZIPOutputStream(baos);
@@ -87,8 +96,7 @@ public class CacheServerHelper
     return blob;
   }
 
-  public static Object unzip(byte[] blob) throws IOException, ClassNotFoundException
-  {
+  public static Object unzip(byte[] blob) throws IOException, ClassNotFoundException {
 //logger.info("CacheServerHelper: Unzipping blob to object: " + blob);
     ByteArrayInputStream bais = new ByteArrayInputStream(blob);
     GZIPInputStream gs = new GZIPInputStream(bais);
@@ -107,8 +115,7 @@ public class CacheServerHelper
    * @param s
    * @return byte[]
    */
-  public static byte[] toUTF(String s)
-  {
+  public static byte[] toUTF(String s) {
     HeapDataOutputStream hdos = new HeapDataOutputStream(s);
     return hdos.toByteArray();
   }
@@ -118,8 +125,7 @@ public class CacheServerHelper
    * @param bytearr
    * @return String 
    */
-  public static String fromUTF(byte[] bytearr)
-  {
+  public static String fromUTF(byte[] bytearr) {
     int utflen = bytearr.length;
     int c, char2, char3;
     int count = 0;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19755561/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
old mode 100644
new mode 100755
index f7063bc..9456f9a
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
@@ -588,7 +588,8 @@ public class CacheCreation implements InternalCache {
    * Also adds a default server to the param declarativeCacheServers if a serverPort is specified.
    */
   protected void startCacheServers(List declarativeCacheServers, Cache cache, Integer serverPort, String serverBindAdd, Boolean disableDefaultServer) {
-
+    CacheServerCreation defaultServer = null;
+    
     if (declarativeCacheServers.size() > 1
         && (serverPort != null || serverBindAdd != null)) {
       throw new RuntimeException(
@@ -611,7 +612,8 @@ public class CacheCreation implements InternalCache {
       }
       
       if (!existingCacheServer) {
-        declarativeCacheServers.add(new CacheServerCreation((GemFireCacheImpl)cache, false));
+        defaultServer = new CacheServerCreation((GemFireCacheImpl)cache, false);
+        declarativeCacheServers.add(defaultServer);
       }
     }
     
@@ -634,6 +636,9 @@ public class CacheCreation implements InternalCache {
 
       CacheServerImpl impl = (CacheServerImpl)cache.addCacheServer();
       impl.configureFrom(declaredCacheServer);
+      if (declaredCacheServer == defaultServer) {
+        impl.setIsDefaultServer();
+      }
 
       if (serverPort != null && serverPort != CacheServer.DEFAULT_PORT) {
         impl.setPort(serverPort);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19755561/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectedCacheServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectedCacheServerDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectedCacheServerDUnitTest.java
index 2b97a9a..6daf213 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectedCacheServerDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectedCacheServerDUnitTest.java
@@ -16,8 +16,10 @@
  */
 package com.gemstone.gemfire.cache30;
 
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
 import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
+import com.gemstone.gemfire.internal.cache.CacheServerLauncher;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 
 
@@ -65,4 +67,29 @@ public class ReconnectedCacheServerDUnitTest extends CacheTestCase {
     assertNotNull(gc.getCacheConfig().getCacheServerCreation());
   }
 
+  public void testDefaultCacheServerNotCreatedOnReconnect() {
+    
+    assertFalse(Boolean.getBoolean("gemfire.autoReconnect-useCacheXMLFile"));
+    
+    GemFireCacheImpl gc = (GemFireCacheImpl)cache;
+
+    // fool the system into thinking cluster-config is being used
+    GMSMembershipManager mgr = (GMSMembershipManager)MembershipManagerHelper
+        .getMembershipManager(gc.getDistributedSystem());
+    final boolean sharedConfigEnabled = true;
+    mgr.saveCacheXmlForReconnect(sharedConfigEnabled);
+
+    // the cache server config should now be stored in the cache's config
+    assertFalse(gc.getCacheServers().isEmpty());
+    int numServers = gc.getCacheServers().size();
+
+    assertNotNull(gc.getCacheConfig().getCacheServerCreation());
+
+    InternalDistributedSystem system = gc.getDistributedSystem();
+    system.createAndStartCacheServers(gc.getCacheConfig().getCacheServerCreation(), gc);
+
+    assertEquals("found these cache servers:" + gc.getCacheServers(),
+        numServers, gc.getCacheServers().size());
+      
+  }
 }


[23/33] incubator-geode git commit: GEODE-901: Remove invalid source headers

Posted by ds...@apache.org.
GEODE-901: Remove invalid source headers

* removed invalid header from ResultsBagJUnitTest and QueryFromClauseCanonicalizationJUnitTest


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

Branch: refs/heads/feature/GEODE-831
Commit: 48eafe3675a277ea25d27fdc0a1b407b4ba2835f
Parents: bef0c1b
Author: Sai Boorlagadda <sb...@pivotal.io>
Authored: Tue Feb 16 11:03:12 2016 -0800
Committer: Sai Boorlagadda <sb...@pivotal.io>
Committed: Tue Feb 16 11:03:12 2016 -0800

----------------------------------------------------------------------
 .../internal/QueryFromClauseCanonicalizationJUnitTest.java    | 7 -------
 .../gemfire/cache/query/internal/ResultsBagJUnitTest.java     | 7 -------
 2 files changed, 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48eafe36/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryFromClauseCanonicalizationJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryFromClauseCanonicalizationJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryFromClauseCanonicalizationJUnitTest.java
index 0f13a31..f62fb8a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryFromClauseCanonicalizationJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryFromClauseCanonicalizationJUnitTest.java
@@ -48,13 +48,6 @@ import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 @Category(IntegrationTest.class)
 public class QueryFromClauseCanonicalizationJUnitTest
 {
-
-  /*
-   * ========================================================================
-   * Copyright (C) GemStone Systems, Inc. 2000-2004. All Rights Reserved.
-   * 
-   * ========================================================================
-   */
   Region region = null;
 
   QueryService qs = null;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48eafe36/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagJUnitTest.java
index e910e73..9758e04 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagJUnitTest.java
@@ -14,13 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-//
-//  ResultsBagJUnitTest.java
-//  gemfire
-//
-//  Created by Eric Zoerner on 2/13/08.
-//  Copyright 2008 __MyCompanyName__. All rights reserved.
-//
 package com.gemstone.gemfire.cache.query.internal;
 
 import java.util.*;


[27/33] incubator-geode git commit: Fix for GEODE-106 Invalidate operation fails with IndexMaintenanceException with underlying java.lang.ArrayIndexOutOfBoundsException.

Posted by ds...@apache.org.
Fix for GEODE-106 Invalidate operation fails with IndexMaintenanceException with underlying java.lang.ArrayIndexOutOfBoundsException.


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

Branch: refs/heads/feature/GEODE-831
Commit: ef944168056cd7394085c1ef8d7465d75bcdc031
Parents: 06317e7
Author: Anil <ag...@pivotal.io>
Authored: Thu Feb 11 17:10:51 2016 -0800
Committer: Anil <ag...@pivotal.io>
Committed: Tue Feb 16 18:51:34 2016 -0800

----------------------------------------------------------------------
 .../query/internal/index/IndexElemArray.java    | 94 +++++++++++++-------
 1 file changed, 61 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ef944168/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArray.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArray.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArray.java
index b94f975..de694a4 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArray.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArray.java
@@ -33,6 +33,9 @@ public class IndexElemArray implements Iterable, Collection {
   private Object[] elementData;
   private volatile byte size;
 
+  /* lock for making size and data changes atomically. */
+  private Object lock = new Object();
+
   public IndexElemArray(int initialCapacity) {
     if (initialCapacity < 0) {
       throw new IllegalArgumentException("Illegal Capacity: " + initialCapacity);
@@ -111,14 +114,16 @@ public class IndexElemArray implements Iterable, Collection {
    * or -1 if there is no such index.
    */
   public int indexOf(Object o) {
-    if (o == null) {
-      for (int i = 0; i < size; i++)
-        if (elementData[i] == null)
-          return i;
-    } else {
-      for (int i = 0; i < size; i++)
-        if (o.equals(elementData[i]))
-          return i;
+    synchronized (lock) {
+      if (o == null) {
+        for (int i = 0; i < size; i++)
+          if (elementData[i] == null)
+            return i;
+      } else {
+        for (int i = 0; i < size; i++)
+          if (o.equals(elementData[i]))
+            return i;
+      }
     }
     return -1;
   }
@@ -133,8 +138,10 @@ public class IndexElemArray implements Iterable, Collection {
    *          
    */
   public Object get(int index) {
-    RangeCheck(index);
-    return elementData[index];
+    synchronized (lock) {
+      RangeCheck(index);
+      return elementData[index];
+    }
   }
 
   /**
@@ -150,11 +157,13 @@ public class IndexElemArray implements Iterable, Collection {
    *           
    */
   public Object set(int index, Object element) {
-    RangeCheck(index);
+    synchronized (lock) {
+      RangeCheck(index);
 
-    Object oldValue = (Object) elementData[index];
-    elementData[index] = element;
-    return oldValue;
+      Object oldValue = (Object) elementData[index];
+      elementData[index] = element;
+      return oldValue;
+    }
   }
 
   /**
@@ -167,10 +176,12 @@ public class IndexElemArray implements Iterable, Collection {
    * @return <tt>true</tt> (as specified by {@link Collection#add})
    * @throws ArrayIndexOutOfBoundsException
    */
-  public synchronized boolean add(Object e) {
-    ensureCapacity(size + 1);
-    elementData[size] = e;
-    ++size;
+  public boolean add(Object e) {
+    synchronized (lock) {
+      ensureCapacity(size + 1);
+      elementData[size] = e;
+      ++size;
+    }
     return true;
   }
 
@@ -187,7 +198,7 @@ public class IndexElemArray implements Iterable, Collection {
    *          element to be removed from this list, if present
    * @return <tt>true</tt> if this list contained the specified element
    */
-  public synchronized boolean remove(Object o) {
+  public boolean remove(Object o) {
     if (o == null) {
       for (int index = 0; index < size; index++)
         if (elementData[index] == null) {
@@ -215,8 +226,11 @@ public class IndexElemArray implements Iterable, Collection {
     int numMoved = len - index - 1;
     if (numMoved > 0)
       System.arraycopy(elementData, index + 1, newArray, index, numMoved);
-    elementData = newArray;
-    --size;
+
+    synchronized (lock) {
+      elementData = newArray;
+      --size;
+    }
   }
 
   /**
@@ -225,10 +239,12 @@ public class IndexElemArray implements Iterable, Collection {
    */
   public void clear() {
     // Let gc do its work
-    for (int i = 0; i < size; i++) {
-      elementData[i] = null;
+    synchronized (lock) {
+      for (int i = 0; i < size; i++) {
+        elementData[i] = null;
+      }
+      size = 0;
     }
-    size = 0;
   }
 
   /**
@@ -244,12 +260,14 @@ public class IndexElemArray implements Iterable, Collection {
   }
 
   @Override
-  public synchronized boolean addAll(Collection c) {
+  public boolean addAll(Collection c) {
     Object[] a = c.toArray();
     int numNew = a.length;
-    ensureCapacity(size + numNew);
-    System.arraycopy(a, 0, elementData, size, numNew);
-    size += numNew;
+    synchronized (lock) {
+      ensureCapacity(size + numNew);
+      System.arraycopy(a, 0, elementData, size, numNew);
+      size += numNew;
+    }
     return numNew != 0;
   }
 
@@ -266,6 +284,15 @@ public class IndexElemArray implements Iterable, Collection {
   private class IndexArrayListIterator implements Iterator {
     private byte current;
     private Object currentEntry;
+    private Object[] elements;
+    private int len;
+
+    IndexArrayListIterator() {
+      synchronized (lock) {
+        elements = elementData;
+        len = size;
+      }
+    }
     
     /**
      * Checks if the array has next element, stores reference to the current
@@ -275,7 +302,7 @@ public class IndexElemArray implements Iterable, Collection {
      */
     @Override
     public boolean hasNext() {
-      return current < size;
+      return current < len;
     }
 
     /**
@@ -285,11 +312,12 @@ public class IndexElemArray implements Iterable, Collection {
     @Override
     public Object next() {
       try {
-        currentEntry = elementData[current++];
+        currentEntry = elements[current++];
       } catch (IndexOutOfBoundsException e) {
-        // Following exception must never be thrown.
-        //throw new NoSuchElementException();
-        return null;
+        // We should not be coming here as element-data and
+        // size are updated atomically.
+        throw new NoSuchElementException();
+        //return null;
       }
       return currentEntry;
     }


[26/33] incubator-geode git commit: GEODE-945: Importing javax.transaction packages to fix javadoc

Posted by ds...@apache.org.
GEODE-945: Importing javax.transaction packages to fix javadoc

Javadoc was spitting out class not found warnings. It looks like it had
some trouble locating these classes, even though they are on the
classpath. Changing the class to import the packages seems to fix the
javadoc task.


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

Branch: refs/heads/feature/GEODE-831
Commit: 06317e71a42d56510ad304df3a8cc01a0640db1d
Parents: c2175bc
Author: Dan Smith <up...@apache.org>
Authored: Tue Feb 16 17:57:48 2016 -0800
Committer: Dan Smith <up...@apache.org>
Committed: Tue Feb 16 18:02:04 2016 -0800

----------------------------------------------------------------------
 .../gemfire/cache/FailedSynchronizationException.java     | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/06317e71/gemfire-core/src/main/java/com/gemstone/gemfire/cache/FailedSynchronizationException.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/FailedSynchronizationException.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/FailedSynchronizationException.java
index d7fd2fc..4842324 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/FailedSynchronizationException.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/FailedSynchronizationException.java
@@ -17,6 +17,10 @@
 
 package com.gemstone.gemfire.cache;
 
+import javax.transaction.Status;
+import javax.transaction.Transaction;
+import javax.transaction.UserTransaction;
+
 /** Thrown when a cache transaction fails to register with the
  * <code>UserTransaction</code> (aka JTA transaction), most likely the
  * cause of the <code>UserTransaction</code>'s
@@ -25,9 +29,9 @@ package com.gemstone.gemfire.cache;
  *
  * @author Mitch Thomas
  *
- * @see javax.transaction.UserTransaction#setRollbackOnly
- * @see javax.transaction.Transaction#registerSynchronization
- * @see javax.transaction.Status
+ * @see UserTransaction#setRollbackOnly
+ * @see Transaction#registerSynchronization
+ * @see Status
  * @since 4.0
  */
 public class FailedSynchronizationException extends CacheRuntimeException {


[16/33] incubator-geode git commit: GEODE-794: Unable to match iterators when update in progress

Posted by ds...@apache.org.
GEODE-794: Unable to match iterators when update in progress

Adding other types of CompiledValue that could possibly be used to find a runtime iterator


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

Branch: refs/heads/feature/GEODE-831
Commit: 781277f31f37388f7247cbdf05025c12de825d2a
Parents: 09c0c8d
Author: Jason Huynh <hu...@gmail.com>
Authored: Tue Feb 9 14:08:28 2016 -0800
Committer: Jason Huynh <hu...@gmail.com>
Committed: Fri Feb 12 10:49:58 2016 -0800

----------------------------------------------------------------------
 .../query/internal/index/AbstractIndex.java     |  4 +++
 .../query/internal/index/CompactRangeIndex.java |  4 ++-
 .../index/CompactRangeIndexJUnitTest.java       | 27 +++++++++++++++++++-
 3 files changed, 33 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/781277f3/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
index f59d078..83a77fd 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
@@ -46,6 +46,7 @@ import com.gemstone.gemfire.cache.query.internal.Bag;
 import com.gemstone.gemfire.cache.query.internal.CompiledID;
 import com.gemstone.gemfire.cache.query.internal.CompiledIndexOperation;
 import com.gemstone.gemfire.cache.query.internal.CompiledIteratorDef;
+import com.gemstone.gemfire.cache.query.internal.CompiledOperation;
 import com.gemstone.gemfire.cache.query.internal.CompiledPath;
 import com.gemstone.gemfire.cache.query.internal.CompiledValue;
 import com.gemstone.gemfire.cache.query.internal.CqEntry;
@@ -1703,6 +1704,9 @@ public abstract class AbstractIndex implements IndexProtocol
     else if (path instanceof CompiledPath) {
       return getReceiverNameFromPath(path.getReceiver());
     }
+    else if (path instanceof CompiledOperation) {
+      return getReceiverNameFromPath(path.getReceiver());
+    }
     else if (path instanceof CompiledIndexOperation) {
       return getReceiverNameFromPath(((CompiledIndexOperation)path).getReceiver());
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/781277f3/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndex.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndex.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndex.java
index 13c8a8e..1e44bb4 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndex.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndex.java
@@ -93,6 +93,8 @@ public class CompactRangeIndex extends AbstractIndex {
   protected ThreadLocal<OldKeyValuePair> oldKeyValue;
  
   private IndexStore indexStore;
+  
+  static boolean TEST_ALWAYS_UPDATE_IN_PROGRESS = false;
 
   public CompactRangeIndex(String indexName, Region region, String fromClause,
       String indexedExpression, String projectionAttributes,
@@ -883,7 +885,7 @@ public class CompactRangeIndex extends AbstractIndex {
         } else {
           if (value != null) {
             boolean ok = true;
-            if (indexEntry.isUpdateInProgress()) {
+            if (indexEntry.isUpdateInProgress() || TEST_ALWAYS_UPDATE_IN_PROGRESS) {
               IndexInfo indexInfo = (IndexInfo) context
                   .cacheGet(CompiledValue.INDEX_INFO);
               if (runtimeItr == null) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/781277f3/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
index e49ee74..68a946c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
@@ -252,7 +252,32 @@ public class CompactRangeIndexJUnitTest  {
     }
     assertEquals("incorrect number of entries in collection", 0, count);
   }
-  
+
+  @Test
+  public void testUpdateInProgressWithMethodInvocationInIndexClauseShouldNotThrowException() throws Exception {
+    try {
+      CompactRangeIndex.TEST_ALWAYS_UPDATE_IN_PROGRESS = true;
+      index = utils.createIndex("indexName", "getP1().getSharesOutstanding()", "/exampleRegion");
+      Region region = utils.getCache().getRegion("exampleRegion");
+
+      // create objects
+      int numObjects = 10;
+      for (int i = 1; i <= numObjects; i++) {
+        Portfolio p = new Portfolio(i);
+        p.status = null;
+        region.put("KEY-" + i, p);
+      }
+      // execute query and check result size
+      QueryService qs = utils.getCache().getQueryService();
+      SelectResults results = (SelectResults) qs
+          .newQuery(
+              "<trace>SELECT DISTINCT e.key FROM /exampleRegion AS e WHERE e.ID = 1 AND e.getP1().getSharesOutstanding() >= -1 AND e.getP1().getSharesOutstanding() <= 1000 LIMIT 10 ")
+          .execute();
+    } finally {
+      CompactRangeIndex.TEST_ALWAYS_UPDATE_IN_PROGRESS = false;
+    }
+  }
+
   private class MemoryIndexStoreREToIndexElemTestHook implements TestHook {
 
     private CountDownLatch readyToStartRemoveLatch;


[20/33] incubator-geode git commit: GEODE-954: display HostnameForClient in the member list view

Posted by ds...@apache.org.
GEODE-954: display HostnameForClient in the member list view

* retrieve the hostnameforClient and bindAddress attributes from the mbean
* add a column in the member list view to display it. If hostnameforclient is empty, use bindAddress
* have the tooltip show the entire content of the cell in case the cell is too short
* modify the ui tests to reflect the ui change
* refactor if/else into switch statement

GEODE-913: modifiable


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

Branch: refs/heads/feature/GEODE-831
Commit: 8fd91dde15b7c4af73776ce8490d1a6cfbcf8f97
Parents: 7c195af
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Thu Feb 11 14:50:17 2016 -0800
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Tue Feb 16 08:04:57 2016 -0800

----------------------------------------------------------------------
 .../tools/pulse/internal/data/Cluster.java      |  38 +-
 .../pulse/internal/data/JMXDataUpdater.java     | 742 ++++++++++---------
 .../pulse/internal/data/PulseConstants.java     |   7 +-
 .../internal/service/ClusterMemberService.java  |  19 +-
 .../internal/service/MemberDetailsService.java  |  15 +-
 .../internal/service/MembersListService.java    |  13 +-
 .../webapp/scripts/pulsescript/clusterDetail.js |  70 +-
 .../tools/pulse/tests/PulseBaseTest.java        |   6 +-
 .../gemfire/tools/pulse/tests/PulseTest.java    |   4 +-
 9 files changed, 475 insertions(+), 439 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8fd91dde/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java b/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
index a65a07e..732a1b0 100644
--- a/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
+++ b/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
@@ -20,14 +20,21 @@
 package com.vmware.gemfire.tools.pulse.internal.data;
 
 
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+import org.apache.commons.collections.buffer.CircularFifoBuffer;
+
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
 import java.net.ConnectException;
 import java.net.URL;
 import java.text.DateFormat;
@@ -36,24 +43,17 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Random;
-import java.util.Iterator;
 import java.util.ResourceBundle;
 import java.util.Set;
 import java.util.TimeZone;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicInteger;
 
-import org.apache.commons.collections.buffer.CircularFifoBuffer;
-
-import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
-import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
-import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
-import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
-
 /**
  * Class Cluster This class is the Data Model for the data used for the Pulse
  * Web UI.
@@ -235,6 +235,8 @@ public class Cluster extends Thread {
     private boolean manager;
     private int totalRegionCount;
     private String host;
+    private String hostnameForClients;
+    private String bindAddress;
     private long currentHeapSize;
     private long maxHeapSize;
     private int avgHeapUsage;
@@ -448,6 +450,14 @@ public class Cluster extends Thread {
       return this.host;
     }
 
+    public String getHostnameForClients() {
+      if(StringUtils.isNotNullNotEmptyNotWhiteSpace(hostnameForClients))
+        return this.hostnameForClients;
+      else if(StringUtils.isNotNullNotEmptyNotWhiteSpace(bindAddress))
+        return this.bindAddress;
+      return null;
+    }
+
     public Long getUptime() {
       return this.uptime;
     }
@@ -524,6 +534,14 @@ public class Cluster extends Thread {
       this.host = host;
     }
 
+    public void setHostnameForClients(String hostnameForClients) {
+      this.hostnameForClients = hostnameForClients;
+    }
+
+    public void setBindAddress(String bindAddress){
+      this.bindAddress = bindAddress;
+    }
+
     public void setUptime(Long uptime) {
       this.uptime = uptime;
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8fd91dde/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java b/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
index 1cd5fd7..8e4557a 100644
--- a/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
+++ b/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
@@ -19,25 +19,12 @@
 
 package com.vmware.gemfire.tools.pulse.internal.data;
 
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.management.ManagementFactory;
-import java.net.Inet4Address;
-import java.net.Inet6Address;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.ResourceBundle;
-import java.util.Set;
+import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
+import com.vmware.gemfire.tools.pulse.internal.data.JmxManagerFinder.JmxManagerInfo;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
 
 import javax.management.Attribute;
 import javax.management.AttributeList;
@@ -58,13 +45,25 @@ import javax.management.remote.JMXConnector;
 import javax.management.remote.JMXConnectorFactory;
 import javax.management.remote.JMXServiceURL;
 import javax.rmi.ssl.SslRMIClientSocketFactory;
-
-import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
-import com.vmware.gemfire.tools.pulse.internal.data.JmxManagerFinder.JmxManagerInfo;
-import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
-import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
-import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
-import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.lang.management.ManagementFactory;
+import java.net.Inet4Address;
+import java.net.Inet6Address;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.ResourceBundle;
+import java.util.Set;
 
 /**
  * Class JMXDataUpdater Class used for creating JMX connection and getting all
@@ -499,12 +498,14 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       Set<ObjectName> memberMBeans = this.mbs.queryNames(
           this.MBEAN_OBJECT_NAME_MEMBER, null);
       for (ObjectName memMBean : memberMBeans) {
-        // member regions
-        if (memMBean.getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_SERVICE) != null) {
-          if (memMBean
-              .getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_SERVICE)
-              .equals(PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_REGION)) {
-
+        String service = memMBean.getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_SERVICE);
+        if(service==null){
+          // Cluster Member
+          updateClusterMember(memMBean);
+        }
+        else {
+          switch (service) {
+          case PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_REGION:
             if (PulseConstants.PRODUCT_NAME_SQLFIRE
                 .equalsIgnoreCase(PulseController.getPulseProductSupport())) {
               // For SQLfire
@@ -522,31 +523,23 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
               // For Gemfire
               updateMemberRegion(memMBean);
             }
-
-          } else if (memMBean.getKeyProperty(
-              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE).equals(
-              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_CACHESERVER)) {
+            break;
+          case PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_CACHESERVER:
             updateMemberClient(memMBean);
-          }
-          // Gateway Receiver Attributes
-          else if (memMBean.getKeyProperty(
-              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE).equals(
-              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_GATEWAYRECEIVER)) {
+            break;
+          case PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_GATEWAYRECEIVER:
             updateGatewayReceiver(memMBean);
-          } else if (memMBean.getKeyProperty(
-              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE).equals(
-              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_GATEWAYSENDER)) {
-              updateGatewaySender(memMBean);
-          } else if(memMBean.getKeyProperty(
-              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE).equals(
-              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_ASYNCEVENTQUEUE)){
-
-              // AsyncEventQueue
-              updateAsyncEventQueue(memMBean);
+            break;
+          case PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_GATEWAYSENDER:
+            updateGatewaySender(memMBean);
+            break;
+          case PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_ASYNCEVENTQUEUE:
+            updateAsyncEventQueue(memMBean);
+            break;
+          case PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_LOCATOR:
+            updateClusterMember(memMBean);
+            break;
           }
-        } else {
-          // Cluster Member
-          updateClusterMember(memMBean);
         }
       }
 
@@ -650,25 +643,25 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       for (int i = 0; i < attributeList.size(); i++) {
 
         Attribute attribute = (Attribute) attributeList.get(i);
-
-        if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_MEMBERCOUNT)) {
+        String name = attribute.getName();
+        switch (name){
+        case PulseConstants.MBEAN_ATTRIBUTE_MEMBERCOUNT:
           cluster.setMemberCount(getIntegerAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_NUMCLIENTS)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_NUMCLIENTS:
           cluster.setClientConnectionCount(getIntegerAttribute(
               attribute.getValue(), attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_DISTRIBUTEDSYSTEMID)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_DISTRIBUTEDSYSTEMID:
           cluster.setClusterId(getIntegerAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_LOCATORCOUNT)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_LOCATORCOUNT:
           cluster.setLocatorCount(getIntegerAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_NUMRUNNIGFUNCTION)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_NUMRUNNIGFUNCTION:
           try {
             cluster.setRunningFunctionCount(getIntegerAttribute(
                 attribute.getValue(), attribute.getName()));
@@ -676,28 +669,28 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
             cluster.setRunningFunctionCount(0);
             continue;
           }
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_REGISTEREDCQCOUNT)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_REGISTEREDCQCOUNT:
           cluster.setRegisteredCQCount(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_NUMSUBSCRIPTIONS)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_NUMSUBSCRIPTIONS:
           cluster.setSubscriptionCount(getIntegerAttribute(
               attribute.getValue(), attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_NUMTXNCOMMITTED)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_NUMTXNCOMMITTED:
           cluster.setTxnCommittedCount(getIntegerAttribute(
               attribute.getValue(), attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_NUMTXNROLLBACK)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_NUMTXNROLLBACK:
           cluster.setTxnRollbackCount(getIntegerAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_TOTALHEAPSIZE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_TOTALHEAPSIZE:
           cluster.setTotalHeapSize(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_USEDHEAPSIZE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_USEDHEAPSIZE:
           try {
             cluster.setUsedHeapSize(getLongAttribute(attribute.getValue(),
                 attribute.getName()));
@@ -706,16 +699,16 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
             continue;
           }
           cluster.getMemoryUsageTrend().add(cluster.getUsedHeapSize());
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_TOTALREGIONENTRYCOUNT)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_TOTALREGIONENTRYCOUNT:
           cluster.setTotalRegionEntryCount(getLongAttribute(
               attribute.getValue(), attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_CURRENTENTRYCOUNT)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_CURRENTENTRYCOUNT:
           cluster.setCurrentQueryCount(getIntegerAttribute(
               attribute.getValue(), attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_TOTALDISKUSAGE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_TOTALDISKUSAGE:
           try {
             cluster.setTotalBytesOnDisk(getLongAttribute(attribute.getValue(),
                 attribute.getName()));
@@ -724,13 +717,13 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
             continue;
           }
           cluster.getTotalBytesOnDiskTrend().add(cluster.getTotalBytesOnDisk());
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE:
           cluster.setDiskWritesRate(getFloatAttribute(attribute.getValue(),
               attribute.getName()));
           cluster.getThroughoutWritesTrend().add(cluster.getDiskWritesRate());
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_AVERAGEWRITES)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_AVERAGEWRITES:
           try {
             cluster.setWritePerSec(getFloatAttribute(attribute.getValue(),
                 attribute.getName()));
@@ -739,8 +732,8 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
             continue;
           }
           cluster.getWritePerSecTrend().add(cluster.getWritePerSec());
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_AVERAGEREADS)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_AVERAGEREADS:
           try {
             cluster.setReadPerSec(getFloatAttribute(attribute.getValue(),
                 attribute.getName()));
@@ -749,43 +742,34 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
             continue;
           }
           cluster.getReadPerSecTrend().add(cluster.getReadPerSec());
-
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_QUERYREQUESTRATE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_QUERYREQUESTRATE:
           cluster.setQueriesPerSec(getFloatAttribute(attribute.getValue(),
               attribute.getName()));
           cluster.getQueriesPerSecTrend().add(cluster.getQueriesPerSec());
-
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE:
           cluster.setDiskReadsRate(getFloatAttribute(attribute.getValue(),
               attribute.getName()));
           cluster.getThroughoutReadsTrend().add(cluster.getDiskReadsRate());
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_JVMPAUSES)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_JVMPAUSES:
           long trendVal = determineCurrentJVMPauses(
               PulseConstants.JVM_PAUSES_TYPE_CLUSTER, "",
               getLongAttribute(attribute.getValue(), attribute.getName()));
           cluster.setGarbageCollectionCount(trendVal);
           cluster.getGarbageCollectionTrend().add(
               cluster.getGarbageCollectionCount());
-
-        }
-
-        // For SQLfire or Gemfire
-        if (PulseConstants.PRODUCT_NAME_SQLFIRE
-            .equalsIgnoreCase(PulseController.getPulseProductSupport())) {
-          // For SQLfire
-          // Do nothing
-        } else {
-          // For Gemfire
-          if (attribute.getName().equals(
-              PulseConstants.MBEAN_ATTRIBUTE_TOTALREGIONCOUNT)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_TOTALREGIONCOUNT:
+          if (!PulseConstants.PRODUCT_NAME_SQLFIRE
+              .equalsIgnoreCase(PulseController.getPulseProductSupport())){
+            // for Gemfire
             cluster.setTotalRegionCount(getIntegerAttribute(
                 attribute.getValue(), attribute.getName()));
           }
+          break;
         }
-
       }
 
       // SQLFIRE attributes
@@ -923,46 +907,48 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
 
     for (int i = 0; i < attributeList.size(); i++) {
       Attribute attribute = (Attribute) attributeList.get(i);
-      if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_EVENTRECEIVEDDATE)) {
+      String name = attribute.getName();
+      switch (name){
+      case PulseConstants.MBEAN_ATTRIBUTE_EVENTRECEIVEDDATE:
         gatewaySender.setLinkThroughput(getFloatAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_BATCHSIZE)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_BATCHSIZE:
         gatewaySender.setBatchSize(getIntegerAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_SENDERID)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_SENDERID:
         gatewaySender.setId(getStringAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_EVENTQUEUESIZE)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_EVENTQUEUESIZE:
         gatewaySender.setQueueSize(getIntegerAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_RUNNING)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_RUNNING:
         gatewaySender.setStatus(getBooleanAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_PRIMARY)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_PRIMARY:
         gatewaySender.setPrimary(getBooleanAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_PERSISTENCEENABLED)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_PERSISTENCEENABLED:
         gatewaySender.setPersistenceEnabled(getBooleanAttribute(
             attribute.getValue(), attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_PARALLEL)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_PARALLEL:
         gatewaySender.setSenderType(getBooleanAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_REMOTE_DS_ID)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_REMOTE_DS_ID:
         gatewaySender.setRemoteDSId(getIntegerAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_EVENTS_EXCEEDING_ALERT_THRESHOLD)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_EVENTS_EXCEEDING_ALERT_THRESHOLD:
         gatewaySender.setEventsExceedingAlertThreshold(getIntegerAttribute(attribute.getValue(),
             attribute.getName()));
+        break;
       }
     }
     return gatewaySender;
@@ -1039,38 +1025,40 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
 
     for (int i = 0; i < attributeList.size(); i++) {
       Attribute attribute = (Attribute) attributeList.get(i);
-      if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_AEQ_ASYNCEVENTID)) {
+      String name = attribute.getName();
+      switch (name){
+      case PulseConstants.MBEAN_ATTRIBUTE_AEQ_ASYNCEVENTID:
         asyncEventQueue.setId(getStringAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_AEQ_ASYNC_EVENT_LISTENER)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_AEQ_ASYNC_EVENT_LISTENER:
         asyncEventQueue.setAsyncEventListener(getStringAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_AEQ_BATCH_CONFLATION_ENABLED)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_AEQ_BATCH_CONFLATION_ENABLED:
         asyncEventQueue.setBatchConflationEnabled(getBooleanAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_AEQ_BATCH_TIME_INTERVAL)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_AEQ_BATCH_TIME_INTERVAL:
         asyncEventQueue.setBatchTimeInterval(getLongAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_AEQ_BATCH_SIZE)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_AEQ_BATCH_SIZE:
         asyncEventQueue.setBatchSize(getIntegerAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_AEQ_EVENT_QUEUE_SIZE)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_AEQ_EVENT_QUEUE_SIZE:
         asyncEventQueue.setEventQueueSize(getIntegerAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_AEQ_PARALLEL)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_AEQ_PARALLEL:
         asyncEventQueue.setParallel(getBooleanAttribute(
             attribute.getValue(), attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_AEQ_PRIMARY)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_AEQ_PRIMARY:
         asyncEventQueue.setPrimary(getBooleanAttribute(attribute.getValue(),
             attribute.getName()));
+        break;
       }
     }
     return asyncEventQueue;
@@ -1177,6 +1165,10 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
             + this.mbs.getAttribute(mbeanName,
                 PulseConstants.MBEAN_ATTRIBUTE_PORT));
 
+        this.mbs.getAttribute(mbeanName, PulseConstants.MBEAN_ATTRIBUTE_HOSTNAMEFORCLIENTS_ALT);
+        existingMember.setHostnameForClients((String)this.mbs.getAttribute(mbeanName, PulseConstants.MBEAN_ATTRIBUTE_HOSTNAMEFORCLIENTS_ALT));
+        existingMember.setBindAddress((String)this.mbs.getAttribute(mbeanName, PulseConstants.MBEAN_ATTRIBUTE_BINDADDRESS));
+
         CompositeData[] compositeData = (CompositeData[]) (this.mbs.invoke(
             mbeanName, PulseConstants.MBEAN_OPERATION_SHOWALLCLIENTS, null,
             null));
@@ -1285,42 +1277,44 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
               AttributeList attributeList = this.mbs.getAttributes(regionOnMemberMBean, PulseConstants.REGION_ON_MEMBER_MBEAN_ATTRIBUTES);
               for (int i = 0; i < attributeList.size(); i++) {
                 Attribute attribute = (Attribute) attributeList.get(i);
-                  if (attribute.getName().equals(
-                      PulseConstants.MBEAN_ATTRIBUTE_ENTRYSIZE)) {
-                    anRom.setEntrySize(getLongAttribute(attribute.getValue(),
-                        attribute.getName()));
-                    LOGGER.fine("updateRegionOnMembers : anRom.getEntrySize() = " + anRom.getEntrySize());
-                  } else if (attribute.getName().equals(
-                      PulseConstants.MBEAN_ATTRIBUTE_ENTRYCOUNT)) {
-                    anRom.setEntryCount(getLongAttribute(attribute.getValue(),
-                        attribute.getName()));
-                    LOGGER.fine("updateRegionOnMembers : anRom.getEntryCount() = " + anRom.getEntryCount());
-                  } else if (attribute.getName().equals(
-                      PulseConstants.MBEAN_ATTRIBUTE_PUTSRATE)) {
-                    anRom.setPutsRate(getFloatAttribute(attribute.getValue(),
-                        attribute.getName()));
-                    LOGGER.fine("updateRegionOnMembers : anRom.getPutsRate() = " + anRom.getPutsRate());
-                  } else if (attribute.getName().equals(
-                      PulseConstants.MBEAN_ATTRIBUTE_GETSRATE)) {
-                    anRom.setGetsRate(getFloatAttribute(attribute.getValue(),
-                        attribute.getName()));
-                    LOGGER.fine("updateRegionOnMembers : anRom.getGetsRate() = " + anRom.getGetsRate());
-                  } else if (attribute.getName().equals(
-                      PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE)) {
-                    anRom.setDiskGetsRate(getFloatAttribute(attribute.getValue(),
-                        attribute.getName()));
-                    LOGGER.fine("updateRegionOnMembers : anRom.getDiskGetsRate() = " + anRom.getDiskGetsRate());
-                  } else if (attribute.getName().equals(
-                      PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE)) {
-                    anRom.setDiskPutsRate(getFloatAttribute(attribute.getValue(),
-                        attribute.getName()));
-                    LOGGER.fine("updateRegionOnMembers : anRom.getDiskPutsRate() = " + anRom.getDiskPutsRate());
-                  } else if (attribute.getName().equals(
-                      PulseConstants.MBEAN_ATTRIBUTE_LOCALMAXMEMORY)) {
-                    anRom.setLocalMaxMemory(getIntegerAttribute(attribute.getValue(),
-                        attribute.getName()));
-                    LOGGER.fine("updateRegionOnMembers : anRom.getLocalMaxMemory() = " + anRom.getLocalMaxMemory());
-                  }
+                String name = attribute.getName();
+                switch(name){
+                case PulseConstants.MBEAN_ATTRIBUTE_ENTRYSIZE:
+                  anRom.setEntrySize(getLongAttribute(attribute.getValue(),
+                      attribute.getName()));
+                  LOGGER.fine("updateRegionOnMembers : anRom.getEntrySize() = " + anRom.getEntrySize());
+                  break;
+                case PulseConstants.MBEAN_ATTRIBUTE_ENTRYCOUNT:
+                  anRom.setEntryCount(getLongAttribute(attribute.getValue(),
+                      attribute.getName()));
+                  LOGGER.fine("updateRegionOnMembers : anRom.getEntryCount() = " + anRom.getEntryCount());
+                  break;
+                case PulseConstants.MBEAN_ATTRIBUTE_PUTSRATE:
+                  anRom.setPutsRate(getFloatAttribute(attribute.getValue(),
+                      attribute.getName()));
+                  LOGGER.fine("updateRegionOnMembers : anRom.getPutsRate() = " + anRom.getPutsRate());
+                  break;
+                case PulseConstants.MBEAN_ATTRIBUTE_GETSRATE:
+                  anRom.setGetsRate(getFloatAttribute(attribute.getValue(),
+                      attribute.getName()));
+                  LOGGER.fine("updateRegionOnMembers : anRom.getGetsRate() = " + anRom.getGetsRate());
+                  break;
+                case PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE:
+                  anRom.setDiskGetsRate(getFloatAttribute(attribute.getValue(),
+                      attribute.getName()));
+                  LOGGER.fine("updateRegionOnMembers : anRom.getDiskGetsRate() = " + anRom.getDiskGetsRate());
+                  break;
+                case PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE:
+                  anRom.setDiskPutsRate(getFloatAttribute(attribute.getValue(),
+                      attribute.getName()));
+                  LOGGER.fine("updateRegionOnMembers : anRom.getDiskPutsRate() = " + anRom.getDiskPutsRate());
+                  break;
+                case PulseConstants.MBEAN_ATTRIBUTE_LOCALMAXMEMORY:
+                  anRom.setLocalMaxMemory(getIntegerAttribute(attribute.getValue(),
+                      attribute.getName()));
+                  LOGGER.fine("updateRegionOnMembers : anRom.getLocalMaxMemory() = " + anRom.getLocalMaxMemory());
+                  break;
+                }
               }
 
               anRom.getGetsPerSecTrend().add(anRom.getGetsRate());
@@ -1351,35 +1345,37 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
           AttributeList attributeList = this.mbs.getAttributes(regionOnMemberMBean, PulseConstants.REGION_ON_MEMBER_MBEAN_ATTRIBUTES);
           for (int i = 0; i < attributeList.size(); i++) {
             Attribute attribute = (Attribute) attributeList.get(i);
-              if (attribute.getName().equals(
-                  PulseConstants.MBEAN_ATTRIBUTE_ENTRYSIZE)) {
-                regionOnMember.setEntrySize(getLongAttribute(attribute.getValue(),
-                    attribute.getName()));
-              } else if (attribute.getName().equals(
-                  PulseConstants.MBEAN_ATTRIBUTE_ENTRYCOUNT)) {
-                regionOnMember.setEntryCount(getLongAttribute(attribute.getValue(),
-                    attribute.getName()));
-              } else if (attribute.getName().equals(
-                  PulseConstants.MBEAN_ATTRIBUTE_PUTSRATE)) {
-                regionOnMember.setPutsRate(getFloatAttribute(attribute.getValue(),
-                    attribute.getName()));
-              } else if (attribute.getName().equals(
-                  PulseConstants.MBEAN_ATTRIBUTE_GETSRATE)) {
-                regionOnMember.setGetsRate(getFloatAttribute(attribute.getValue(),
-                    attribute.getName()));
-              } else if (attribute.getName().equals(
-                  PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE)) {
-                regionOnMember.setDiskGetsRate(getFloatAttribute(attribute.getValue(),
-                    attribute.getName()));
-              } else if (attribute.getName().equals(
-                  PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE)) {
-                regionOnMember.setDiskPutsRate(getFloatAttribute(attribute.getValue(),
-                    attribute.getName()));
-              } else if (attribute.getName().equals(
-                  PulseConstants.MBEAN_ATTRIBUTE_LOCALMAXMEMORY)) {
-                regionOnMember.setLocalMaxMemory(getIntegerAttribute(attribute.getValue(),
-                    attribute.getName()));
-              }
+            String name=attribute.getName();
+            switch (name){
+            case PulseConstants.MBEAN_ATTRIBUTE_ENTRYSIZE:
+              regionOnMember.setEntrySize(getLongAttribute(attribute.getValue(),
+                  attribute.getName()));
+              break;
+            case PulseConstants.MBEAN_ATTRIBUTE_ENTRYCOUNT:
+              regionOnMember.setEntryCount(getLongAttribute(attribute.getValue(),
+                  attribute.getName()));
+              break;
+            case PulseConstants.MBEAN_ATTRIBUTE_PUTSRATE:
+              regionOnMember.setPutsRate(getFloatAttribute(attribute.getValue(),
+                  attribute.getName()));
+              break;
+            case PulseConstants.MBEAN_ATTRIBUTE_GETSRATE:
+              regionOnMember.setGetsRate(getFloatAttribute(attribute.getValue(),
+                  attribute.getName()));
+              break;
+            case PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE:
+              regionOnMember.setDiskGetsRate(getFloatAttribute(attribute.getValue(),
+                  attribute.getName()));
+              break;
+            case PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE:
+              regionOnMember.setDiskPutsRate(getFloatAttribute(attribute.getValue(),
+                  attribute.getName()));
+              break;
+            case PulseConstants.MBEAN_ATTRIBUTE_LOCALMAXMEMORY:
+              regionOnMember.setLocalMaxMemory(getIntegerAttribute(attribute.getValue(),
+                  attribute.getName()));
+              break;
+            }
           }
 
           regionOnMember.getGetsPerSecTrend().add(regionOnMember.getGetsRate());
@@ -1442,72 +1438,75 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
 
         Attribute attribute = (Attribute) attributeList.get(i);
 
-        if (attribute.getName().equals(PulseConstants.MBEAN_ATTRIBUTE_MEMBERS)) {
+        String name = attribute.getName();
+        switch (name){
+        case PulseConstants.MBEAN_ATTRIBUTE_MEMBERS:
           String memName[] = (String[]) attribute.getValue();
           region.getMemberName().clear();
           for (int k = 0; k < memName.length; k++) {
             region.getMemberName().add(memName[k]);
           }
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_FULLPATH)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_FULLPATH:
           region.setFullPath(getStringAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE:
           region.setDiskReadsRate(getFloatAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE:
           region.setDiskWritesRate(getFloatAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_EMPTYNODES)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_EMPTYNODES:
           region.setEmptyNode(getIntegerAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_GETSRATE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_GETSRATE:
           region.setGetsRate(getFloatAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_LRUEVICTIONRATE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_LRUEVICTIONRATE:
           region.setLruEvictionRate(getFloatAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_PUTSRATE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_PUTSRATE:
           region.setPutsRate(getFloatAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_REGIONTYPE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_REGIONTYPE:
           region.setRegionType(getStringAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_ENTRYSIZE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_ENTRYSIZE:
           region.setEntrySize(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_SYSTEMREGIONENTRYCOUNT)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_SYSTEMREGIONENTRYCOUNT:
           region.setSystemRegionEntryCount(getLongAttribute(
               attribute.getValue(), attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_MEMBERCOUNT)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_MEMBERCOUNT:
           region.setMemberCount(getIntegerAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_PERSISTENTENABLED)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_PERSISTENTENABLED:
           region.setPersistentEnabled(getBooleanAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_NAME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_NAME:
           region.setName(getStringAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_GATEWAYENABLED)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_GATEWAYENABLED:
           region.setWanEnabled(getBooleanAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_DISKUSAGE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_DISKUSAGE:
           region.setDiskUsage(getLongAttribute(attribute.getValue(),
               attribute.getName()));
+          break;
         }
       }
 
@@ -1635,86 +1634,85 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       }
 
       for (int i = 0; i < attributeList.size(); i++) {
-
         Attribute attribute = (Attribute) attributeList.get(i);
-
-        if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_NUMTIMESCOMPILED)) {
+        String name = attribute.getName();
+        switch (name){
+        case PulseConstants.MBEAN_ATTRIBUTE_NUMTIMESCOMPILED:
           statement.setNumTimesCompiled(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_NUMEXECUTION)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_NUMEXECUTION:
           statement.setNumExecution(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_NUMEXECUTIONSINPROGRESS)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_NUMEXECUTIONSINPROGRESS:
           statement.setNumExecutionsInProgress(getLongAttribute(
               attribute.getValue(), attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_NUMTIMESGLOBALINDEXLOOKUP)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_NUMTIMESGLOBALINDEXLOOKUP:
           statement.setNumTimesGlobalIndexLookup(getLongAttribute(
               attribute.getValue(), attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_NUMROWSMODIFIED)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_NUMROWSMODIFIED:
           statement.setNumRowsModified(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_PARSETIME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_PARSETIME:
           statement.setParseTime(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_BINDTIME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_BINDTIME:
           statement.setBindTime(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_OPTIMIZETIME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_OPTIMIZETIME:
           statement.setOptimizeTime(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_ROUTINGINFOTIME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_ROUTINGINFOTIME:
           statement.setRoutingInfoTime(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_GENERATETIME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_GENERATETIME:
           statement.setGenerateTime(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_TOTALCOMPILATIONTIME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_TOTALCOMPILATIONTIME:
           statement.setTotalCompilationTime(getLongAttribute(
               attribute.getValue(), attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_EXECUTIONTIME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_EXECUTIONTIME:
           statement.setExecutionTime(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_PROJECTIONTIME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_PROJECTIONTIME:
           statement.setProjectionTime(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_TOTALEXECUTIONTIME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_TOTALEXECUTIONTIME:
           statement.setTotalExecutionTime(getLongAttribute(
               attribute.getValue(), attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_ROWSMODIFICATIONTIME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_ROWSMODIFICATIONTIME:
           statement.setRowsModificationTime(getLongAttribute(
               attribute.getValue(), attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_QNNUMROWSSEEN)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_QNNUMROWSSEEN:
           statement.setqNNumRowsSeen(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_QNMSGSENDTIME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_QNMSGSENDTIME:
           statement.setqNMsgSendTime(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_QNMSGSERTIME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_QNMSGSERTIME:
           statement.setqNMsgSerTime(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        }
-        if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_QNRESPDESERTIME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_QNRESPDESERTIME:
           statement.setqNRespDeSerTime(getLongAttribute(attribute.getValue(),
               attribute.getName()));
+          break;
         }
       }
 
@@ -1737,7 +1735,7 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
    */
   private Cluster.Member initializeMember(ObjectName mbeanName,
       Cluster.Member member) throws InstanceNotFoundException,
-      ReflectionException, IOException {
+                                    ReflectionException, IOException {
 
     AttributeList attributeList = this.mbs.getAttributes(mbeanName,
         PulseConstants.MEMBER_MBEAN_ATTRIBUTES);
@@ -1745,53 +1743,55 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
     for (int i = 0; i < attributeList.size(); i++) {
 
       Attribute attribute = (Attribute) attributeList.get(i);
-
-      if (attribute.getName().equals(PulseConstants.MBEAN_ATTRIBUTE_GEMFIREVERSION)) {
+      String name = attribute.getName();
+      switch (name) {
+      case PulseConstants.MBEAN_ATTRIBUTE_GEMFIREVERSION:
         if (member.getGemfireVersion() == null) {
           // Set Member's GemFire Version if not set already
           String gemfireVersion = obtainGemfireVersion(getStringAttribute(
               attribute.getValue(), attribute.getName()));
           member.setGemfireVersion(gemfireVersion);
         }
-      } else if (attribute.getName().equals(PulseConstants.MBEAN_ATTRIBUTE_MANAGER)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_MANAGER:
         member.setManager(getBooleanAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_TOTALREGIONCOUNT)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_TOTALREGIONCOUNT:
         member.setTotalRegionCount(getIntegerAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_LOCATOR)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_LOCATOR:
         member.setLocator(getBooleanAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_TOTALDISKUSAGE)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_TOTALDISKUSAGE:
         member.setTotalDiskUsage(getLongAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_SERVER)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_SERVER:
         member.setServer(getBooleanAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_TOTALFILEDESCRIPTOROPEN)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_TOTALFILEDESCRIPTOROPEN:
         member.setTotalFileDescriptorOpen(getLongAttribute(
             attribute.getValue(), attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_LOADAVERAGE)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_LOADAVERAGE:
         member.setLoadAverage(getDoubleAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE:
         member.setThroughputWrites(getFloatAttribute(attribute.getValue(),
             attribute.getName()));
         member.getThroughputWritesTrend().add(member.getThroughputWrites());
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE:
         member.setThroughputReads(getFloatAttribute(attribute.getValue(),
             attribute.getName()));
         member.getThroughputReadsTrend().add(member.getThroughputReads());
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_JVMPAUSES)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_JVMPAUSES:
         long trendVal = determineCurrentJVMPauses(
             PulseConstants.JVM_PAUSES_TYPE_MEMBER, member.getName(),
             getLongAttribute(attribute.getValue(),
@@ -1799,83 +1799,86 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
         member.setGarbageCollectionCount(trendVal);
         member.getGarbageCollectionSamples().add(
             member.getGarbageCollectionCount());
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_USEDMEMORY)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_USEDMEMORY:
         member.setCurrentHeapSize(getLongAttribute(attribute.getValue(),
             attribute.getName()));
         member.getHeapUsageSamples().add(member.getCurrentHeapSize());
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_MAXMEMORY)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_MAXMEMORY:
         member.setMaxHeapSize(getLongAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_NUMTHREADS)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_NUMTHREADS:
         member.setNumThreads(getIntegerAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_MEMBERUPTIME)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_MEMBERUPTIME:
         member.setUptime(getLongAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName()
-          .equals(PulseConstants.MBEAN_ATTRIBUTE_HOST)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_HOST:
         member.setHost(getStringAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_TOTALBYTESONDISK)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_HOSTNAMEFORCLIENTS:
+        member.setHostnameForClients(getStringAttribute(attribute.getValue(),
+                attribute.getName()));
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_BINDADDRESS:
+        member.setBindAddress(getStringAttribute(attribute.getValue(),
+            attribute.getName()));
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_TOTALBYTESONDISK:
         member.setTotalBytesOnDisk(getLongAttribute(attribute.getValue(),
             attribute.getName()));
         member.getTotalBytesOnDiskSamples().add(member.getTotalBytesOnDisk());
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_CPUUSAGE)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_CPUUSAGE:
         member.setCpuUsage(getFloatAttribute(attribute.getValue(),
             attribute.getName()));
         member.getCpuUsageSamples().add(member.getCpuUsage());
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_HOSTCPUUSAGE)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_HOSTCPUUSAGE:
         // Float value is expected for host cpu usage.
         // TODO Remove Float.valueOf() when float value is provided in mbean
         member.setHostCpuUsage(Float.valueOf(getIntegerAttribute(
             attribute.getValue(), attribute.getName())));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_MEMBER)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_MEMBER:
         member.setName(getStringAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(PulseConstants.MBEAN_ATTRIBUTE_ID)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_ID:
         member.setId(getStringAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_AVERAGEREADS)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_AVERAGEREADS:
         member.setGetsRate(getFloatAttribute(attribute.getValue(),
             attribute.getName()));
         member.getGetsPerSecond().add(member.getGetsRate());
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_AVERAGEWRITES)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_AVERAGEWRITES:
         member.setPutsRate(getFloatAttribute(attribute.getValue(),
             attribute.getName()));
         member.getPutsPerSecond().add(member.getPutsRate());
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_OFFHEAPFREESIZE)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_OFFHEAPFREESIZE:
         member.setOffHeapFreeSize(getLongAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_OFFHEAPUSEDSIZE)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_OFFHEAPUSEDSIZE:
         member.setOffHeapUsedSize(getLongAttribute(attribute.getValue(),
             attribute.getName()));
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_SERVERGROUPS)) {
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_SERVERGROUPS:
         String sgValues[] = (String[]) attribute.getValue();
         member.getServerGroups().clear();
         for (int k = 0; k < sgValues.length; k++) {
           member.getServerGroups().add(sgValues[k]);
         }
-      } else if (attribute.getName().equals(
-          PulseConstants.MBEAN_ATTRIBUTE_REDUNDANCYZONES)) {
-        /*String rzValues[] = (String[]) attribute.getValue();
-        member.getRedundancyZones().clear();
-        for (int k = 0; k < rzValues.length; k++) {
-          member.getRedundancyZones().add(rzValues[k]);
-        }*/
-
+        break;
+      case PulseConstants.MBEAN_ATTRIBUTE_REDUNDANCYZONES:
         String rzValue = "";
         if(null != attribute.getValue()){
           rzValue = getStringAttribute(attribute.getValue(),
@@ -1885,6 +1888,7 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
         if(!rzValue.isEmpty()){
           member.getRedundancyZones().add(rzValue);
         }
+        break;
       }
     }
 
@@ -2212,58 +2216,60 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       // update the existing or new region
       for (int i = 0; i < attributeList.size(); i++) {
         Attribute attribute = (Attribute) attributeList.get(i);
-
-        if (attribute.getName().equals(PulseConstants.MBEAN_ATTRIBUTE_FULLPATH)) {
+        String name = attribute.getName();
+        switch (name){
+        case PulseConstants.MBEAN_ATTRIBUTE_FULLPATH:
           region.setFullPath(getStringAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE:
           region.setDiskReadsRate(getFloatAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE:
           region.setDiskWritesRate(getFloatAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_GETSRATE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_GETSRATE:
           region.setGetsRate(getFloatAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_LRUEVICTIONRATE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_LRUEVICTIONRATE:
           region.setLruEvictionRate(getFloatAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_PUTSRATE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_PUTSRATE:
           region.setPutsRate(getFloatAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_REGIONTYPE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_REGIONTYPE:
           region.setRegionType(getStringAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_MEMBERCOUNT)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_MEMBERCOUNT:
           region.setMemberCount(getIntegerAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_ENTRYSIZE)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_ENTRYSIZE:
           region.setEntrySize(getLongAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_ENTRYCOUNT)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_ENTRYCOUNT:
           region.setSystemRegionEntryCount(getLongAttribute(
               attribute.getValue(), attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_NAME)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_NAME:
           region.setName(getStringAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_PERSISTENTENABLED)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_PERSISTENTENABLED:
           region.setPersistentEnabled(getBooleanAttribute(attribute.getValue(),
               attribute.getName()));
-        } else if (attribute.getName().equals(
-            PulseConstants.MBEAN_ATTRIBUTE_GATEWAYENABLED)) {
+          break;
+        case PulseConstants.MBEAN_ATTRIBUTE_GATEWAYENABLED:
           region.setWanEnabled(getBooleanAttribute(attribute.getValue(),
               attribute.getName()));
+          break;
         }
       }
       /* GemfireXD related code

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8fd91dde/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java b/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
index 9c5732e..c2999f8 100644
--- a/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
+++ b/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
@@ -131,6 +131,7 @@ public class PulseConstants {
   public static final String MBEAN_KEY_PROPERTY_SERVICE_VALUE_GATEWAYRECEIVER = "GatewayReceiver";
   public static final String MBEAN_KEY_PROPERTY_SERVICE_VALUE_GATEWAYSENDER = "GatewaySender";
   public static final String MBEAN_KEY_PROPERTY_SERVICE_VALUE_ASYNCEVENTQUEUE = "AsyncEventQueue";
+  public static final String MBEAN_KEY_PROPERTY_SERVICE_VALUE_LOCATOR = "Locator";
   public static final String MBEAN_KEY_PROPERTY_REGION_NAME = "name";
 
   public static final String MBEAN_KEY_PROPERTY_MEMBER = "member";
@@ -173,6 +174,9 @@ public class PulseConstants {
   public static final String MBEAN_ATTRIBUTE_QUERYREQUESTRATE = "QueryRequestRate";
   public static final String MBEAN_ATTRIBUTE_JVMPAUSES = "JVMPauses";
   public static final String MBEAN_ATTRIBUTE_HOST = "Host";
+  public static final String MBEAN_ATTRIBUTE_HOSTNAMEFORCLIENTS = "HostnameForClients";
+  public static final String MBEAN_ATTRIBUTE_HOSTNAMEFORCLIENTS_ALT = "HostNameForClients";
+  public static final String MBEAN_ATTRIBUTE_BINDADDRESS = "BindAddress";
   public static final String MBEAN_ATTRIBUTE_PORT = "Port";
   public static final String MBEAN_ATTRIBUTE_EVENTRECEIVEDDATE = "EventsReceivedRate";
   public static final String MBEAN_ATTRIBUTE_AVEARGEBATCHPROCESSINGTIME = "AverageBatchProcessingTime";
@@ -359,7 +363,8 @@ public class PulseConstants {
       MBEAN_ATTRIBUTE_DISKREADSRATE, MBEAN_ATTRIBUTE_JVMPAUSES,
       MBEAN_ATTRIBUTE_USEDMEMORY, MBEAN_ATTRIBUTE_MAXMEMORY,
       MBEAN_ATTRIBUTE_NUMTHREADS, MBEAN_ATTRIBUTE_MEMBERUPTIME,
-      MBEAN_ATTRIBUTE_HOST, MBEAN_ATTRIBUTE_TOTALBYTESONDISK,
+      MBEAN_ATTRIBUTE_HOST, MBEAN_ATTRIBUTE_HOSTNAMEFORCLIENTS,
+      MBEAN_ATTRIBUTE_BINDADDRESS, MBEAN_ATTRIBUTE_TOTALBYTESONDISK,
       MBEAN_ATTRIBUTE_CPUUSAGE, MBEAN_ATTRIBUTE_HOSTCPUUSAGE,
       MBEAN_ATTRIBUTE_MEMBER, MBEAN_ATTRIBUTE_ID, MBEAN_ATTRIBUTE_AVERAGEREADS,
       MBEAN_ATTRIBUTE_AVERAGEWRITES, MBEAN_ATTRIBUTE_OFFHEAPFREESIZE,

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8fd91dde/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemberService.java
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemberService.java b/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemberService.java
index a3550b5..80e0b2e 100644
--- a/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemberService.java
+++ b/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemberService.java
@@ -19,16 +19,6 @@
 
 package com.vmware.gemfire.tools.pulse.internal.service;
 
-import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-import org.springframework.stereotype.Service;
-
 import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
 import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
 import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
@@ -36,6 +26,14 @@ import com.vmware.gemfire.tools.pulse.internal.data.Repository;
 import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
 import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
 import com.vmware.gemfire.tools.pulse.internal.util.TimeUtils;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * Class ClusterMemberService
@@ -73,6 +71,7 @@ public class ClusterMemberService implements PulseService {
         memberJSON.put("memberId", clusterMember.getId());
         memberJSON.put("name", clusterMember.getName());
         memberJSON.put("host", clusterMember.getHost());
+        memberJSON.put("hostnameForClients", clusterMember.getHostnameForClients());
 
         List<String> serverGroups = clusterMember.getServerGroups();
         if(serverGroups.size() == 0){

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8fd91dde/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDetailsService.java
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDetailsService.java b/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDetailsService.java
index 273ebec..7e55712 100644
--- a/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDetailsService.java
+++ b/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDetailsService.java
@@ -19,14 +19,6 @@
 
 package com.vmware.gemfire.tools.pulse.internal.service;
 
-import java.text.DecimalFormat;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-import org.springframework.stereotype.Service;
-
 import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
 import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
 import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
@@ -34,6 +26,12 @@ import com.vmware.gemfire.tools.pulse.internal.data.Repository;
 import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
 import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
 import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.DecimalFormat;
 
 /**
  * Class MemberDetailsService
@@ -70,6 +68,7 @@ public class MemberDetailsService implements PulseService {
         responseJSON.put("memberId", clusterMember.getId());
         responseJSON.put("name", clusterMember.getName());
         responseJSON.put("host", clusterMember.getHost());
+        responseJSON.put("hostnameForClients", clusterMember.getHostnameForClients());
         responseJSON.put("clusterId", cluster.getId());
         responseJSON.put("clusterName", cluster.getServerName());
         responseJSON.put("userName", userName);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8fd91dde/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MembersListService.java
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MembersListService.java b/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MembersListService.java
index f51de16..3a730c5 100644
--- a/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MembersListService.java
+++ b/gemfire-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MembersListService.java
@@ -19,17 +19,16 @@
 
 package com.vmware.gemfire.tools.pulse.internal.service;
 
-import javax.servlet.http.HttpServletRequest;
-
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-import org.springframework.stereotype.Service;
-
 import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
 import com.vmware.gemfire.tools.pulse.internal.data.Repository;
 import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
 import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
 import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
 
 /**
  * Class MembersListService
@@ -62,7 +61,7 @@ public class MembersListService implements PulseService {
         memberJSON.put("memberId", member.getId());
         memberJSON.put("name", member.getName());
         memberJSON.put("host", member.getHost());
-
+        memberJSON.put("hostnameForClients", member.getHostnameForClients());
         memberListJson.put(memberJSON);
       }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8fd91dde/gemfire-pulse/src/main/webapp/scripts/pulsescript/clusterDetail.js
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/scripts/pulsescript/clusterDetail.js b/gemfire-pulse/src/main/webapp/scripts/pulsescript/clusterDetail.js
index 8a6c08a..a9f1486 100644
--- a/gemfire-pulse/src/main/webapp/scripts/pulsescript/clusterDetail.js
+++ b/gemfire-pulse/src/main/webapp/scripts/pulsescript/clusterDetail.js
@@ -764,26 +764,26 @@ function createMemberGridDefault() {
         width : 740,
         rowNum : 200,
         shrinkToFit : false,
-        colNames : [ 'ID', 'Name', 'Host', 'Heap Usage (MB)', 'CPU Usage (%)',
+        colNames : [ 'ID', 'Name', 'Host', 'Hostname For Clients', 'Heap Usage (MB)', 'CPU Usage (%)',
             'Uptime', 'Clients', 'CurrentHeapSize', 'Load Avg', 'Threads',
             'Sockets'],
         colModel : [
             {
               name : 'memberId',
               index : 'memberId',
-              width : 170,
+              width : 150,
               sorttype : "string",
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject) ;
               },
               sortable : true
             },
             {
               name : 'name',
               index : 'name',
-              width : 150,
+              width : 120,
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "string"
@@ -791,9 +791,19 @@ function createMemberGridDefault() {
             {
               name : 'host',
               index : 'host',
-              width : 100,
+              width : 80,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(val, rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'hostnameForClients',
+              index : 'hostnameForClients',
+              width : 90,
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "string"
@@ -801,10 +811,10 @@ function createMemberGridDefault() {
             {
               name : 'currentHeapUsage',
               index : 'currentHeapUsage',
-              width : 110,
+              width : 100,
               align : 'right',
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "float"
@@ -815,7 +825,7 @@ function createMemberGridDefault() {
               align : 'right',
               width : 100,
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "float"
@@ -825,7 +835,7 @@ function createMemberGridDefault() {
               index : 'uptime',
               width : 100,
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "int"
@@ -836,7 +846,7 @@ function createMemberGridDefault() {
               width : 100,
               align : 'right',
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "int"
@@ -948,7 +958,7 @@ function createMemberGridSG() {
               width : 170,
               sorttype : "string",
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true
             },
@@ -958,7 +968,7 @@ function createMemberGridSG() {
               width : 170,
               sorttype : "string",
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true
             },
@@ -967,7 +977,7 @@ function createMemberGridSG() {
               index : 'name',
               width : 150,
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "string"
@@ -977,7 +987,7 @@ function createMemberGridSG() {
               index : 'host',
               width : 100,
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "string"
@@ -988,7 +998,7 @@ function createMemberGridSG() {
               width : 110,
               align : 'right',
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "float"
@@ -999,7 +1009,7 @@ function createMemberGridSG() {
               align : 'right',
               width : 100,
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "float"
@@ -1009,7 +1019,7 @@ function createMemberGridSG() {
               index : 'uptime',
               width : 100,
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "int"
@@ -1020,7 +1030,7 @@ function createMemberGridSG() {
               width : 100,
               align : 'right',
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "int"
@@ -1132,7 +1142,7 @@ function createMemberGridRZ() {
               width : 170,
               sorttype : "string",
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true
             },
@@ -1142,7 +1152,7 @@ function createMemberGridRZ() {
               width : 170,
               sorttype : "string",
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true
             },
@@ -1151,7 +1161,7 @@ function createMemberGridRZ() {
               index : 'name',
               width : 150,
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "string"
@@ -1161,7 +1171,7 @@ function createMemberGridRZ() {
               index : 'host',
               width : 100,
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "string"
@@ -1172,7 +1182,7 @@ function createMemberGridRZ() {
               width : 110,
               align : 'right',
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "float"
@@ -1183,7 +1193,7 @@ function createMemberGridRZ() {
               align : 'right',
               width : 100,
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "float"
@@ -1193,7 +1203,7 @@ function createMemberGridRZ() {
               index : 'uptime',
               width : 100,
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "int"
@@ -1204,7 +1214,7 @@ function createMemberGridRZ() {
               width : 100,
               align : 'right',
               cellattr : function(rowId, val, rawObject, cm, rdata) {
-                return formMemberGridToolTip(rawObject);
+                return formMemberGridToolTip(val, rawObject);
               },
               sortable : true,
               sorttype : "int"
@@ -1943,8 +1953,8 @@ function buildRZMembersGridData(members) {
 }
 
 // Tool tip for members in grid
-function formMemberGridToolTip(rawObject) {
-  return 'title="Name: ' + rawObject.name + ' , CPU Usage: '
+function formMemberGridToolTip(detail, rawObject) {
+  return 'title="'+detail+ ', CPU Usage: '
   + rawObject.cpuUsage + '% , Heap Usage: '
   + rawObject.currentHeapUsage + 'MB , Load Avg.: '
   + rawObject.loadAvg + ' , Threads: ' + rawObject.threads

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8fd91dde/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseBaseTest.java
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseBaseTest.java b/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseBaseTest.java
index 74cfa8d..f239bb6 100644
--- a/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseBaseTest.java
+++ b/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseBaseTest.java
@@ -221,10 +221,10 @@ public class PulseBaseTest extends PulseTest {
 	public void validateTopologyGridData() {
 		List<WebElement> rzGridRows = driver.findElements(By.xpath("//table[@id='memberList']/tbody/tr"));
 		int rowsCount = rzGridRows.size();
-		String[][] gridDataFromUI = new String[rowsCount][7];
+		String[][] gridDataFromUI = new String[rowsCount][8];
 
 		for (int j = 2, x = 0; j <= rzGridRows.size(); j++, x++) {
-			for (int i = 0; i <= 6; i++) {
+			for (int i = 0; i <= 7; i++) {
 				gridDataFromUI[x][i] = driver.findElement(
 						By.xpath("//table[@id='memberList']/tbody/tr[" + j + "]/td[" + (i + 1) + "]")).getText();
 			}
@@ -248,7 +248,7 @@ public class PulseBaseTest extends PulseTest {
 			Assert.assertEquals(m.getMember(), gridDataFromUI[i][1]);
 			Assert.assertEquals(m.getHost(), gridDataFromUI[i][2]);
 			String cupUsage = String.valueOf(m.getCpuUsage());
-			Assert.assertEquals(cupUsage, gridDataFromUI[i][4]);
+			Assert.assertEquals(cupUsage, gridDataFromUI[i][5]);
 		}
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8fd91dde/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseTest.java
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseTest.java b/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseTest.java
index ec06085..b7e5f1f 100644
--- a/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseTest.java
+++ b/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseTest.java
@@ -407,7 +407,7 @@ public class PulseTest {
     for (int i = 1; i <= 3; i++) {
       Float HeapUsage = Float.parseFloat(driver
           .findElement(
-              By.xpath("//table[@id='memberList']/tbody/tr[" + (i + 1) + "]/td[4]")).getText());
+              By.xpath("//table[@id='memberList']/tbody/tr[" + (i + 1) + "]/td[5]")).getText());
       Float gridHeapUsagestring = Float.parseFloat(JMXProperties.getInstance()
           .getProperty("member.M" + i + ".UsedMemory"));
      Assert.assertEquals(gridHeapUsagestring, HeapUsage);
@@ -418,7 +418,7 @@ public class PulseTest {
   public void testClusterGridViewCPUUsage() {
 	searchByIdAndClick("default_grid_button"); 
     for (int i = 1; i <= 3; i++) {
-      String CPUUsage = driver.findElement(By.xpath("//table[@id='memberList']/tbody/tr[" + (i + 1) + "]/td[5]")).getText();
+      String CPUUsage = driver.findElement(By.xpath("//table[@id='memberList']/tbody/tr[" + (i + 1) + "]/td[6]")).getText();
       String gridCPUUsage = JMXProperties.getInstance().getProperty("member.M" + i + ".cpuUsage");
       gridCPUUsage = gridCPUUsage.trim();
       Assert.assertEquals(gridCPUUsage, CPUUsage);


[12/33] incubator-geode git commit: Fix source header

Posted by ds...@apache.org.
Fix source header


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

Branch: refs/heads/feature/GEODE-831
Commit: 5a65498151f210bf9e0324c70962263da9b24860
Parents: a928ea7
Author: Anthony Baker <ab...@apache.org>
Authored: Thu Feb 11 20:49:26 2016 -0800
Committer: Anthony Baker <ab...@apache.org>
Committed: Thu Feb 11 20:49:26 2016 -0800

----------------------------------------------------------------------
 .../admin/internal/BackupDataStoreHelper.java       | 16 ++++++++++++++++
 .../admin/internal/BackupDataStoreResult.java       | 16 ++++++++++++++++
 2 files changed, 32 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5a654981/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreHelper.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreHelper.java
index d628718..58a66bc 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreHelper.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreHelper.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.gemstone.gemfire.admin.internal;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5a654981/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreResult.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreResult.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreResult.java
index f8a8911..b939f75 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreResult.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreResult.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.gemstone.gemfire.admin.internal;
 
 import java.util.Map;


[18/33] incubator-geode git commit: Bring version format in line

Posted by ds...@apache.org.
Bring version format in line


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

Branch: refs/heads/feature/GEODE-831
Commit: 7c195af2a268cd733d42f3bef83e223944b0ee68
Parents: 28ee7c1
Author: Jens Deppe <jd...@pivotal.io>
Authored: Tue Feb 16 06:55:53 2016 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Tue Feb 16 06:55:53 2016 -0800

----------------------------------------------------------------------
 .../gemfire/management/internal/AgentUtilJUnitTest.java  | 11 ++---------
 .../gemstone/gemfire/management/internal/AgentUtil.java  |  3 +++
 2 files changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7c195af2/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java b/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
index 5437e04..90bda65 100644
--- a/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
+++ b/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
@@ -16,17 +16,10 @@
  */
 package com.gemstone.gemfire.management.internal;
 
-import com.gemstone.gemfire.management.internal.AgentUtil;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
 import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
 import org.junit.Test;
-import org.junit.contrib.java.lang.system.ClearSystemProperties;
-import org.junit.contrib.java.lang.system.RestoreSystemProperties;
 import org.junit.experimental.categories.Category;
-import org.junit.rules.TestRule;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -35,7 +28,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.Properties;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertNotNull;
 
 @Category(IntegrationTest.class)
 public class AgentUtilJUnitTest {
@@ -81,7 +74,7 @@ public class AgentUtilJUnitTest {
     if (inputStream != null) {
       try {
         prop.load(inputStream);
-        version = prop.getProperty("versionNumber")+"-"+prop.getProperty("releaseType");
+        version = prop.getProperty("versionNumber") + prop.getProperty("releaseType");
       } catch (FileNotFoundException e) {
       } catch (IOException e) {
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7c195af2/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java
index 4bfabeb..c030979 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java
@@ -76,6 +76,9 @@ public class AgentUtil {
     // find in the classpath
     String[] possibleFiles = {
             warFilePrefix + "-" + gemfireVersion + ".war",
+            "tools/Pulse/" + warFilePrefix + "-" + gemfireVersion + ".war",
+            "tools/Extensions/" + warFilePrefix + "-" + gemfireVersion + ".war",
+            "lib/" + warFilePrefix + "-" + gemfireVersion + ".war",
             warFilePrefix + ".war"
     };
     for(String possibleFile:possibleFiles){


[24/33] incubator-geode git commit: This closes #94

Posted by ds...@apache.org.
This closes #94


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

Branch: refs/heads/feature/GEODE-831
Commit: 7627585786602b43416d86b9334a95b9550aa3ae
Parents: 71ba8e9 48eafe3
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Tue Feb 16 13:10:26 2016 -0800
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Tue Feb 16 13:10:26 2016 -0800

----------------------------------------------------------------------
 .../internal/QueryFromClauseCanonicalizationJUnitTest.java    | 7 -------
 .../gemfire/cache/query/internal/ResultsBagJUnitTest.java     | 7 -------
 2 files changed, 14 deletions(-)
----------------------------------------------------------------------



[07/33] incubator-geode git commit: GEODE-913: refactor AbstractDistributionConfig

Posted by ds...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index 0cc76ec..0c099fd 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@ -16,19 +16,9 @@
  */
 package com.gemstone.gemfire.distributed.internal;
 
-import java.io.File;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-
 import com.gemstone.gemfire.InternalGemFireException;
 import com.gemstone.gemfire.InvalidValueException;
+import com.gemstone.gemfire.UnmodifiableException;
 import com.gemstone.gemfire.internal.AbstractConfig;
 import com.gemstone.gemfire.internal.ConfigSource;
 import com.gemstone.gemfire.internal.SocketCreator;
@@ -37,6 +27,11 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogWriterImpl;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
 
+import java.lang.reflect.Method;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+
 /**
  * Provides an implementation of <code>DistributionConfig</code> that
  * knows how to read the configuration file.
@@ -54,162 +49,97 @@ public abstract class AbstractDistributionConfig
   extends AbstractConfig
   implements DistributionConfig
 {
-  protected void checkName(String value) {
-    _checkIfModifiable(NAME_NAME);
-  }
-  public boolean isNameModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public boolean isEnableNetworkPartitionDetectionModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public boolean isDisableAutoReconnectModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public boolean isDepartureCorrelationWindowModifiable() {
-    return _modifiableDefault();
-  }
 
-  protected void checkLogFile(File value) {
-    _checkIfModifiable(LOG_FILE_NAME);
-  }
-  public boolean isLogFileModifiable() {
-    return _modifiableDefault();
-  }
+  protected Object checkAttribute(String attName, Object value){
+    // first check to see if this attribute is modifiable, this also checks if the attribute is a valid one.
+    if (!isAttributeModifiable(attName)) {
+      throw new UnmodifiableException(_getUnmodifiableMsg(attName));
+    }
 
-  protected void checkLogLevel(int value) {
-    _checkIfModifiable(LOG_LEVEL_NAME);
-    if (value < MIN_LOG_LEVEL) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {LOG_LEVEL_NAME, Integer.valueOf(value), Integer.valueOf(MIN_LOG_LEVEL)}));
+    ConfigAttribute attribute = attributes.get(attName);
+    if(attribute==null){
+      // isAttributeModifiable already checks the validity of the attName, if reached here, then they
+      // must be those special attributes that starts with ssl_system_props or sys_props, no further checking needed
+      return value;
     }
-    if (value > MAX_LOG_LEVEL) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {LOG_LEVEL_NAME, Integer.valueOf(value), Integer.valueOf(MAX_LOG_LEVEL)}));
+    // for integer attribute, do the range check.
+    if(attribute.type().equals(Integer.class)){
+      Integer intValue = (Integer)value;
+      minMaxCheck(attName, intValue, attribute.min(), attribute.max());
+    }
+
+    Method checker = checkers.get(attName);
+    if(checker==null)
+      return value;
+
+    // if specific checker exists for this attribute, call that with the value
+    try {
+      return checker.invoke(this, value);
+    } catch (Exception e) {
+      if(e instanceof RuntimeException){
+        throw (RuntimeException)e;
+      }
+      if(e.getCause() instanceof RuntimeException){
+        throw (RuntimeException)e.getCause();
+      }
+      else
+        throw new InternalGemFireException("error invoking "+checker.getName()+" with value "+value);
     }
   }
 
-  protected void checkStartLocator(String value) {
-    _checkIfModifiable(START_LOCATOR_NAME);
+
+  protected void minMaxCheck(String propName, int value, int minValue, int maxValue) {
+    if (value < minValue) {
+      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[]{propName, Integer.valueOf(value), Integer.valueOf(minValue)}));
+    } else if (value > maxValue) {
+      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[]{propName, Integer.valueOf(value), Integer.valueOf(maxValue)}));
+    }
+  }
+
+
+  @ConfigAttributeChecker(name=START_LOCATOR_NAME)
+  protected String checkStartLocator(String value) {
     if (value != null && value.trim().length() > 0) {
       // throws IllegalArgumentException if string is malformed
       new DistributionLocatorId(value);
     }
+    return value;
   }
 
-  public boolean isStartLocatorModifiable() {
-    return _modifiableDefault();
-  }
-
-  public boolean isLogLevelModifiable() {
-    return _modifiableDefault();
-  }
 
-  protected void checkTcpPort(int value) {
-    _checkIfModifiable(TCP_PORT_NAME);
-    if (value < MIN_TCP_PORT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {TCP_PORT_NAME, Integer.valueOf(value), Integer.valueOf(MIN_TCP_PORT)}));
-    }
-    if (value > MAX_TCP_PORT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {TCP_PORT_NAME, Integer.valueOf(value), Integer.valueOf(MAX_TCP_PORT)}));
-    }
+  @ConfigAttributeChecker(name=TCP_PORT_NAME)
+  protected int checkTcpPort(int value) {
     if ( getSSLEnabled() && value != 0 ) {
       throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE.toLocalizedString(new Object[] {TCP_PORT_NAME, Integer.valueOf(value), SSL_ENABLED_NAME}));
     }
     if ( getClusterSSLEnabled() && value != 0 ) {
       throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE.toLocalizedString(new Object[] {TCP_PORT_NAME, Integer.valueOf(value), CLUSTER_SSL_ENABLED_NAME}));
     }
-  }
-  public boolean isTcpPortModifiable() {
-    return _modifiableDefault();
+    return value;
   }
 
-  protected void checkMcastPort(int value) {
-    _checkIfModifiable(MCAST_PORT_NAME);
-    if (value < MIN_MCAST_PORT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {MCAST_PORT_NAME, Integer.valueOf(value), Integer.valueOf(MIN_MCAST_PORT)}));
-    }
-    if (value > MAX_MCAST_PORT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {MCAST_PORT_NAME, Integer.valueOf(value), Integer.valueOf(MAX_MCAST_PORT)}));
-    }
+  @ConfigAttributeChecker(name=MCAST_PORT_NAME)
+  protected int checkMcastPort(int value) {
     if ( getSSLEnabled() && value != 0 ) {
       throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE.toLocalizedString(new Object[] {MCAST_PORT_NAME, Integer.valueOf(value), SSL_ENABLED_NAME}));
     }
     if ( getClusterSSLEnabled() && value != 0 ) {
       throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE.toLocalizedString(new Object[] {MCAST_PORT_NAME, Integer.valueOf(value), CLUSTER_SSL_ENABLED_NAME}));
     }
-
-  }
-  public boolean isMcastPortModifiable() {
-    return _modifiableDefault();
+    return value;
   }
 
-  protected void checkMcastAddress(InetAddress value) {
-    _checkIfModifiable(MCAST_ADDRESS_NAME);
+
+  @ConfigAttributeChecker(name=MCAST_ADDRESS_NAME)
+  protected InetAddress checkMcastAddress(InetAddress value) {
     if (!value.isMulticastAddress()) {
       throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_IT_WAS_NOT_A_MULTICAST_ADDRESS.toLocalizedString(new Object[] {MCAST_ADDRESS_NAME, value}));
     }
-  }
-  public boolean isMcastAddressModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkMcastTtl(int value) {
-    _checkIfModifiable(MCAST_TTL_NAME);
-    if (value < MIN_MCAST_TTL) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {MCAST_TTL_NAME, Integer.valueOf(value), Integer.valueOf(MIN_MCAST_TTL)}));
-    }
-    if (value > MAX_MCAST_TTL) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {MCAST_TTL_NAME, Integer.valueOf(value), Integer.valueOf(MAX_MCAST_TTL)}));
-    }
-  }
-  public boolean isMcastTtlModifiable() {
-    return _modifiableDefault();
+    return value;
   }
 
-  protected void checkSocketLeaseTime(int value) {
-    _checkIfModifiable(SOCKET_LEASE_TIME_NAME);
-    if (value < MIN_SOCKET_LEASE_TIME) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {SOCKET_LEASE_TIME_NAME, Integer.valueOf(value), Integer.valueOf(MIN_SOCKET_LEASE_TIME)}));
-    }
-    if (value > MAX_SOCKET_LEASE_TIME) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {SOCKET_LEASE_TIME_NAME, Integer.valueOf(value), Integer.valueOf(MAX_SOCKET_LEASE_TIME)}));
-    }
-  }
-  public boolean isSocketLeaseTimeModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkSocketBufferSize(int value) {
-    _checkIfModifiable(SOCKET_BUFFER_SIZE_NAME);
-    if (value < MIN_SOCKET_BUFFER_SIZE) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {SOCKET_BUFFER_SIZE_NAME, Integer.valueOf(value), Integer.valueOf(MIN_SOCKET_BUFFER_SIZE)}));
-    }
-    if (value > MAX_SOCKET_BUFFER_SIZE) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {SOCKET_BUFFER_SIZE_NAME, Integer.valueOf(value), Integer.valueOf(MAX_SOCKET_BUFFER_SIZE)}));
-    }
-  }
-  public boolean isSocketBufferSizeModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkConserveSockets(boolean value) {
-    _checkIfModifiable(CONSERVE_SOCKETS_NAME);
-  }
-  public boolean isConserveSocketsModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkRoles(String value) {
-    _checkIfModifiable(ROLES_NAME);
-  }
-  public boolean isRolesModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkBindAddress(String value) {
-    _checkIfModifiable(BIND_ADDRESS_NAME);
+  @ConfigAttributeChecker(name=BIND_ADDRESS_NAME)
+  protected String checkBindAddress(String value) {
     if (value != null && value.length() > 0 &&
         !SocketCreator.isLocalHost(value)) {
       throw new IllegalArgumentException(
@@ -217,13 +147,12 @@ public abstract class AbstractDistributionConfig
           .toLocalizedString(new Object[]{value, SocketCreator.getMyAddresses()
           }));
     }
-  }
-  public boolean isBindAddressModifiable() {
-    return _modifiableDefault();
+    return value;
   }
 
-  protected void checkServerBindAddress(String value) {
-    _checkIfModifiable(SERVER_BIND_ADDRESS_NAME);
+
+  @ConfigAttributeChecker(name=SERVER_BIND_ADDRESS_NAME)
+  protected String checkServerBindAddress(String value) {
     if (value != null && value.length() > 0 &&
         !SocketCreator.isLocalHost(value)) {
       throw new IllegalArgumentException(
@@ -231,66 +160,27 @@ public abstract class AbstractDistributionConfig
           .toLocalizedString(new Object[]{value, SocketCreator.getMyAddresses()
           }));
     }
-  }
-  public boolean isServerBindAddressModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkDeployWorkingDir(File value) {
-    _checkIfModifiable(DEPLOY_WORKING_DIR);
-  }
-
-  public boolean isDeployWorkingDirModifiable() {
-    return _modifiableDefault();
-  }
-  
-  protected void checkStatisticSamplingEnabled(boolean value) {
-    _checkIfModifiable(STATISTIC_SAMPLING_ENABLED_NAME);
-  }
-  public boolean isStatisticSamplingEnabledModifiable() {
-    return _modifiableDefault();
+    return value;
   }
 
-  
-  protected void checkStatisticArchiveFile(File value) {
-    _checkIfModifiable(STATISTIC_ARCHIVE_FILE_NAME);
-  }
-  public boolean isStatisticArchiveFileModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkCacheXmlFile(File value) {
-    _checkIfModifiable(CACHE_XML_FILE_NAME);
-  }
-  public boolean isCacheXmlFileModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkSSLEnabled(Boolean value) {
-    _checkIfModifiable(SSL_ENABLED_NAME);
+  @ConfigAttributeChecker(name=SSL_ENABLED_NAME)
+  protected Boolean checkSSLEnabled(Boolean value) {
     if ( value.booleanValue() && (getMcastPort() != 0) ) {
       throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_FALSE_WHEN_2_IS_NOT_0.toLocalizedString(new Object[] {SSL_ENABLED_NAME, value, MCAST_PORT_NAME}));
     }
+    return value;
   }
-  
-  protected void checkClusterSSLEnabled(Boolean value) {
-    _checkIfModifiable(CLUSTER_SSL_ENABLED_NAME);
+
+  @ConfigAttributeChecker(name=CLUSTER_SSL_ENABLED_NAME)
+  protected Boolean checkClusterSSLEnabled(Boolean value) {
     if ( value.booleanValue() && (getMcastPort() != 0) ) {
       throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_FALSE_WHEN_2_IS_NOT_0.toLocalizedString(new Object[] {CLUSTER_SSL_ENABLED_NAME, value, MCAST_PORT_NAME}));
     }
+    return value;
   }
 
-  protected void checkHttpServicePort(int value) {
-    minMaxCheck(HTTP_SERVICE_PORT_NAME, value, 0, 65535);
-  }
-  
-  public boolean isHttpServicePortModifiable() {
-    //Need to set "true" for hydra teststo set REST service port
-    return true;
-  }
-  
-  protected void checkHttpServiceBindAddress(String value) {
-    _checkIfModifiable(HTTP_SERVICE_BIND_ADDRESS_NAME);
+  @ConfigAttributeChecker(name=HTTP_SERVICE_BIND_ADDRESS_NAME)
+  protected String checkHttpServiceBindAddress(String value) {
     if (value != null && value.length() > 0 &&
         !SocketCreator.isLocalHost(value)) {
       throw new IllegalArgumentException(
@@ -298,400 +188,12 @@ public abstract class AbstractDistributionConfig
           .toLocalizedString(new Object[]{value, SocketCreator.getMyAddresses()
           }));
     }
-  }
-  
-  public boolean isHttpServiceBindAddressModifiable() {
-    return _modifiableDefault();
-  }
-  
-  //Add for HTTP Service SSL Start
-  public boolean isHttpServiceSSLEnabledModifiable(){
-    return _modifiableDefault();
-  }
-  
-  public void checkHttpServiceSSL(){
-    _checkIfModifiable(HTTP_SERVICE_SSL_ENABLED_NAME);
+    return value;
   }
 
-  public boolean isHttpServiceSSLRequireAuthenticationModifiable(){
-    return _modifiableDefault();
-  }
-  
-  public void checkHttpServiceSSLRequireAuthentication(){
-    _checkIfModifiable(HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION_NAME);
-  }
-  
-  public boolean isHttpServiceSSLProtocolsModifiable(){
-    return _modifiableDefault();
-  }
-  
-  public void checkHttpServiceSSLProtocols(){
-    _checkIfModifiable(HTTP_SERVICE_SSL_PROTOCOLS_NAME);
-  }
-  
-  public boolean isHttpServiceSSLCiphersModifiable(){
-    return _modifiableDefault();
-  }
-  
-  public void checkHttpServiceSSLCiphers(){
-    _checkIfModifiable(HTTP_SERVICE_SSL_CIPHERS_NAME);
-  }
-  
-  public void checkHttpServiceSSLKeyStore(String value) {
-    _checkIfModifiable(HTTP_SERVICE_SSL_KEYSTORE_NAME);
-  }
-  public boolean isHttpServiceSSLKeyStoreModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkHttpServiceSSLKeyStoreType(String value) {
-    _checkIfModifiable(HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME);
-  }
-  public boolean isHttpServiceSSLKeyStoreTypeModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkHttpServiceSSLKeyStorePassword(String value) {
-    _checkIfModifiable(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME);
-  }
-  public boolean isHttpServiceSSLKeyStorePasswordModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkHttpServiceSSLTrustStore(String value) {
-    _checkIfModifiable(HTTP_SERVICE_SSL_TRUSTSTORE_NAME);
-  }
-  public boolean isHttpServiceSSLTrustStoreModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public boolean isHttpServiceSSLTrustStorePasswordModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkHttpServiceSSLTrustStorePassword(String value) {
-    _checkIfModifiable(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME);
-  }
-  
-//Add for HTTP Service SSL End
-  
-  
-  
-  protected void checkStartDevRestApi() {
-    _checkIfModifiable(START_DEV_REST_API_NAME);
-  }
 
-  @Override
-  public boolean isStartDevRestApiModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public boolean isSSLEnabledModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public boolean isClusterSSLEnabledModifiable() {
-    return _modifiableDefault();
-  }
-  
-  protected void checkSSLProtocols(String value) {
-    _checkIfModifiable(SSL_PROTOCOLS_NAME);
-  }
-  protected void checkClusterSSLProtocols(String value) {
-    _checkIfModifiable(CLUSTER_SSL_PROTOCOLS_NAME);
-  }
-  public boolean isSSLProtocolsModifiable() {
-    return _modifiableDefault();
-  }
-  public boolean isClusterSSLProtocolsModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkSSLCiphers(String value) {
-    _checkIfModifiable(SSL_CIPHERS_NAME);
-  }
-  protected void checkClusterSSLCiphers(String value) {
-    _checkIfModifiable(CLUSTER_SSL_CIPHERS_NAME);
-  }
-  public boolean isSSLCiphersModifiable() {
-    return _modifiableDefault();
-  }
-  public boolean isClusterSSLCiphersModifiable() {
-    return _modifiableDefault();
-  }
-  public void checkSSLRequireAuthentication(Boolean value) {
-    _checkIfModifiable(SSL_REQUIRE_AUTHENTICATION_NAME);
-  }
-  public void checkClusterSSLRequireAuthentication(Boolean value) {
-    _checkIfModifiable(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME);
-  }
-  public boolean isSSLRequireAuthenticationModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public boolean isClusterSSLRequireAuthenticationModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkClusterSSLKeyStore(String value) {
-    _checkIfModifiable(CLUSTER_SSL_KEYSTORE_NAME);
-  }
-  public boolean isClusterSSLKeyStoreModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkClusterSSLKeyStoreType(String value) {
-    _checkIfModifiable(CLUSTER_SSL_KEYSTORE_TYPE_NAME);
-  }
-  public boolean isClusterSSLKeyStoreTypeModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkClusterSSLKeyStorePassword(String value) {
-    _checkIfModifiable(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME);
-  }
-  public boolean isClusterSSLKeyStorePasswordModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkClusterSSLTrustStore(String value) {
-    _checkIfModifiable(CLUSTER_SSL_TRUSTSTORE_NAME);
-  }
-  public boolean isClusterSSLTrustStoreModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkClusterSSLTrustStorePassword(String value) {
-    _checkIfModifiable(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME);
-  }
-  
-  public boolean isClusterSSLTrustStorePasswordModifiable() {
-    return _modifiableDefault();
-  }
-
-  public void checkServerSSLKeyStore(String value) {
-    _checkIfModifiable(SERVER_SSL_KEYSTORE_NAME);
-  }
-  public boolean isServerSSLKeyStoreModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkServerSSLKeyStoreType(String value) {
-    _checkIfModifiable(SERVER_SSL_KEYSTORE_TYPE_NAME);
-  }
-  public boolean isServerSSLKeyStoreTypeModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkServerSSLKeyStorePassword(String value) {
-    _checkIfModifiable(SERVER_SSL_KEYSTORE_PASSWORD_NAME);
-  }
-  public boolean isServerSSLKeyStorePasswordModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkServerSSLTrustStore(String value) {
-    _checkIfModifiable(SERVER_SSL_TRUSTSTORE_NAME);
-  }
-  public boolean isServerSSLTrustStoreModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkServerSSLTrustStorePassword(String value) {
-    _checkIfModifiable(SERVER_SSL_TRUSTSTORE_PASSWORD_NAME);
-  }
-  
-  public boolean isServerSSLTrustStorePasswordModifiable() {
-    return _modifiableDefault();
-  }
-
-  public void checkJmxManagerSSLKeyStore(String value) {
-    _checkIfModifiable(JMX_MANAGER_SSL_KEYSTORE_NAME);
-  }
-  public boolean isJmxManagerSSLKeyStoreModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkJmxManagerSSLKeyStoreType(String value) {
-    _checkIfModifiable(JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME);
-  }
-  public boolean isJmxManagerSSLKeyStoreTypeModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkJmxManagerSSLKeyStorePassword(String value) {
-    _checkIfModifiable(JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME);
-  }
-  public boolean isJmxManagerSSLKeyStorePasswordModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkJmxManagerSSLTrustStore(String value) {
-    _checkIfModifiable(JMX_MANAGER_SSL_TRUSTSTORE_NAME);
-  }
-  public boolean isJmxManagerSSLTrustStoreModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkJmxManagerSSLTrustStorePassword(String value) {
-    _checkIfModifiable(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME);
-  }
-  
-  public boolean isJmxManagerSSLTrustStorePasswordModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkGatewaySSLKeyStore(String value) {
-    _checkIfModifiable(GATEWAY_SSL_KEYSTORE_NAME);
-  }
-  public boolean isGatewaySSLKeyStoreModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkGatewaySSLKeyStoreType(String value) {
-    _checkIfModifiable(GATEWAY_SSL_KEYSTORE_TYPE_NAME);
-  }
-  public boolean isGatewaySSLKeyStoreTypeModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkGatewaySSLKeyStorePassword(String value) {
-    _checkIfModifiable(GATEWAY_SSL_KEYSTORE_PASSWORD_NAME);
-  }
-  public boolean isGatewaySSLKeyStorePasswordModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkGatewaySSLTrustStore(String value) {
-    _checkIfModifiable(GATEWAY_SSL_TRUSTSTORE_NAME);
-  }
-  public boolean isGatewaySSLTrustStoreModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkGatewaySSLTrustStorePassword(String value) {
-    _checkIfModifiable(GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME);
-  }
-  
-  public boolean isGatewaySSLTrustStorePasswordModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public void checkMcastSendBufferSizeModifiable() {
-    _checkIfModifiable(MCAST_SEND_BUFFER_SIZE_NAME);
-  }
-
-  public boolean isMcastSendBufferSizeModifiable() {
-    return _modifiableDefault();
-  }
-
-  public void checkMcastRecvBufferSizeModifiable() {
-    _checkIfModifiable(MCAST_RECV_BUFFER_SIZE_NAME);
-  }
-
-  public boolean isMcastRecvBufferSizeModifiable() {
-    return _modifiableDefault();
-  }
-
-  public void checkMcastFlowControlModifiable() {
-    _checkIfModifiable(MCAST_FLOW_CONTROL_NAME);
-  }
-
-  public boolean isMcastFlowControlModifiable() {
-    return _modifiableDefault();
-  }
-
-  public void checkUdpSendBufferSizeModifiable() {
-    _checkIfModifiable(UDP_SEND_BUFFER_SIZE_NAME);
-  }
-
-  public boolean isUdpSendBufferSizeModifiable() {
-    return _modifiableDefault();
-  }
-
-  public void checkUdpRecvBufferSizeModifiable() {
-    _checkIfModifiable(UDP_RECV_BUFFER_SIZE_NAME);
-  }
-
-  public boolean isUdpRecvBufferSizeModifiable() {
-    return _modifiableDefault();
-  }
-
-  public void checkUdpFragmentSizeModifiable() {
-    _checkIfModifiable(UDP_FRAGMENT_SIZE_NAME);
-  }
-
-  public boolean isUdpFragmentSizeModifiable() {
-    return _modifiableDefault();
-  }
-
-  public void checkDisableTcpModifiable() {
-    _checkIfModifiable(DISABLE_TCP_NAME);
-  }
-
-  public boolean isDisableTcpModifiable() {
-    return _modifiableDefault();
-  }
-
-  public void checkEnableTimeStatisticsModifiable() {
-    _checkIfModifiable(ENABLE_TIME_STATISTICS_NAME);
-  }
-
-  public boolean isEnableTimeStatisticsModifiable() {
-    return _modifiableDefault();
-  }
-
-  public void checkMemberTimeoutModifiable() {
-    _checkIfModifiable(MEMBER_TIMEOUT_NAME);
-  }
-
-  public boolean isMemberTimeoutModifiable() {
-    return _modifiableDefault();
-  }
-
-  public boolean isMembershipPortRangeModifiable() {
-    return _modifiableDefault();
-  }
-
-  public boolean isMaxNumberOfTiesModifiable(){
-    return _modifiableDefault();
-  }
-
-  public boolean isMaxTimeOutModifiable(){
-    return _modifiableDefault();
-  }
-
-  protected void checkStatisticSampleRate(int value) {
-    _checkIfModifiable(STATISTIC_SAMPLE_RATE_NAME);
-    if (value < MIN_STATISTIC_SAMPLE_RATE) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {STATISTIC_SAMPLE_RATE_NAME, Integer.valueOf(value), Integer.valueOf(MIN_STATISTIC_SAMPLE_RATE)}));
-    }
-    if (value > MAX_STATISTIC_SAMPLE_RATE) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {STATISTIC_SAMPLE_RATE_NAME, Integer.valueOf(value), Integer.valueOf(MAX_STATISTIC_SAMPLE_RATE)}));
-    }
-  }
-  public boolean isStatisticSampleRateModifiable() {
-    return _modifiableDefault();
-  }
-
-  public boolean isDeltaPropagationModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkDeltaPropagationModifiable() {
-    _checkIfModifiable(DELTA_PROPAGATION_PROP_NAME);
-  }
-  
-  protected String checkRemoteLocators(String value) {
-    _checkIfModifiable(REMOTE_LOCATORS_NAME);
-    return value ;
-  }
-  
-  public boolean isDistributedSystemIdModifiable() {
-    return _modifiableDefault();
-  }
-  
-  protected void checkDistributedSystemId(int value) {
-    _checkIfModifiable(DISTRIBUTED_SYSTEM_ID_NAME);
+  @ConfigAttributeChecker(name=DISTRIBUTED_SYSTEM_ID_NAME)
+  protected int checkDistributedSystemId(int value) {
     String distributedSystemListener = System
     .getProperty("gemfire.DistributedSystemListener");
     //this check is specific for Jayesh's use case of WAN BootStraping
@@ -707,51 +209,20 @@ public abstract class AbstractDistributionConfig
     if (value > MAX_DISTRIBUTED_SYSTEM_ID) {
       throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {DISTRIBUTED_SYSTEM_ID_NAME, Integer.valueOf(value), Integer.valueOf(MAX_DISTRIBUTED_SYSTEM_ID)}));
     }
+    return value;
   }
 
-  public boolean isEnforceUniqueHostModifiable() {
-    return _modifiableDefault();
-  }
-  
-  protected void checkEnforceUniqueHostModifiable() {
-    _checkIfModifiable(ENFORCE_UNIQUE_HOST_NAME);
-  }
-  
-  public boolean isRedundancyZoneModifiable() {
-    return _modifiableDefault();
-  }
-  
-  protected void checkRedundancyZoneModifiable() {
-    _checkIfModifiable(REDUNDANCY_ZONE_NAME);
-  }
-  
-  protected void checkSSLPropertyModifiable() {
-    _checkIfModifiable(SSL_SYSTEM_PROPS_NAME);
-  }
-  
-  protected boolean isSSLPropertyModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkUserCommandPackages(String value) {
-    _checkIfModifiable(USER_COMMAND_PACKAGES);
-  }
-
-  public boolean isUserCommandPackagesModifiable() {
-    return _modifiableDefault();
-  }
-  
   /**
    * Makes sure that the locator string used to configure discovery is
    * valid.
-   * 
+   *
    * <p>Starting in 4.0, we accept locators in the format
    * "host:port" in addition to the traditional "host:bind-address[port]" format.
    * See bug 32306.
-   * 
+   *
    * <p>Starting in 5.1.0.4, we accept locators in the format
    * "host@bind-address[port]" to allow use of numeric IPv6 addresses
-   * 
+   *
    * @return The locator string in the traditional "host:bind-address[port]"
    *         format.
    *
@@ -759,9 +230,8 @@ public abstract class AbstractDistributionConfig
    *         If <code>value</code> is not a valid locator
    *         configuration
    */
+  @ConfigAttributeChecker(name=LOCATORS_NAME)
   protected String checkLocators(String value) {
-    _checkIfModifiable(LOCATORS_NAME);
-
     // validate locators value
     StringBuffer sb = new StringBuffer();
 
@@ -784,7 +254,7 @@ public abstract class AbstractDistributionConfig
       // starting in 5.1.0.4 we allow '@' as the bind-addr separator
       // to let people use IPv6 numeric addresses (which contain colons)
       int bindAddrIdx = locator.lastIndexOf('@', portIndex - 1);
-      
+
       if (bindAddrIdx < 0) {
         bindAddrIdx = locator.lastIndexOf(':', portIndex - 1);
       }
@@ -870,123 +340,9 @@ public abstract class AbstractDistributionConfig
     return sb.toString();
   }
 
-  public boolean isLocatorsModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public boolean isLocatorWaitTimeModifiable() {
-    return _modifiableDefault();
-  }
-
-  public boolean isRemoteLocatorsModifiable() {
-    return _modifiableDefault();
-  }
-  
-  protected void checkAckWaitThreshold(int value) {
-    _checkIfModifiable(ACK_WAIT_THRESHOLD_NAME);
-    if (value < MIN_ACK_WAIT_THRESHOLD) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {ACK_WAIT_THRESHOLD_NAME, Integer.valueOf(value), Integer.valueOf(MIN_ACK_WAIT_THRESHOLD)}));
-    }
-    if (value > MAX_ACK_WAIT_THRESHOLD) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {ACK_WAIT_THRESHOLD_NAME, Integer.valueOf(value), Integer.valueOf(MAX_ACK_WAIT_THRESHOLD)}));
-    }
-  }
-  public boolean isAckWaitThresholdModifiable() {
-    return _modifiableDefault();
-  }
-
-
-  protected void checkAckSevereAlertThreshold(int value) {
-    _checkIfModifiable(ACK_SEVERE_ALERT_THRESHOLD_NAME);
-    if (value < MIN_ACK_SEVERE_ALERT_THRESHOLD) {
-      throw new IllegalArgumentException("Could not set \"" + ACK_SEVERE_ALERT_THRESHOLD_NAME + "\" to \"" + value + "\" because its value can not be less than \"" + MIN_ACK_SEVERE_ALERT_THRESHOLD + "\".");
-    }
-    if (value > MAX_ACK_SEVERE_ALERT_THRESHOLD) {
-      throw new IllegalArgumentException("Could not set \"" + ACK_SEVERE_ALERT_THRESHOLD_NAME + "\" to \"" + value + "\" because its value can not be greater than \"" + MAX_ACK_SEVERE_ALERT_THRESHOLD + "\".");
-    }
-  }
-  public boolean isAckSevereAlertThresholdModifiable() {
-    return _modifiableDefault();
-  }
-
-
-  public boolean isArchiveFileSizeLimitModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkArchiveFileSizeLimit(int value) {
-    _checkIfModifiable(ARCHIVE_FILE_SIZE_LIMIT_NAME);
-    if (value < MIN_ARCHIVE_FILE_SIZE_LIMIT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {ARCHIVE_FILE_SIZE_LIMIT_NAME, Integer.valueOf(value), Integer.valueOf(MIN_ARCHIVE_FILE_SIZE_LIMIT)}));
-    }
-    if (value > MAX_ARCHIVE_FILE_SIZE_LIMIT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {ARCHIVE_FILE_SIZE_LIMIT_NAME, Integer.valueOf(value), Integer.valueOf(MAX_ARCHIVE_FILE_SIZE_LIMIT)}));
-    }
-  }
-  public boolean isArchiveDiskSpaceLimitModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkArchiveDiskSpaceLimit(int value) {
-    _checkIfModifiable(ARCHIVE_DISK_SPACE_LIMIT_NAME);
-    if (value < MIN_ARCHIVE_DISK_SPACE_LIMIT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {ARCHIVE_DISK_SPACE_LIMIT_NAME, Integer.valueOf(value), Integer.valueOf(MIN_ARCHIVE_DISK_SPACE_LIMIT)}));
-    }
-    if (value > MAX_ARCHIVE_DISK_SPACE_LIMIT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {ARCHIVE_DISK_SPACE_LIMIT_NAME, Integer.valueOf(value), Integer.valueOf(MAX_ARCHIVE_DISK_SPACE_LIMIT)}));
-    }
-  }
-  public boolean isLogFileSizeLimitModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkLogFileSizeLimit(int value) {
-    _checkIfModifiable(LOG_FILE_SIZE_LIMIT_NAME);
-    if (value < MIN_LOG_FILE_SIZE_LIMIT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {LOG_FILE_SIZE_LIMIT_NAME, Integer.valueOf(value), Integer.valueOf(MIN_LOG_FILE_SIZE_LIMIT)}));
-    }
-    if (value > MAX_LOG_FILE_SIZE_LIMIT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {LOG_FILE_SIZE_LIMIT_NAME, Integer.valueOf(value), Integer.valueOf(MAX_LOG_FILE_SIZE_LIMIT)}));
-    }
-  }
-  public boolean isLogDiskSpaceLimitModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkLogDiskSpaceLimit(int value) {
-    _checkIfModifiable(LOG_DISK_SPACE_LIMIT_NAME);
-    if (value < MIN_LOG_DISK_SPACE_LIMIT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {LOG_DISK_SPACE_LIMIT_NAME, Integer.valueOf(value), Integer.valueOf(MIN_LOG_DISK_SPACE_LIMIT)}));
-    }
-    if (value > MAX_LOG_DISK_SPACE_LIMIT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {LOG_DISK_SPACE_LIMIT_NAME, Integer.valueOf(value), Integer.valueOf(MAX_LOG_DISK_SPACE_LIMIT)}));
-    }
-  }
-
-  /** a generic method for checking a new integer setting against a min
-      and max value */
-  protected void minMaxCheck(String propName, int value, int minValue, int maxValue) {
-    _checkIfModifiable(propName);
-    if (value < minValue) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {propName, Integer.valueOf(value), Integer.valueOf(minValue)}));
-    }
-    else if (value > maxValue) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {propName, Integer.valueOf(value), Integer.valueOf(maxValue)}));
-    }
-  }
-
-
-  /** check a new multicast send-buffer size setting */
-  protected void checkMcastSendBufferSize(int newSize) {
-    minMaxCheck(MCAST_SEND_BUFFER_SIZE_NAME, newSize,
-      MIN_MCAST_SEND_BUFFER_SIZE, Integer.MAX_VALUE);
-  }
-
-  /** check a new multicast recv-buffer size setting */
-  protected void checkMcastRecvBufferSize(int newSize) {
-    minMaxCheck(MCAST_RECV_BUFFER_SIZE_NAME, newSize,
-      MIN_MCAST_RECV_BUFFER_SIZE, Integer.MAX_VALUE);
-  }
-
   /** check a new mcast flow-control setting */
-  protected void checkMcastFlowControl(FlowControlParams params) {
-    _checkIfModifiable(MCAST_FLOW_CONTROL_NAME);
+  @ConfigAttributeChecker(name=MCAST_FLOW_CONTROL_NAME)
+  protected FlowControlParams checkMcastFlowControl(FlowControlParams params) {
     int value = params.getByteAllowance();
     if (value < MIN_FC_BYTE_ALLOWANCE) {
       throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_BYTEALLOWANCE_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {MCAST_FLOW_CONTROL_NAME, Integer.valueOf(value), Integer.valueOf(MIN_FC_BYTE_ALLOWANCE)}));
@@ -1005,33 +361,12 @@ public abstract class AbstractDistributionConfig
     else if (value > MAX_FC_RECHARGE_BLOCK_MS) {
       throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_RECHARGEBLOCKMS_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {MCAST_FLOW_CONTROL_NAME, Integer.valueOf(value), Integer.valueOf(MAX_FC_RECHARGE_BLOCK_MS)}));
     }
+    return params;
   }
 
-  /** check a new udp message fragment size setting */
-  protected void checkUdpFragmentSize(int value) {
-    minMaxCheck(UDP_FRAGMENT_SIZE_NAME, value,
-      MIN_UDP_FRAGMENT_SIZE, MAX_UDP_FRAGMENT_SIZE);
-  }
-
-  /** check a new udp send-buffer size setting */
-  protected void checkUdpSendBufferSize(int newSize) {
-    minMaxCheck(UDP_SEND_BUFFER_SIZE_NAME, newSize,
-      MIN_UDP_SEND_BUFFER_SIZE, Integer.MAX_VALUE);
-  }
-
-  /** check a new multicast recv-buffer size setting */
-  protected void checkUdpRecvBufferSize(int newSize) {
-    minMaxCheck(UDP_RECV_BUFFER_SIZE_NAME, newSize,
-      MIN_UDP_RECV_BUFFER_SIZE, Integer.MAX_VALUE);
-  }
-
-  /** check a new member-timeout setting */
-  protected void checkMemberTimeout(int value) {
-    minMaxCheck(MEMBER_TIMEOUT_NAME, value,
-      MIN_MEMBER_TIMEOUT, MAX_MEMBER_TIMEOUT);
-  }
 
-  protected void checkMembershipPortRange(int[] value) {
+  @ConfigAttributeChecker(name=MEMBERSHIP_PORT_RANGE_NAME)
+  protected int[] checkMembershipPortRange(int[] value) {
     minMaxCheck(MEMBERSHIP_PORT_RANGE_NAME, value[0],
         DEFAULT_MEMBERSHIP_PORT_RANGE[0],
         value[1]);
@@ -1045,117 +380,36 @@ public abstract class AbstractDistributionConfig
       throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.
           toLocalizedString(new Object[] {MEMBERSHIP_PORT_RANGE_NAME, value[0]+"-"+value[1], Integer.valueOf(3)}));
     }
+    return value;
   }
 
 
-  public boolean isAsyncDistributionTimeoutModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkAsyncDistributionTimeout(int value) {
-    _checkIfModifiable(ASYNC_DISTRIBUTION_TIMEOUT_NAME);
-    if (value < MIN_ASYNC_DISTRIBUTION_TIMEOUT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {ASYNC_DISTRIBUTION_TIMEOUT_NAME, Integer.valueOf(value), Integer.valueOf(MIN_ASYNC_DISTRIBUTION_TIMEOUT)}));
-    }
-    if (value > MAX_ASYNC_DISTRIBUTION_TIMEOUT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {ASYNC_DISTRIBUTION_TIMEOUT_NAME, Integer.valueOf(value), Integer.valueOf(MAX_ASYNC_DISTRIBUTION_TIMEOUT)}));
-    }
-  }
-  public boolean isAsyncQueueTimeoutModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkAsyncQueueTimeout(int value) {
-    _checkIfModifiable(ASYNC_QUEUE_TIMEOUT_NAME);
-    if (value < MIN_ASYNC_QUEUE_TIMEOUT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {ASYNC_QUEUE_TIMEOUT_NAME, Integer.valueOf(value), Integer.valueOf(MIN_ASYNC_QUEUE_TIMEOUT)}));
-    }
-    if (value > MAX_ASYNC_QUEUE_TIMEOUT) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {ASYNC_QUEUE_TIMEOUT_NAME, Integer.valueOf(value), Integer.valueOf(MAX_ASYNC_QUEUE_TIMEOUT)}));
-    }
-  }
-  public boolean isAsyncMaxQueueSizeModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkAsyncMaxQueueSize(int value) {
-    _checkIfModifiable(ASYNC_MAX_QUEUE_SIZE_NAME);
-    if (value < MIN_ASYNC_MAX_QUEUE_SIZE) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {ASYNC_MAX_QUEUE_SIZE_NAME, Integer.valueOf(value), Integer.valueOf(MIN_ASYNC_MAX_QUEUE_SIZE)}));
-    }
-    if (value > MAX_ASYNC_MAX_QUEUE_SIZE) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {ASYNC_MAX_QUEUE_SIZE_NAME, Integer.valueOf(value), Integer.valueOf(MAX_ASYNC_MAX_QUEUE_SIZE)}));
-    }
-  }
-
   /** @since 5.7 */
-  protected void checkClientConflation(String value) {
+  @ConfigAttributeChecker(name=CLIENT_CONFLATION_PROP_NAME)
+  protected String checkClientConflation(String value) {
     if (! (value.equals(CLIENT_CONFLATION_PROP_VALUE_DEFAULT) ||
             value.equals(CLIENT_CONFLATION_PROP_VALUE_ON) ||
               value.equals(CLIENT_CONFLATION_PROP_VALUE_OFF)) ) {
       throw new IllegalArgumentException("Could not set \"" + CLIENT_CONFLATION_PROP_NAME + "\" to \"" + value + "\" because its value is not recognized");
     }
-  }
-  
-  /** @since 5.7 */
-  public boolean isClientConflationModifiable() {
-    return _modifiableDefault();
-  }
-  
-  protected void checkDurableClientId(String value) {
-    _checkIfModifiable(DURABLE_CLIENT_ID_NAME);
-  }
-
-  public boolean isDurableClientIdModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkDurableClientTimeout(int value) {
-    _checkIfModifiable(DURABLE_CLIENT_TIMEOUT_NAME);
+    return value;
   }
 
-  public boolean isDurableClientTimeoutModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkSecurityClientAuthInit(String value) {
-    _checkIfModifiable(SECURITY_CLIENT_AUTH_INIT_NAME);
-  }
-
-  public boolean isSecurityClientAuthInitModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkSecurityClientAuthenticator(String value) {
-    _checkIfModifiable(SECURITY_CLIENT_AUTHENTICATOR_NAME);
-  }
-
-  public boolean isSecurityClientAuthenticatorModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkSecurityClientDHAlgo(String value) {
-    _checkIfModifiable(SECURITY_CLIENT_DHALGO_NAME);
-  }
-
-  public boolean isSecurityClientDHAlgoModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkSecurityPeerAuthInit(String value) {
-    _checkIfModifiable(SECURITY_PEER_AUTH_INIT_NAME);
+  @ConfigAttributeChecker(name=SECURITY_PEER_AUTH_INIT_NAME)
+  protected String checkSecurityPeerAuthInit(String value) {
     if (value != null && value.length() > 0 && getMcastPort() != 0) {
       String mcastInfo = MCAST_PORT_NAME + "[" + getMcastPort() + "]";
       throw new IllegalArgumentException(
         LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_2_MUST_BE_0_WHEN_SECURITY_IS_ENABLED
-          .toLocalizedString(new Object[] { 
+          .toLocalizedString(new Object[] {
              SECURITY_PEER_AUTH_INIT_NAME, value, mcastInfo }));
     }
+    return value;
   }
 
-  public boolean isSecurityPeerAuthInitModifiable() {
-    return _modifiableDefault();
-  }
 
-  protected void checkSecurityPeerAuthenticator(String value) {
-    _checkIfModifiable(SECURITY_PEER_AUTHENTICATOR_NAME);
+  @ConfigAttributeChecker(name=SECURITY_PEER_AUTHENTICATOR_NAME)
+  protected String checkSecurityPeerAuthenticator(String value) {
     if (value != null && value.length() > 0 && getMcastPort() != 0) {
        String mcastInfo = MCAST_PORT_NAME + "[" + getMcastPort() + "]";
       throw new IllegalArgumentException(
@@ -1166,219 +420,49 @@ public abstract class AbstractDistributionConfig
             value,
             mcastInfo}));
     }
+    return value;
   }
 
-  public boolean isSecurityPeerAuthenticatorModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkSecurityClientAccessor(String value) {
-    _checkIfModifiable(SECURITY_CLIENT_ACCESSOR_NAME);
-  }
-
-  public boolean isSecurityClientAccessorModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkSecurityClientAccessorPP(String value) {
-    _checkIfModifiable(SECURITY_CLIENT_ACCESSOR_PP_NAME);
-  }
-
-  public boolean isSecurityClientAccessorPPModifiable() {
-    return _modifiableDefault();
-  }
 
-  protected void checkSecurityLogLevel(int value) {
-    _checkIfModifiable(SECURITY_LOG_LEVEL_NAME);
+  @ConfigAttributeChecker(name=SECURITY_LOG_LEVEL_NAME)
+  protected int checkSecurityLogLevel(int value) {
     if (value < MIN_LOG_LEVEL) {
       throw new IllegalArgumentException(
         LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(
-          new Object[] { 
-              SECURITY_LOG_LEVEL_NAME, 
-              LogWriterImpl.levelToString(value), 
+          new Object[] {
+              SECURITY_LOG_LEVEL_NAME,
+              LogWriterImpl.levelToString(value),
               LogWriterImpl.levelToString(MIN_LOG_LEVEL)}));
     }
     if (value > MAX_LOG_LEVEL) {
       throw new IllegalArgumentException(
         LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(
-        new Object[] { 
-            SECURITY_LOG_LEVEL_NAME, 
-            LogWriterImpl.levelToString(value), 
+        new Object[] {
+            SECURITY_LOG_LEVEL_NAME,
+            LogWriterImpl.levelToString(value),
             LogWriterImpl.levelToString(MAX_LOG_LEVEL)}));
     }
+    return value;
   }
 
-  public boolean isSecurityLogLevelModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkSecurityLogFile(File value) {
-    _checkIfModifiable(SECURITY_LOG_FILE_NAME);
-  }
-
-  public boolean isSecurityLogFileModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkSecurityPeerMembershipTimeout(int value) {
-    _checkIfModifiable(SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME);
-    minMaxCheck(SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME, value,
-        0, MAX_SECURITY_PEER_VERIFYMEMBER_TIMEOUT);
-  }
-  
-  public boolean isSecurityPeerMembershipTimeoutModifiable() {
-    return _modifiableDefault();
-  }
-  
-  protected void checkSecurity(String key, String value) {
-    _checkIfModifiable(key);
-  }
-
-  public boolean isSecurityModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkRemoveUnresponsiveClientModifiable() { 
-    _checkIfModifiable(REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME); 
-  } 
-
-  public boolean isRemoveUnresponsiveClientModifiable() { 
-    return _modifiableDefault(); 
-  } 
- 
-  /**
-   * @since 7.0
-   */
-  protected void checkGroups(String value) {
-    _checkIfModifiable(GROUPS_NAME);
-  }
-  /**
-   * @since 7.0
-   */
-  public boolean isGroupsModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkJmxManager() {
-    _checkIfModifiable(JMX_MANAGER_NAME);
-  }
-  @Override
-  public boolean isJmxManagerModifiable() {
-    return _modifiableDefault();
-  }
-
-  protected void checkJmxManagerStart() {
-    _checkIfModifiable(JMX_MANAGER_START_NAME);
-  }
-  @Override
-  public boolean isJmxManagerStartModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkJmxSSLManagerEnabled() {
-    _checkIfModifiable(JMX_MANAGER_SSL_NAME);
-  }
-  protected void checkJmxManagerSSLEnabled() {
-    _checkIfModifiable(JMX_MANAGER_SSL_ENABLED_NAME);
-  }
-  public boolean isJmxManagerSSLEnabledModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkJmxManagerSSLCiphers() {
-    _checkIfModifiable(JMX_MANAGER_SSL_CIPHERS_NAME);
-  }
-  public boolean isJmxManagerSSLCiphersModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkJmxManagerSSLProtocols() {
-    _checkIfModifiable(JMX_MANAGER_SSL_PROTOCOLS_NAME);
-  }
-  public boolean isJmxManagerSSLProtocolsModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkJmxManagerSSLRequireAuthentication() {
-    _checkIfModifiable(JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION_NAME);
-  }
-  public boolean isJmxManagerSSLRequireAuthenticationModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkJmxManagerPort(int value) {
-    minMaxCheck(JMX_MANAGER_PORT_NAME, value, 0, 65535);
-  }
-  @Override
-  public boolean isJmxManagerPortModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkJmxManagerBindAddress(String value) {
-    _checkIfModifiable(JMX_MANAGER_BIND_ADDRESS_NAME);
-  }
-  @Override
-  public boolean isJmxManagerBindAddressModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkJmxManagerHostnameForClients(String value) {
-    _checkIfModifiable(JMX_MANAGER_HOSTNAME_FOR_CLIENTS_NAME);
-  }
-  @Override
-  public boolean isJmxManagerHostnameForClientsModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkJmxManagerPasswordFile(String value) {
-    _checkIfModifiable(JMX_MANAGER_PASSWORD_FILE_NAME);
-  }
-  @Override
-  public boolean isJmxManagerPasswordFileModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkJmxManagerAccessFile(String value) {
-    _checkIfModifiable(JMX_MANAGER_ACCESS_FILE_NAME);
-  }
-  @Override
-  public boolean isJmxManagerAccessFileModifiable() {
-    return _modifiableDefault();
-  }
-  @Override
-  public boolean isJmxManagerHttpPortModifiable() {
-    //return _modifiableDefault();
-    return isHttpServicePortModifiable();
-  }
-  protected void checkJmxManagerHttpPort(int value) {
-    minMaxCheck(JMX_MANAGER_HTTP_PORT_NAME, value, 0, 65535);
-  }
-  protected void checkJmxManagerUpdateRate(int value) {
-    _checkIfModifiable(JMX_MANAGER_UPDATE_RATE_NAME);
-    if (value < MIN_JMX_MANAGER_UPDATE_RATE) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {JMX_MANAGER_UPDATE_RATE_NAME, Integer.valueOf(value), Integer.valueOf(MIN_JMX_MANAGER_UPDATE_RATE)}));
-    }
-    if (value > MAX_JMX_MANAGER_UPDATE_RATE) {
-      throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {JMX_MANAGER_UPDATE_RATE_NAME, Integer.valueOf(value), Integer.valueOf(MAX_JMX_MANAGER_UPDATE_RATE)}));
-    }
-  }
-  @Override
-  public boolean isJmxManagerUpdateRateModifiable() {
-    return _modifiableDefault();
-  }
-  protected void checkMemcachedPort(int value) {
-    minMaxCheck(MEMCACHED_PORT_NAME, value, 0, 65535);
-  }
-  public boolean isMemcachedPortModifiable() {
-    return _modifiableDefault();
-  }
 
-  protected void checkMemcachedProtocol(String protocol) {
+  @ConfigAttributeChecker(name=MEMCACHED_PROTOCOL_NAME)
+  protected String checkMemcachedProtocol(String protocol) {
     if (protocol == null
         || (!protocol.equalsIgnoreCase(GemFireMemcachedServer.Protocol.ASCII.name()) &&
             !protocol.equalsIgnoreCase(GemFireMemcachedServer.Protocol.BINARY.name()))) {
       throw new IllegalArgumentException(LocalizedStrings.
           AbstractDistributionConfig_MEMCACHED_PROTOCOL_MUST_BE_ASCII_OR_BINARY.toLocalizedString());
     }
+    return protocol;
   }
 
   public boolean isMemcachedProtocolModifiable() {
     return false;
   }
-  
-  protected void checkMemcachedBindAddress(String value) {
-    _checkIfModifiable(MEMCACHED_BIND_ADDRESS_NAME);
+
+  @ConfigAttributeChecker(name=MEMCACHED_BIND_ADDRESS_NAME)
+  protected String checkMemcachedBindAddress(String value) {
     if (value != null && value.length() > 0 &&
         !SocketCreator.isLocalHost(value)) {
       throw new IllegalArgumentException(
@@ -1386,92 +470,23 @@ public abstract class AbstractDistributionConfig
           .toLocalizedString(new Object[]{value, SocketCreator.getMyAddresses()
           }));
     }
+    return value;
   }
-  public boolean isMemcachedBindAddressModifiable() {
-    return _modifiableDefault();
-  }
-  
-  protected void checkRedisPort(int value) {
-    minMaxCheck(REDIS_PORT_NAME, value, 0, 65535);
-  }
-  protected void checkRedisBindAddress(String value) {
-    _checkIfModifiable(REDIS_BIND_ADDRESS_NAME);
+
+  @ConfigAttributeChecker(name=REDIS_BIND_ADDRESS_NAME)
+  protected String checkRedisBindAddress(String value) {
     if (value != null && value.length() > 0 &&
-        !SocketCreator.isLocalHost(value)) {
+            !SocketCreator.isLocalHost(value)) {
       throw new IllegalArgumentException(
-          LocalizedStrings.AbstractDistributionConfig_REDIS_BIND_ADDRESS_0_INVALID_MUST_BE_IN_1
-          .toLocalizedString(new Object[]{value, SocketCreator.getMyAddresses()
-          }));
+              LocalizedStrings.AbstractDistributionConfig_REDIS_BIND_ADDRESS_0_INVALID_MUST_BE_IN_1
+                      .toLocalizedString(new Object[]{value, SocketCreator.getMyAddresses()
+                      }));
     }
-  }
-  
-  protected void checkRedisPassword(String value) {
-    
-  }
-  
-  public boolean isRedisBindAddressModifiable() {
-    return _modifiableDefault();
-  }
-
-  public boolean isRedisPortModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public boolean isRedisPasswordModifiable() {
-    return _modifiableDefault();
-  }
-
-  public boolean isOffHeapMemorySizeModifiable() {
-    return _modifiableDefault();
-  }
-  
-  protected void checkOffHeapMemorySize(String value) {
-    _checkIfModifiable(OFF_HEAP_MEMORY_SIZE_NAME);
-  }
-  
-  protected void checkEnableSharedConfiguration() {
-    _checkIfModifiable(ENABLE_CLUSTER_CONFIGURATION_NAME);
-  }
-  
-  protected void checkUseSharedConfiguration() {
-    _checkIfModifiable(USE_CLUSTER_CONFIGURATION_NAME);
-  }
-  
-  protected void checkLoadSharedConfigFromDir() {
-    _checkIfModifiable(LOAD_CLUSTER_CONFIG_FROM_DIR_NAME);
-  }
-  
-  protected void checkClusterConfigDir() {
-    _checkIfModifiable(CLUSTER_CONFIGURATION_DIR);
-  }
-  
-  
-  public boolean isEnableSharedConfigurationModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public boolean isLoadSharedConfigFromDirModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public boolean isUseSharedConfigurationModifiable() {
-    return _modifiableDefault();
+    return value;
   }
 
-  public boolean isLockMemoryModifiable() {
-    return _modifiableDefault();
-  }
-  
-  public boolean isDistributedTransactionsModifiable() {
-    return _modifiableDefault();
-  }
-  
-  protected void checkLockMemory(final boolean value) {
-    _checkIfModifiable(LOCK_MEMORY_NAME);
-  }
-    
   // AbstractConfig overriding methods
-  
+
   @Override
   protected void checkAttributeName(String attName) {
     if(!attName.startsWith(SECURITY_PREFIX_NAME) && !attName.startsWith(USERDEFINED_PREFIX_NAME)
@@ -1479,1308 +494,149 @@ public abstract class AbstractDistributionConfig
       super.checkAttributeName(attName);
     }
   }
-  
-  
-  
-  // AbstractDistributionConfig methods
-
-  static final String[] dcValidAttributeNames;
-  static {
-    String[] myAtts = new String[] {
-      ACK_WAIT_THRESHOLD_NAME,
-      ACK_SEVERE_ALERT_THRESHOLD_NAME,
-      ARCHIVE_DISK_SPACE_LIMIT_NAME,
-      ARCHIVE_FILE_SIZE_LIMIT_NAME,
-      BIND_ADDRESS_NAME,
-      SERVER_BIND_ADDRESS_NAME,
-      CACHE_XML_FILE_NAME,
-      DEPLOY_WORKING_DIR,
-      LOG_DISK_SPACE_LIMIT_NAME,
-      LOG_FILE_NAME,
-      LOG_FILE_SIZE_LIMIT_NAME,
-      LOG_LEVEL_NAME, LOCATORS_NAME, LOCATOR_WAIT_TIME_NAME, REMOTE_LOCATORS_NAME,
-      MCAST_ADDRESS_NAME, MCAST_PORT_NAME, MCAST_TTL_NAME,
-      MCAST_SEND_BUFFER_SIZE_NAME, MCAST_RECV_BUFFER_SIZE_NAME,
-      MCAST_FLOW_CONTROL_NAME,
-      TCP_PORT_NAME,
-      SOCKET_LEASE_TIME_NAME, SOCKET_BUFFER_SIZE_NAME, CONSERVE_SOCKETS_NAME,
-      NAME_NAME,
-      ROLES_NAME,
-      STATISTIC_ARCHIVE_FILE_NAME, STATISTIC_SAMPLE_RATE_NAME,
-      STATISTIC_SAMPLING_ENABLED_NAME,
-      SSL_ENABLED_NAME,
-      SSL_PROTOCOLS_NAME,
-      SSL_CIPHERS_NAME,
-      SSL_REQUIRE_AUTHENTICATION_NAME,
-      CLUSTER_SSL_ENABLED_NAME,
-      CLUSTER_SSL_PROTOCOLS_NAME,
-      CLUSTER_SSL_CIPHERS_NAME,
-      CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME,
-      CLUSTER_SSL_KEYSTORE_NAME,CLUSTER_SSL_KEYSTORE_TYPE_NAME,CLUSTER_SSL_KEYSTORE_PASSWORD_NAME,CLUSTER_SSL_TRUSTSTORE_NAME,CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME,
-      UDP_SEND_BUFFER_SIZE_NAME, UDP_RECV_BUFFER_SIZE_NAME, UDP_FRAGMENT_SIZE_NAME,
-      DISABLE_TCP_NAME,
-      ENABLE_TIME_STATISTICS_NAME,
-      MEMBER_TIMEOUT_NAME,
-      MEMBERSHIP_PORT_RANGE_NAME,
-      MAX_WAIT_TIME_FOR_RECONNECT_NAME,
-      MAX_NUM_RECONNECT_TRIES,
-      ASYNC_DISTRIBUTION_TIMEOUT_NAME,
-      ASYNC_QUEUE_TIMEOUT_NAME,
-      ASYNC_MAX_QUEUE_SIZE_NAME,
-      START_LOCATOR_NAME,
-      CLIENT_CONFLATION_PROP_NAME,
-      DURABLE_CLIENT_ID_NAME,
-      DURABLE_CLIENT_TIMEOUT_NAME,
-//      DURABLE_CLIENT_KEEP_ALIVE_NAME,
-      ENABLE_NETWORK_PARTITION_DETECTION_NAME,
-      DISABLE_AUTO_RECONNECT_NAME,
-      SECURITY_CLIENT_AUTH_INIT_NAME,
-      SECURITY_CLIENT_AUTHENTICATOR_NAME,
-      SECURITY_CLIENT_DHALGO_NAME,
-      SECURITY_PEER_AUTH_INIT_NAME,
-      SECURITY_PEER_AUTHENTICATOR_NAME,
-      SECURITY_CLIENT_ACCESSOR_NAME,
-      SECURITY_CLIENT_ACCESSOR_PP_NAME,
-      SECURITY_LOG_LEVEL_NAME,
-      SECURITY_LOG_FILE_NAME,
-      SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME,
-      SECURITY_PREFIX_NAME,
-      REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME,
-      DELTA_PROPAGATION_PROP_NAME,
-      DISTRIBUTED_SYSTEM_ID_NAME,
-      ENFORCE_UNIQUE_HOST_NAME,
-      REDUNDANCY_ZONE_NAME,
-      GROUPS_NAME,
-      JMX_MANAGER_NAME,
-      JMX_MANAGER_START_NAME,
-      JMX_MANAGER_PORT_NAME,
-      JMX_MANAGER_SSL_NAME,
-      JMX_MANAGER_SSL_ENABLED_NAME,
-      JMX_MANAGER_SSL_PROTOCOLS_NAME,
-      JMX_MANAGER_SSL_CIPHERS_NAME,
-      JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION_NAME,
-      JMX_MANAGER_SSL_KEYSTORE_NAME,JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME,JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME,JMX_MANAGER_SSL_TRUSTSTORE_NAME,JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME,
-      JMX_MANAGER_BIND_ADDRESS_NAME,
-      JMX_MANAGER_HOSTNAME_FOR_CLIENTS_NAME,
-      JMX_MANAGER_PASSWORD_FILE_NAME,
-      JMX_MANAGER_ACCESS_FILE_NAME,
-      JMX_MANAGER_HTTP_PORT_NAME,
-      JMX_MANAGER_UPDATE_RATE_NAME,
-      MEMCACHED_PORT_NAME,
-      MEMCACHED_PROTOCOL_NAME,
-      MEMCACHED_BIND_ADDRESS_NAME,
-      REDIS_PORT_NAME,
-      REDIS_BIND_ADDRESS_NAME,
-      REDIS_PASSWORD_NAME,
-      USER_COMMAND_PACKAGES,
-      ENABLE_CLUSTER_CONFIGURATION_NAME,
-      USE_CLUSTER_CONFIGURATION_NAME,
-      LOAD_CLUSTER_CONFIG_FROM_DIR_NAME,
-      CLUSTER_CONFIGURATION_DIR,
-      HTTP_SERVICE_PORT_NAME,
-      HTTP_SERVICE_BIND_ADDRESS_NAME,
-      START_DEV_REST_API_NAME,
-      SERVER_SSL_ENABLED_NAME,
-      SERVER_SSL_REQUIRE_AUTHENTICATION_NAME,
-      SERVER_SSL_PROTOCOLS_NAME,
-      SERVER_SSL_CIPHERS_NAME,
-      SERVER_SSL_KEYSTORE_NAME,SERVER_SSL_KEYSTORE_TYPE_NAME,SERVER_SSL_KEYSTORE_PASSWORD_NAME,SERVER_SSL_TRUSTSTORE_NAME,SERVER_SSL_TRUSTSTORE_PASSWORD_NAME,
-      GATEWAY_SSL_ENABLED_NAME,
-      GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME,
-      GATEWAY_SSL_PROTOCOLS_NAME,
-      GATEWAY_SSL_CIPHERS_NAME,
-      GATEWAY_SSL_KEYSTORE_NAME,GATEWAY_SSL_KEYSTORE_TYPE_NAME,GATEWAY_SSL_KEYSTORE_PASSWORD_NAME,GATEWAY_SSL_TRUSTSTORE_NAME,GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME,
-      HTTP_SERVICE_SSL_ENABLED_NAME,
-      HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION_NAME,
-      HTTP_SERVICE_SSL_PROTOCOLS_NAME,
-      HTTP_SERVICE_SSL_CIPHERS_NAME,
-      HTTP_SERVICE_SSL_KEYSTORE_NAME,HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME,HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME,HTTP_SERVICE_SSL_TRUSTSTORE_NAME,HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME,
-      OFF_HEAP_MEMORY_SIZE_NAME, 
-      LOCK_MEMORY_NAME,
-      DISTRIBUTED_TRANSACTIONS_NAME
-    };
-    List atts = Arrays.asList(myAtts);
-    Collections.sort(atts);
-    dcValidAttributeNames = (String[])atts.toArray(new String[atts.size()]);
-  }
 
   public static boolean isWellKnownAttribute(String attName) {
     return Arrays.binarySearch(dcValidAttributeNames, attName) >= 0;
   }
-  
+
   public void setAttributeObject(String attName, Object attValue, ConfigSource source) {
+    // TODO: the setters is already checking the parameter type, do we still need to do this?
     Class validValueClass = getAttributeType(attName);
     if (attValue != null) {
       // null is a "valid" value for any class
       if (!validValueClass.isInstance(attValue)) {
-        throw new InvalidValueException(LocalizedStrings.AbstractDistributionConfig_0_VALUE_1_MUST_BE_OF_TYPE_2.toLocalizedString(new Object[] {attName, attValue, validValueClass.getName()}));
+        throw new InvalidValueException(LocalizedStrings.AbstractDistributionConfig_0_VALUE_1_MUST_BE_OF_TYPE_2.toLocalizedString(new Object[]{attName, attValue, validValueClass.getName()}));
       }
     }
 
-    if (attName.equalsIgnoreCase(ACK_WAIT_THRESHOLD_NAME)) {
-      this.setAckWaitThreshold(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(ACK_SEVERE_ALERT_THRESHOLD_NAME)) {
-      this.setAckSevereAlertThreshold(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(ARCHIVE_DISK_SPACE_LIMIT_NAME)) {
-      this.setArchiveDiskSpaceLimit(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(ARCHIVE_FILE_SIZE_LIMIT_NAME)) {
-      this.setArchiveFileSizeLimit(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(CACHE_XML_FILE_NAME)) {
-      this.setCacheXmlFile((File)attValue);
-    } else if (attName.equalsIgnoreCase(DEPLOY_WORKING_DIR)) {
-      this.setDeployWorkingDir((File)attValue);
-    } else if (attName.equalsIgnoreCase(LOG_DISK_SPACE_LIMIT_NAME)) {
-      this.setLogDiskSpaceLimit(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(LOG_FILE_NAME)) {
-      this.setLogFile((File)attValue);
-    } else if (attName.equalsIgnoreCase(LOG_FILE_SIZE_LIMIT_NAME)) {
-      this.setLogFileSizeLimit(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(LOG_LEVEL_NAME)) {
-      this.setLogLevel(LogWriterImpl.levelNameToCode((String)attValue));
-    } else if (attName.equalsIgnoreCase(LOCATORS_NAME)) {
-      this.setLocators((String)attValue);
-    } else if (attName.equalsIgnoreCase(LOCATOR_WAIT_TIME_NAME)) {
-      this.setLocatorWaitTime(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(REMOTE_LOCATORS_NAME)) {
-      this.setRemoteLocators((String)attValue);
-    } else if (attName.equalsIgnoreCase(MCAST_ADDRESS_NAME)) {
-      this.setMcastAddress((InetAddress)attValue);
-    } else if (attName.equalsIgnoreCase(BIND_ADDRESS_NAME)) {
-      this.setBindAddress((String)attValue);
-    } else if (attName.equalsIgnoreCase(SERVER_BIND_ADDRESS_NAME)) {
-      this.setServerBindAddress((String)attValue);
-    } else if (attName.equalsIgnoreCase(TCP_PORT_NAME)) {
-      this.setTcpPort(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(MCAST_PORT_NAME)) {
-      this.setMcastPort(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(MCAST_TTL_NAME)) {
-      this.setMcastTtl(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(SOCKET_LEASE_TIME_NAME)) {
-      this.setSocketLeaseTime(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(SOCKET_BUFFER_SIZE_NAME)) {
-      this.setSocketBufferSize(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(CONSERVE_SOCKETS_NAME)) {
-      this.setConserveSockets(((Boolean)attValue).booleanValue());
-    } else if (attName.equalsIgnoreCase(ROLES_NAME)) {
-      this.setRoles((String)attValue);
-    } else if (attName.equalsIgnoreCase(NAME_NAME)) {
-      this.setName((String)attValue);
-    } else if (attName.equalsIgnoreCase(STATISTIC_ARCHIVE_FILE_NAME)) {
-      this.setStatisticArchiveFile((File)attValue);
-    } else if (attName.equalsIgnoreCase(STATISTIC_SAMPLE_RATE_NAME)) {
-      this.setStatisticSampleRate(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(STATISTIC_SAMPLING_ENABLED_NAME)) {
-      this.setStatisticSamplingEnabled(((Boolean)attValue).booleanValue());
-    } else if (attName.equalsIgnoreCase(SSL_ENABLED_NAME)) {
-      this.setSSLEnabled(((Boolean)attValue).booleanValue());
-    } else if (attName.equalsIgnoreCase(SSL_PROTOCOLS_NAME)) {
-      this.setSSLProtocols((String)attValue);
-    } else if (attName.equalsIgnoreCase(SSL_CIPHERS_NAME)) {
-      this.setSSLCiphers((String)attValue);
-    } else if (attName.equalsIgnoreCase(SSL_REQUIRE_AUTHENTICATION_NAME)) {
-      this.setSSLRequireAuthentication(((Boolean)attValue).booleanValue());
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_ENABLED_NAME)) {
-      this.setClusterSSLEnabled(((Boolean)attValue).booleanValue());
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_PROTOCOLS_NAME)) {
-      this.setClusterSSLProtocols((String)attValue);
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_CIPHERS_NAME)) {
-      this.setClusterSSLCiphers((String)attValue);
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME)) {
-      this.setClusterSSLRequireAuthentication(((Boolean)attValue).booleanValue());
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_KEYSTORE_NAME)) {
-      this.setClusterSSLKeyStore((String)attValue);
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_KEYSTORE_TYPE_NAME)) {
-      this.setClusterSSLKeyStoreType((String)attValue);
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME)) {
-      this.setClusterSSLKeyStorePassword((String)attValue);
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_TRUSTSTORE_NAME)) {
-      this.setClusterSSLTrustStore((String)attValue);
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME)) {
-      this.setClusterSSLTrustStorePassword((String)attValue);
-    } else if (attName.equalsIgnoreCase(MCAST_SEND_BUFFER_SIZE_NAME)) {
-      this.setMcastSendBufferSize(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(MCAST_RECV_BUFFER_SIZE_NAME)) {
-      this.setMcastRecvBufferSize(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(UDP_SEND_BUFFER_SIZE_NAME)) {
-      this.setUdpSendBufferSize(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(UDP_RECV_BUFFER_SIZE_NAME)) {
-      this.setUdpRecvBufferSize(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(MCAST_FLOW_CONTROL_NAME)) {
-      this.setMcastFlowControl((FlowControlParams)attValue);
-    } else if (attName.equalsIgnoreCase(UDP_FRAGMENT_SIZE_NAME)) {
-      this.setUdpFragmentSize(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(DISABLE_TCP_NAME)) {
-      this.setDisableTcp(((Boolean)attValue).booleanValue());
-    } else if (attName.equalsIgnoreCase(ENABLE_TIME_STATISTICS_NAME)) {
-      this.setEnableTimeStatistics(((Boolean)attValue).booleanValue());
-    } else if (attName.equalsIgnoreCase(MEMBER_TIMEOUT_NAME)) {
-      this.setMemberTimeout(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(MEMBERSHIP_PORT_RANGE_NAME)) {
-      this.setMembershipPortRange((int[])attValue);
-    } else if (attName.equalsIgnoreCase(MAX_WAIT_TIME_FOR_RECONNECT_NAME)){
-      this.setMaxWaitTimeForReconnect(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(MAX_NUM_RECONNECT_TRIES)){
-      this.setMaxNumReconnectTries(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(ASYNC_DISTRIBUTION_TIMEOUT_NAME)) {
-      this.setAsyncDistributionTimeout(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(ASYNC_QUEUE_TIMEOUT_NAME)) {
-      this.setAsyncQueueTimeout(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(ASYNC_MAX_QUEUE_SIZE_NAME)) {
-      this.setAsyncMaxQueueSize(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(START_LOCATOR_NAME)) {
-      this.setStartLocator((String)attValue);
-    } else if (attName.equalsIgnoreCase(CLIENT_CONFLATION_PROP_NAME)) {
-      this.setClientConflation((String)attValue);
-    } else if (attName.equalsIgnoreCase(DURABLE_CLIENT_ID_NAME)) {
-      this.setDurableClientId((String)attValue);
-    } else if (attName.equalsIgnoreCase(DURABLE_CLIENT_TIMEOUT_NAME)) {
-      this.setDurableClientTimeout(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(SECURITY_CLIENT_AUTH_INIT_NAME)) {
-      this.setSecurityClientAuthInit((String)attValue);
-    } else if (attName.equalsIgnoreCase(SECURITY_CLIENT_AUTHENTICATOR_NAME)) {
-      this.setSecurityClientAuthenticator((String)attValue);
-    } else if (attName.equalsIgnoreCase(SECURITY_CLIENT_DHALGO_NAME)) {
-      this.setSecurityClientDHAlgo((String)attValue);
-    } else if (attName.equalsIgnoreCase(SECURITY_PEER_AUTH_INIT_NAME)) {
-      this.setSecurityPeerAuthInit((String)attValue);
-    } else if (attName.equalsIgnoreCase(SECURITY_PEER_AUTHENTICATOR_NAME)) {
-      this.setSecurityPeerAuthenticator((String)attValue);
-    } else if (attName.equalsIgnoreCase(SECURITY_CLIENT_ACCESSOR_NAME)) {
-      this.setSecurityClientAccessor((String)attValue);
-    } else if (attName.equalsIgnoreCase(SECURITY_CLIENT_ACCESSOR_PP_NAME)) {
-      this.setSecurityClientAccessorPP((String)attValue);
-    } else if (attName.equalsIgnoreCase(SECURITY_LOG_LEVEL_NAME)) {
-      this.setSecurityLogLevel(LogWriterImpl.levelNameToCode((String)attValue));
-    } else if (attName.equalsIgnoreCase(SECURITY_LOG_FILE_NAME)) {
-      this.setSecurityLogFile((File)attValue);
-    } else if (attName.equalsIgnoreCase(SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME)) {
-      this.setSecurityPeerMembershipTimeout(((Integer)attValue).intValue());      
-    } else if (attName.startsWith(SECURITY_PREFIX_NAME)) {
-      this.setSecurity(attName,(String)attValue);
-    } else if (attName.equalsIgnoreCase(ENABLE_NETWORK_PARTITION_DETECTION_NAME)) {
-      this.setEnableNetworkPartitionDetection(((Boolean)attValue).booleanValue());
-    } else if (attName.equalsIgnoreCase(DISABLE_AUTO_RECONNECT_NAME)) {
-      this.setDisableAutoReconnect(((Boolean)attValue).booleanValue());
-    } else if (attName.equalsIgnoreCase(REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME)) {
-      this.setRemoveUnresponsiveClient(((Boolean)attValue).booleanValue());
-    } else if (attName.startsWith(DELTA_PROPAGATION_PROP_NAME)) {
-      this.setDeltaPropagation((((Boolean)attValue).booleanValue()));    
-    } else if (attName.startsWith(DISTRIBUTED_SYSTEM_ID_NAME)) {
-      this.setDistributedSystemId((Integer)attValue);
-    } else if (attName.startsWith(REDUNDANCY_ZONE_NAME)) {
-      this.setRedundancyZone((String)attValue);
-    } else if (attName.startsWith(ENFORCE_UNIQUE_HOST_NAME)) {
-      this.setEnforceUniqueHost(((Boolean)attValue).booleanValue());
-    } else if (attName.startsWith(USERDEFINED_PREFIX_NAME)) {
+    if (attName.startsWith(USERDEFINED_PREFIX_NAME)) {
       //Do nothing its user defined property.
-    } else if (attName.startsWith(SSL_SYSTEM_PROPS_NAME) || attName.startsWith(SYS_PROP_NAME)) {
-      this.setSSLProperty(attName, (String)attValue);
-    } else if (attName.equalsIgnoreCase(GROUPS_NAME)) {
-      this.setGroups((String)attValue);
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_NAME)) {
-      this.setJmxManager((((Boolean)attValue).booleanValue()));
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_START_NAME)) {
-      this.setJmxManagerStart((((Boolean)attValue).booleanValue()));
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_SSL_NAME)) {
-      this.setJmxManagerSSL((((Boolean)attValue).booleanValue()));
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_SSL_ENABLED_NAME)) {
-      this.setJmxManagerSSLEnabled((((Boolean)attValue).booleanValue()));
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION_NAME)) {
-      this.setJmxManagerSSLRequireAuthentication((((Boolean)attValue).booleanValue()));
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_SSL_PROTOCOLS_NAME)) {
-      this.setJmxManagerSSLProtocols((String)attValue);
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_SSL_CIPHERS_NAME)) {
-      this.setJmxManagerSSLCiphers((String)attValue);
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_SSL_KEYSTORE_NAME)) {
-      this.setJmxManagerSSLKeyStore((String)attValue);
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME)) {
-      this.setJmxManagerSSLKeyStoreType((String)attValue);
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME)) {
-      this.setJmxManagerSSLKeyStorePassword((String)attValue);
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_SSL_TRUSTSTORE_NAME)) {
-      this.setJmxManagerSSLTrustStore((String)attValue);
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME)) {
-      this.setJmxManagerSSLTrustStorePassword((String)attValue);
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_PORT_NAME)) {
-      this.setJmxManagerPort(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_BIND_ADDRESS_NAME)) {
-      this.setJmxManagerBindAddress((String)attValue);
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_HOSTNAME_FOR_CLIENTS_NAME)) {
-      this.setJmxManagerHostnameForClients((String)attValue);
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_PASSWORD_FILE_NAME)) {
-      this.setJmxManagerPasswordFile((String)attValue);
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_ACCESS_FILE_NAME)) {
-      this.setJmxManagerAccessFile((String)attValue);
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_HTTP_PORT_NAME)) {
-      this.setJmxManagerHttpPort(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(JMX_MANAGER_UPDATE_RATE_NAME)) {
-      this.setJmxManagerUpdateRate(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(MEMCACHED_PORT_NAME)) {
-      this.setMemcachedPort(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(MEMCACHED_PROTOCOL_NAME)) {
-      this.setMemcachedProtocol((String)attValue);
-    } else if (attName.equalsIgnoreCase(MEMCACHED_BIND_ADDRESS_NAME)) {
-      this.setMemcachedBindAddress((String)attValue);
-    } else if (attName.equalsIgnoreCase(REDIS_PORT_NAME)) {
-      this.setRedisPort(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(REDIS_BIND_ADDRESS_NAME)) {
-      this.setRedisBindAddress((String)attValue);
-    } else if (attName.equalsIgnoreCase(REDIS_PASSWORD_NAME)) {
-      this.setRedisPassword((String)attValue);
-    } else if (attName.equalsIgnoreCase(USER_COMMAND_PACKAGES)) {
-      this.setUserCommandPackages((String)attValue);
-    } else if (attName.equalsIgnoreCase(ENABLE_CLUSTER_CONFIGURATION_NAME)) {
-      this.setEnableClusterConfiguration(((Boolean)attValue).booleanValue());
-    } else if (attName.equalsIgnoreCase(LOAD_CLUSTER_CONFIG_FROM_DIR_NAME)) {
-      this.setLoadClusterConfigFromDir(((Boolean)attValue).booleanValue());
-    } else if (attName.equalsIgnoreCase(USE_CLUSTER_CONFIGURATION_NAME)) {
-      this.setUseSharedConfiguration(((Boolean)attValue).booleanValue());
-    } else if (attName.equalsIgnoreCase(CLUSTER_CONFIGURATION_DIR)) {
-      this.setClusterConfigDir((String)attValue);
-    } else if (attName.equalsIgnoreCase(SERVER_SSL_ENABLED_NAME)) {
-      this.setServerSSLEnabled((((Boolean)attValue).booleanValue()));
-    } else if (attName.equalsIgnoreCase(SERVER_SSL_REQUIRE_AUTHENTICATION_NAME)) {
-      this.setServerSSLRequireAuthentication((((Boolean)attValue).booleanValue()));
-    } else if (attName.equalsIgnoreCase(SERVER_SSL_PROTOCOLS_NAME)) {
-      this.setServerSSLProtocols((String)attValue);
-    } else if (attName.equalsIgnoreCase(SERVER_SSL_CIPHERS_NAME)) {
-      this.setServerSSLCiphers((String)attValue);
-    } else if (attName.equalsIgnoreCase(SERVER_SSL_KEYSTORE_NAME)) {
-      this.setServerSSLKeyStore((String)attValue);
-    } else if (attName.equalsIgnoreCase(SERVER_SSL_KEYSTORE_TYPE_NAME)) {
-      this.setServerSSLKeyStoreType((String)attValue);
-    } else if (attName.equalsIgnoreCase(SERVER_SSL_KEYSTORE_PASSWORD_NAME)) {
-      this.setServerSSLKeyStorePassword((String)attValue);
-    } else if (attName.equalsIgnoreCase(SERVER_SSL_TRUSTSTORE_NAME)) {
-      this.setServerSSLTrustStore((String)attValue);
-    } else if (attName.equalsIgnoreCase(SERVER_SSL_TRUSTSTORE_PASSWORD_NAME)) {
-      this.setServerSSLTrustStorePassword((String)attValue);
-    } else if (attName.equalsIgnoreCase(GATEWAY_SSL_ENABLED_NAME)) {
-      this.setGatewaySSLEnabled((((Boolean)attValue).booleanValue()));
-    } else if (attName.equalsIgnoreCase(GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME)) {
-      this.setGatewaySSLRequireAuthentication((((Boolean)attValue).booleanValue()));
-    } else if (attName.equalsIgnoreCase(GATEWAY_SSL_PROTOCOLS_NAME)) {
-      this.setGatewaySSLProtocols((String)attValue);
-    } else if (attName.equalsIgnoreCase(GATEWAY_SSL_CIPHERS_NAME)) {
-      this.setGatewaySSLCiphers((String)attValue);
-    } else if (attName.equalsIgnoreCase(GATEWAY_SSL_KEYSTORE_NAME)) {
-      this.setGatewaySSLKeyStore((String)attValue);
-    } else if (attName.equalsIgnoreCase(GATEWAY_SSL_KEYSTORE_TYPE_NAME)) {
-      this.setGatewaySSLKeyStoreType((String)attValue);
-    } else if (attName.equalsIgnoreCase(GATEWAY_SSL_KEYSTORE_PASSWORD_NAME)) {
-      this.setGatewaySSLKeyStorePassword((String)attValue);
-    } else if (attName.equalsIgnoreCase(GATEWAY_SSL_TRUSTSTORE_NAME)) {
-      this.setGatewaySSLTrustStore((String)attValue);
-    } else if (attName.equalsIgnoreCase(GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME)) {
-      this.setGatewaySSLTrustStorePassword((String)attValue);
-    } else if (attName.equalsIgnoreCase(HTTP_SERVICE_PORT_NAME)) {
-       this.setHttpServicePort(((Integer)attValue).intValue());
-    } else if (attName.equalsIgnoreCase(HTTP_SERVICE_BIND_ADDRESS_NAME)) {
-      this.setHttpServiceBindAddress((String)attValue);
-    } else if (attName.equalsIgnoreCase(HTTP_SERVICE_SSL_ENABLED_NAME)) {
-      this.setHttpServiceSSLEnabled((((Boolean)attValue).booleanValue()));
-    } else if (attName.equalsIgnoreCase(HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION_NAME)) {
-      this.setHttpServiceSSLRequireAuthentication((((Boolean)attValue).booleanValue()));
-    } else if (attName.equalsIgnoreCase(HTTP_SERVICE_SSL_PROTOCOLS_NAME)) {
-      this.setHttpServiceSSLProtocols((String)attValue);
-    } else if (attName.equalsIgnoreCase(HTTP_SERVICE_SSL_CIPHERS_NAME)) {
-      this.setHttpServiceSSLCiphers((String)attValue);
-    } else if (attName.equalsIgnoreCase(HTTP_SERVICE_SSL_KEYSTORE_NAME)) {
-      this.setHttpServiceSSLKeyStore((String)attValue);
-    } else if (attName.equalsIgnoreCase(HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME)) {
-      this.setHttpServiceSSLKeyStoreType((String)attValue);
-    } else if (attName.equalsIgnoreCase(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME)) {
-      this.setHttpServiceSSLKeyStorePassword((String)attValue);
-    } else if (attName.equalsIgnoreCase(HTTP_SERVICE_SSL_TRUSTSTORE_NAME)) {
-      this.setHttpServiceSSLTrustStore((String)attValue);
-    } else if (attName.equalsIgnoreCase(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME)) {
-      this.setHttpServiceSSLTrustStorePassword((String)attValue);
-    } else if (attName.equalsIgnoreCase(START_DEV_REST_API_NAME)) {
-      this.setStartDevRestApi(((Boolean)attValue).booleanValue());
-    } else if (attName.equalsIgnoreCase(OFF_HEAP_MEMORY_SIZE_NAME)) {
-      this.setOffHeapMemorySize((String)attValue);
-    } else if (attName.equalsIgnoreCase(LOCK_MEMORY_NAME)) {
-      this.setLockMemory((Boolean)attValue);
-    } else if (attName.equalsIgnoreCase(DISTRIBUTED_TRANSACTIONS_NAME)) {
-      this.setDistributedTransactions(((Boolean)attValue).booleanValue());
-    } else {
+      return;
+    }
+
+    // special case: log-level and security-log-level attributes are String type, but the setter accepts int
+    if(attName.equalsIgnoreCase(LOG_LEVEL_NAME) || attName.equalsIgnoreCase(SECURITY_LOG_LEVEL_NAME)){
+      attValue = LogWriterImpl.levelNameToCode((String)attValue);
+    }
+
+    Method setter = setters.get(attName);
+    if (setter == null) {
+      // if we cann't find the defined setter, look for two more special cases
+      if (attName.startsWith(SECURITY_PREFIX_NAME)) {
+        this.setSecurity(attName,(String)attValue);
+        getAttSourceMap().put(attName, source);
+        return;
+      }
+      if (attName.startsWith(SSL_SYSTEM_PROPS_NAME) || attName.startsWith(SYS_PROP_NAME)) {
+        this.setSSLProperty(attName, (String) attValue);
+        getAttSourceMap().put(attName, source);
+        return;
+      }
       throw new InternalGemFireException(LocalizedStrings.AbstractDistributionConfig_UNHANDLED_ATTRIBUTE_NAME_0.toLocalizedString(attName));
     }
+
+    Class[] pTypes = setter.getParameterTypes();
+    if (pTypes.length != 1)
+      throw new InternalGemFireException("the attribute setter must have one and only one parametter");
+
+
+    try {
+      setter.invoke(this, attValue);
+    } catch (Exception e) {
+      if(e instanceof RuntimeException){
+        throw (RuntimeException)e;
+      }
+      if(e.getCause() instanceof RuntimeException){
+        throw (RuntimeException)e.getCause();
+      }
+      else
+        throw new InternalGemFireException("error invoking "+setter.getName()+" with "+attValue, e);
+    }
+
     getAttSourceMap().put(attName, source);
   }
 
   public Object getAttributeObject(String attName) {
     checkAttributeName(attName);
-    if (attName.equalsIgnoreCase(ACK_WAIT_THRESHOLD_NAME)) {
-      return Integer.valueOf(this.getAckWaitThreshold());
-    } else if (attName.equalsIgnoreCase(ACK_SEVERE_ALERT_THRESHOLD_NAME)) {
-      return Integer.valueOf(this.getAckSevereAlertThreshold());
-    } else if (attName.equalsIgnoreCase(ARCHIVE_DISK_SPACE_LIMIT_NAME)) {
-      return Integer.valueOf(this.getArchiveDiskSpaceLimit());
-    } else if (attName.equalsIgnoreCase(ARCHIVE_FILE_SIZE_LIMIT_NAME)) {
-      return Integer.valueOf(this.getArchiveFileSizeLimit());
-    } else if (attName.equalsIgnoreCase(CACHE_XML_FILE_NAME)) {
-      return this.getCacheXmlFile();
-    } else if (attName.equalsIgnoreCase(DEPLOY_WORKING_DIR)) {
-      return this.getDeployWorkingDir();
-    } else if (attName.equalsIgnoreCase(LOG_DISK_SPACE_LIMIT_NAME)) {
-      return Integer.valueOf(this.getLogDiskSpaceLimit());
-    } else if (attName.equalsIgnoreCase(LOG_FILE_NAME)) {
-      return this.getLogFile();
-    } else if (attName.equalsIgnoreCase(LOG_FILE_SIZE_LIMIT_NAME)) {
-      return Integer.valueOf(this.getLogFileSizeLimit());
-    } else if (attName.equalsIgnoreCase(LOG_LEVEL_NAME)) {
+
+    // special case:
+    if (attName.equalsIgnoreCase(LOG_LEVEL_NAME)) {
       return LogWriterImpl.levelToString(this.getLogLevel());
-    } else if (attName.equalsIgnoreCase(LOCATORS_NAME)) {
-      return this.getLocators();
-    } else if (attName.equalsIgnoreCase(LOCATOR_WAIT_TIME_NAME)) {
-      return Integer.valueOf(this.getLocatorWaitTime());
-    } else if (attName.equalsIgnoreCase(REMOTE_LOCATORS_NAME)) {
-      return this.getRemoteLocators();
-    } else if (attName.equalsIgnoreCase(MCAST_ADDRESS_NAME)) {
-      return this.getMcastAddress();
-    } else if (attName.equalsIgnoreCase(BIND_ADDRESS_NAME)) {
-      return this.getBindAddress();
-    } else if (attName.equalsIgnoreCase(SERVER_BIND_ADDRESS_NAME)) {
-      return this.getServerBindAddress();
-    } else if (attName.equalsIgnoreCase(TCP_PORT_NAME)) {
-      return Integer.valueOf(this.getTcpPort());
-    } else if (attName.equalsIgnoreCase(MCAST_PORT_NAME)) {
-      return Integer.valueOf(this.getMcastPort());
-    } else if (attName.equalsIgnoreCase(MCAST_TTL_NAME)) {
-      return Integer.valueOf(this.getMcastTtl());
-    } else if (attName.equalsIgnoreCase(SOCKET_LEASE_TIME_NAME)) {
-      return Integer.valueOf(this.getSocketLeaseTime());
-    } else if (attName.equalsIgnoreCase(SOCKET_BUFFER_SIZE_NAME)) {
-      return Integer.valueOf(this.getSocketBufferSize());
-    } else if (attName.equalsIgnoreCase(CONSERVE_SOCKETS_NAME)) {
-      return Boolean.valueOf(this.getConserveSockets());
-    } else if (attName.equalsIgnoreCase(ROLES_NAME)) {
-      return this.getRoles();
-    } else if (attName.equalsIgnoreCase(NAME_NAME)) {
-      return this.getName();
-    } else if (attName.equalsIgnoreCase(STATISTIC_ARCHIVE_FILE_NAME)) {
-      return this.getStatisticArchiveFile();
-    } else if (attName.equalsIgnoreCase(STATISTIC_SAMPLE_RATE_NAME)) {
-      return Integer.valueOf(this.getStatisticSampleRate());
-    } else if (attName.equalsIgnoreCase(STATISTIC_SAMPLING_ENABLED_NAME)) {
-      return Boolean.valueOf(this.getStatisticSamplingEnabled());
-    } else if (attName.equalsIgnoreCase(SSL_ENABLED_NAME)) {
-      return this.getSSLEnabled() ? Boolean.TRUE : Boolean.FALSE;
-    } else if (attName.equalsIgnoreCase(SSL_PROTOCOLS_NAME)) {
-      return this.getSSLProtocols();
-    } else if (attName.equalsIgnoreCase(SSL_CIPHERS_NAME)) {
-      return this.getSSLCiphers();
-    } else if (attName.equalsIgnoreCase(SSL_REQUIRE_AUTHENTICATION_NAME)) {
-      return this.getSSLRequireAuthentication() ? Boolean.TRUE : Boolean.FALSE;
-    }  else if (attName.equalsIgnoreCase(CLUSTER_SSL_ENABLED_NAME)) {
-      return this.getClusterSSLEnabled() ? Boolean.TRUE : Boolean.FALSE;
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_PROTOCOLS_NAME)) {
-      return this.getClusterSSLProtocols();
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_CIPHERS_NAME)) {
-      return this.getClusterSSLCiphers();
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME)) {
-      return this.getClusterSSLRequireAuthentication() ? Boolean.TRUE : Boolean.FALSE;
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_KEYSTORE_NAME)) {
-      return this.getClusterSSLKeyStore();
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_KEYSTORE_TYPE_NAME)) {
-      return this.getClusterSSLKeyStoreType();
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME)) {
-      return this.getClusterSSLKeyStorePassword();
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_TRUSTSTORE_NAME)) {
-      return this.getClusterSSLTrustStore();
-    } else if (attName.equalsIgnoreCase(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME)) {
-      return this.getClusterSSLTrustStorePassword();
-    } else if (attName.equalsIgnoreCase(MCAST_SEND_BUFFER_SIZE_NAME)) {


<TRUNCATED>


[06/33] incubator-geode git commit: GEODE-913: refactor AbstractDistributionConfig

Posted by ds...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttribute.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttribute.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttribute.java
new file mode 100644
index 0000000..51712f9
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttribute.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed.internal;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Created by jiliao on 2/3/16.
+ * min and max are used only when type is Integer
+ */
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ConfigAttribute {
+  Class type();
+
+  int min() default Integer.MIN_VALUE;
+
+  int max() default Integer.MAX_VALUE;
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeChecker.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeChecker.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeChecker.java
new file mode 100644
index 0000000..14c1e54
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeChecker.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed.internal;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Created by jiliao on 2/3/16.
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ConfigAttributeChecker {
+  String name();
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeDesc.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeDesc.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeDesc.java
new file mode 100644
index 0000000..57a4a72
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeDesc.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed.internal;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Created by jiliao on 2/3/16.
+ */
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ConfigAttributeDesc {
+  String name();
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeGetter.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeGetter.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeGetter.java
new file mode 100644
index 0000000..678ecf0
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeGetter.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed.internal;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Created by jiliao on 2/3/16.
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ConfigAttributeGetter {
+  String name();
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeSetter.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeSetter.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeSetter.java
new file mode 100644
index 0000000..ad8ad65
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ConfigAttributeSetter.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed.internal;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Created by jiliao on 2/3/16.
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ConfigAttributeSetter {
+  String name();
+}


[21/33] incubator-geode git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-geode into develop

Posted by ds...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-geode into develop


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

Branch: refs/heads/feature/GEODE-831
Commit: bef0c1becf5f8c8f838500837515883f4f9a7bcd
Parents: 8fd91dd 00c69b6
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Tue Feb 16 08:05:45 2016 -0800
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Tue Feb 16 08:05:45 2016 -0800

----------------------------------------------------------------------
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[03/33] incubator-geode git commit: GEODE-657: Add an abort flag to the FinishBackupMessage

Posted by ds...@apache.org.
GEODE-657: Add an abort flag to the FinishBackupMessage

If the prepare phase of a backup fails, it can leave the backup in a
prepared state on several nodes. The FinishBackupMessage should always
be sent to cleanup the backup. Adding an abort flag to
FinishBackupMessage and always sending that message regardless of
failures during the prepare.


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

Branch: refs/heads/feature/GEODE-831
Commit: 3adb0b8e17436af555e1acbe2bf729bf72365305
Parents: 2b2e619
Author: Dan Smith <up...@apache.org>
Authored: Wed Feb 10 14:05:44 2016 -0800
Committer: Dan Smith <up...@apache.org>
Committed: Thu Feb 11 17:20:03 2016 -0800

----------------------------------------------------------------------
 .../admin/internal/BackupDataStoreHelper.java   |   2 +-
 .../admin/internal/FinishBackupRequest.java     |  14 ++-
 .../internal/locks/DLockService.java            |  18 +++-
 .../internal/admin/remote/AdminResponse.java    |   2 +-
 .../internal/cache/GemFireCacheImpl.java        |   2 +-
 .../cache/persistence/BackupManager.java        |  10 +-
 .../internal/beans/DistributedSystemBridge.java |   5 +-
 .../internal/beans/MemberMBeanBridge.java       |  14 ++-
 .../gemfire/internal/cache/BackupDUnitTest.java |  57 ++++++++++
 .../gemfire/internal/cache/BackupJUnitTest.java |   8 +-
 .../beans/DistributedSystemBridgeJUnitTest.java | 106 +++++++++++++++++++
 .../com/gemstone/gemfire/test/fake/Fakes.java   |  99 +++++++++++++++++
 .../sanctionedDataSerializables.txt             |   4 +-
 13 files changed, 314 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3adb0b8e/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreHelper.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreHelper.java
index 26a70a8..d628718 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreHelper.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/BackupDataStoreHelper.java
@@ -12,7 +12,7 @@ import com.gemstone.gemfire.internal.Assert;
 
 public class BackupDataStoreHelper {
 
-  private static String LOCK_SERVICE_NAME = BackupDataStoreHelper.class.getSimpleName();
+  public static String LOCK_SERVICE_NAME = BackupDataStoreHelper.class.getSimpleName();
 
   private static String LOCK_NAME = LOCK_SERVICE_NAME + "_token";
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3adb0b8e/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/FinishBackupRequest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/FinishBackupRequest.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/FinishBackupRequest.java
index 3833587..58577d6 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/FinishBackupRequest.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/FinishBackupRequest.java
@@ -58,18 +58,20 @@ public class FinishBackupRequest  extends CliLegacyMessage {
   
   private File targetDir;
   private File baselineDir;
+  private boolean abort;
   
   public FinishBackupRequest() {
     super();
   }
 
-  public FinishBackupRequest(File targetDir,File baselineDir) {
+  public FinishBackupRequest(File targetDir,File baselineDir, boolean abort) {
     this.targetDir = targetDir;
     this.baselineDir = baselineDir;
+    this.abort = abort;
   }
   
-  public static Map<DistributedMember, Set<PersistentID>> send(DM dm, Set recipients, File targetDir, File baselineDir) {
-    FinishBackupRequest request = new FinishBackupRequest(targetDir,baselineDir);
+  public static Map<DistributedMember, Set<PersistentID>> send(DM dm, Set recipients, File targetDir, File baselineDir, boolean abort) {
+    FinishBackupRequest request = new FinishBackupRequest(targetDir,baselineDir, abort);
     request.setRecipients(recipients);
 
     FinishBackupReplyProcessor replyProcessor = new FinishBackupReplyProcessor(dm, recipients);
@@ -94,11 +96,11 @@ public class FinishBackupRequest  extends CliLegacyMessage {
   protected AdminResponse createResponse(DistributionManager dm) {
     GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
     HashSet<PersistentID> persistentIds;
-    if(cache == null) {
+    if(cache == null || cache.getBackupManager() == null) {
       persistentIds = new HashSet<PersistentID>();
     } else {
       try {
-        persistentIds = cache.getBackupManager().finishBackup(targetDir, baselineDir);
+        persistentIds = cache.getBackupManager().finishBackup(targetDir, baselineDir, abort);
       } catch (IOException e) {
         logger.error(LocalizedMessage.create(LocalizedStrings.CliLegacyMessage_ERROR, this.getClass()), e);
         return AdminFailureResponse.create(dm, getSender(), e);
@@ -117,6 +119,7 @@ public class FinishBackupRequest  extends CliLegacyMessage {
     super.fromData(in);
     targetDir = DataSerializer.readFile(in);
     baselineDir = DataSerializer.readFile(in);
+    abort = DataSerializer.readBoolean(in);
   }
 
   @Override
@@ -124,6 +127,7 @@ public class FinishBackupRequest  extends CliLegacyMessage {
     super.toData(out);
     DataSerializer.writeFile(targetDir, out);
     DataSerializer.writeFile(baselineDir, out);
+    DataSerializer.writeBoolean(abort, out);
   }
 
   private static class FinishBackupReplyProcessor extends AdminMultipleReplyProcessor {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3adb0b8e/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockService.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockService.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockService.java
index ca3840e..626d85e 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockService.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockService.java
@@ -2998,7 +2998,7 @@ public class DLockService extends DistributedLockService {
         ds.getCancelCriterion().checkCancelInProgress(null);
         
         // make sure thread group is ready...
-        readyThreadGroup();
+        readyThreadGroup(ds);
         
         if (services.get(serviceName) != null) {
           throw new IllegalArgumentException(LocalizedStrings.DLockService_SERVICE_NAMED_0_ALREADY_CREATED.toLocalizedString(serviceName));
@@ -3203,6 +3203,18 @@ public class DLockService extends DistributedLockService {
   protected static synchronized DistributedLockStats getDistributedLockStats() {
     return stats;
   }
+  
+  public static void addLockServiceForTests(String name, DLockService service) {
+    synchronized (services) {
+      services.put(name, service);
+    }
+  }
+  
+  public static void removeLockServiceForTests(String name) {
+    synchronized (services) {
+      services.remove(name);
+    }
+  }
 
   protected static void removeLockService(DLockService service) {
     service.removeAllTokens();
@@ -3253,10 +3265,8 @@ public class DLockService extends DistributedLockService {
   //   Internal
   // -------------------------------------------------------------------------
   
-  protected static synchronized void readyThreadGroup() {
+  protected static synchronized void readyThreadGroup(InternalDistributedSystem ds) {
     if (threadGroup == null) {
-      InternalDistributedSystem ds = 
-          InternalDistributedSystem.getAnyInstance();
       Assert.assertTrue(ds != null, 
           "Cannot find any instance of InternalDistributedSystem");
       String threadGroupName = LocalizedStrings.DLockService_DISTRIBUTED_LOCKING_THREADS.toLocalizedString();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3adb0b8e/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminResponse.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminResponse.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminResponse.java
index 14a201c..692deed 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminResponse.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminResponse.java
@@ -42,7 +42,7 @@ public abstract class AdminResponse extends HighPriorityDistributionMessage
     return this.msgId;
   }
 
-  void setMsgId(int msgId) {
+  public void setMsgId(int msgId) {
     this.msgId = msgId;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3adb0b8e/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
index 256e293..201acc0 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
@@ -2729,7 +2729,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
 
   }
 
-  public final InternalDistributedSystem getDistributedSystem() {
+  public InternalDistributedSystem getDistributedSystem() {
     return this.system;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3adb0b8e/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/BackupManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/BackupManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/BackupManager.java
index 1a5c765..c764007 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/BackupManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/BackupManager.java
@@ -166,8 +166,12 @@ public class BackupManager implements MembershipListener {
     return baselineDir;
   }
   
-  public HashSet<PersistentID> finishBackup(File targetDir, File baselineDir) throws IOException {
+  public HashSet<PersistentID> finishBackup(File targetDir, File baselineDir, boolean abort) throws IOException {
     try {
+      if(abort) {
+        return new HashSet<PersistentID>();
+      }
+      
       File backupDir = getBackupDir(targetDir);
       
       // Make sure our baseline is okay for this member
@@ -225,6 +229,10 @@ public class BackupManager implements MembershipListener {
     }
   }
   
+  public void abort() {
+    cleanup();
+  }
+  
   private void backupConfigFiles(RestoreScript restoreScript, File backupDir) throws IOException {
     File configBackupDir = new File(backupDir, CONFIG);
     FileUtil.mkdirs(configBackupDir);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3adb0b8e/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridge.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridge.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridge.java
index 9427831..d95de82 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridge.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridge.java
@@ -265,7 +265,7 @@ public class DistributedSystemBridge {
     this.dm = system.getDistributionManager();
     this.alertLevel = ManagementConstants.DEFAULT_ALERT_LEVEL;
     this.thisMemberName = MBeanJMXAdapter
-    .getMemberMBeanName(InternalDistributedSystem.getConnectedInstance().getDistributedMember());
+    .getMemberMBeanName(system.getDistributedMember());
 
     this.distributedSystemId = this.system.getConfig().getDistributedSystemId();
 
@@ -588,9 +588,6 @@ public class DistributedSystemBridge {
       diskBackupStatus.setBackedUpDiskStores(backedUpDiskStores);
       diskBackupStatus.setOfflineDiskStores(setOfMissingDiskStr);
       return diskBackupStatus;
-
-    } catch (Exception e) {
-      throw new Exception(e.getLocalizedMessage());
     } finally {
       BackupDataStoreHelper.releaseLock(dm);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3adb0b8e/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java
index dc54c6d..61e328d 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java
@@ -1155,10 +1155,16 @@ public class MemberMBeanBridge {
       try {
         BackupManager manager = cache.startBackup(cache.getDistributedSystem()
             .getDistributedMember());
-        Set<PersistentID> existingDataStores = manager.prepareBackup();
-
-        Set<PersistentID> successfulDataStores = manager
-          .finishBackup(targetDir, null/* TODO rishi */);
+        boolean abort = true;
+        Set<PersistentID> existingDataStores;
+        Set<PersistentID> successfulDataStores;
+        try {
+          existingDataStores = manager.prepareBackup();
+          abort = false;
+        } finally {
+          successfulDataStores = manager
+              .finishBackup(targetDir, null/* TODO rishi */, abort);
+        }
         diskBackUpResult = new DiskBackupResult[existingDataStores.size()];
         int j = 0;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3adb0b8e/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupDUnitTest.java
index a91fb8e..3ad768e 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupDUnitTest.java
@@ -31,7 +31,10 @@ import java.util.TreeSet;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReference;
 
+import com.gemstone.gemfire.GemFireIOException;
 import com.gemstone.gemfire.admin.BackupStatus;
+import com.gemstone.gemfire.admin.internal.FinishBackupRequest;
+import com.gemstone.gemfire.admin.internal.PrepareBackupRequest;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.DataPolicy;
 import com.gemstone.gemfire.cache.DiskStore;
@@ -49,11 +52,13 @@ import com.gemstone.gemfire.distributed.internal.DistributionMessage;
 import com.gemstone.gemfire.distributed.internal.DistributionMessageObserver;
 import com.gemstone.gemfire.distributed.internal.ReplyMessage;
 import com.gemstone.gemfire.internal.FileUtil;
+import com.gemstone.gemfire.internal.admin.remote.AdminFailureResponse;
 import com.gemstone.gemfire.internal.cache.partitioned.PersistentPartitionedRegionTestBase;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.DUnitEnv;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
@@ -353,6 +358,58 @@ public class BackupDUnitTest extends PersistentPartitionedRegionTestBase {
     
     backupWhileBucketIsMoved(observer);
   }
+  
+  public void testBackupStatusCleanedUpAfterFailureOnOneMember() throws Throwable {
+    IgnoredException.addIgnoredException("Uncaught exception");
+    IgnoredException.addIgnoredException("Stop processing");
+    Host host = Host.getHost(0);
+    final VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+    final VM vm2 = host.getVM(2);
+
+    //Create an observer that will fail a backup
+    //When this member receives a prepare
+    DistributionMessageObserver observer = new SerializableDistributionMessageObserver() {
+      @Override
+      public void beforeProcessMessage(DistributionManager dm,
+          DistributionMessage message) {
+        if(message instanceof PrepareBackupRequest) {
+          DistributionMessageObserver.setInstance(null);
+          IOException exception = new IOException("Backup in progess");
+          AdminFailureResponse response = AdminFailureResponse.create(dm, message.getSender(), exception);
+          response.setMsgId(((PrepareBackupRequest) message).getMsgId());
+          dm.putOutgoing(response);
+          throw new RuntimeException("Stop processing");
+        }
+      }
+    };
+    
+    vm0.invoke(() -> {
+      disconnectFromDS();
+      DistributionMessageObserver.setInstance(observer);
+    });
+    
+    createPersistentRegion(vm0);
+    createPersistentRegion(vm1);
+    
+    createData(vm0, 0, 5, "A", "region1");
+    createData(vm0, 0, 5, "B", "region2");
+    
+    try {
+      backup(vm2);
+      fail("Backup should have failed with in progress exception");
+    } catch(Exception expected) {
+      //that's ok, hte backup should have failed
+    }
+    
+    //A second backup should succeed because the observer
+    //has been cleared and the backup state should be cleared.
+    BackupStatus status = backup(vm2);
+    assertEquals(2, status.getBackedUpDiskStores().size());
+    assertEquals(Collections.emptySet(), status.getOfflineDiskStores());
+
+    
+  }
    
   /**
    * Test for bug 42420. Invoke a backup

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3adb0b8e/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java
index 616e4d5..31f5947 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java
@@ -199,7 +199,7 @@ public class BackupJUnitTest {
     
     BackupManager backup = cache.startBackup(cache.getDistributedSystem().getDistributedMember());
     backup.prepareBackup();
-    backup.finishBackup(backupDir,null);
+    backup.finishBackup(backupDir, null, false);
     
     //Put another key to make sure we restore
     //from a backup that doesn't contain this key
@@ -247,7 +247,7 @@ public class BackupJUnitTest {
 
     BackupManager backup = cache.startBackup(cache.getDistributedSystem().getDistributedMember());
     backup.prepareBackup();
-    backup.finishBackup(backupDir,null);
+    backup.finishBackup(backupDir, null, false);
     assertEquals("No backup files should have been created", Collections.emptyList(), Arrays.asList(backupDir.list()));
   }
   
@@ -261,7 +261,7 @@ public class BackupJUnitTest {
 
     BackupManager backup = cache.startBackup(cache.getDistributedSystem().getDistributedMember());
     backup.prepareBackup();
-    backup.finishBackup(backupDir,null);
+    backup.finishBackup(backupDir, null, false);
     
     
     assertEquals("No backup files should have been created", Collections.emptyList(), Arrays.asList(backupDir.list()));
@@ -318,7 +318,7 @@ public class BackupJUnitTest {
 
     BackupManager backup = cache.startBackup(cache.getDistributedSystem().getDistributedMember());
     backup.prepareBackup();
-    backup.finishBackup(backupDir,null);
+    backup.finishBackup(backupDir, null, false);
     File cacheXmlBackup = FileUtil.find(backupDir, ".*config.cache.xml");
     assertTrue(cacheXmlBackup.exists());
     byte[] expectedBytes = getBytes(CACHE_XML_FILE);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3adb0b8e/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridgeJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridgeJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridgeJUnitTest.java
new file mode 100644
index 0000000..84b39d4
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridgeJUnitTest.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.management.internal.beans;
+
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.*;
+import static org.mockito.Mockito.*;
+
+import java.io.IOException;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.InOrder;
+
+import com.gemstone.gemfire.admin.internal.BackupDataStoreHelper;
+import com.gemstone.gemfire.admin.internal.FinishBackupRequest;
+import com.gemstone.gemfire.admin.internal.PrepareBackupRequest;
+import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.locks.DLockService;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.persistence.BackupManager;
+import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberManager;
+import com.gemstone.gemfire.test.fake.Fakes;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+public class DistributedSystemBridgeJUnitTest {
+  
+  private GemFireCacheImpl cache;
+  private BackupManager backupManager;
+
+  @Before
+  public void createCache() throws IOException {
+    cache = Fakes.cache();
+    PersistentMemberManager memberManager = mock(PersistentMemberManager.class);
+    backupManager = mock(BackupManager.class);
+    when(cache.startBackup(any())).thenReturn(backupManager);
+    when(cache.getPersistentMemberManager()).thenReturn(memberManager);
+    when(cache.getBackupManager()).thenReturn(backupManager);
+    
+    DLockService dlock = mock(DLockService.class);
+    when(dlock.lock(any(), anyLong(), anyLong())).thenReturn(true);
+    
+    DLockService.addLockServiceForTests(BackupDataStoreHelper.LOCK_SERVICE_NAME, dlock);
+    GemFireCacheImpl.setInstanceForTests(cache);
+  }
+  
+  @After
+  public void clearCache() {
+    GemFireCacheImpl.setInstanceForTests(null);
+    DLockService.removeLockServiceForTests(BackupDataStoreHelper.LOCK_SERVICE_NAME);
+  }
+  
+  @Test
+  public void testSucessfulBackup() throws Exception {
+    DM dm = cache.getDistributionManager();
+    
+    DistributedSystemBridge bridge = new DistributedSystemBridge(null);
+    bridge.backupAllMembers("/tmp", null);
+    
+    InOrder inOrder = inOrder(dm, backupManager);
+    inOrder.verify(dm).putOutgoing(isA(PrepareBackupRequest.class));
+    inOrder.verify(backupManager).prepareBackup();
+    inOrder.verify(dm).putOutgoing(isA(FinishBackupRequest.class));
+    inOrder.verify(backupManager).finishBackup(any(), any(), eq(false));
+  }
+
+  @Test
+  public void testPrepareErrorAbortsBackup() throws Exception {
+    DM dm = cache.getDistributionManager();
+    PersistentMemberManager memberManager = mock(PersistentMemberManager.class);
+    BackupManager backupManager = mock(BackupManager.class);
+    when(cache.startBackup(any())).thenReturn(backupManager);
+    when(cache.getPersistentMemberManager()).thenReturn(memberManager);
+    when(cache.getBackupManager()).thenReturn(backupManager);
+    when(dm.putOutgoing(isA(PrepareBackupRequest.class))).thenThrow(new RuntimeException("Fail the prepare"));
+    
+    
+    DistributedSystemBridge bridge = new DistributedSystemBridge(null);
+    try {
+      bridge.backupAllMembers("/tmp", null);
+      fail("Should have failed with an exception");
+    } catch(RuntimeException expected) {
+      
+    }
+    
+    verify(dm).putOutgoing(isA(FinishBackupRequest.class));
+    verify(backupManager).finishBackup(any(), any(), eq(true));
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3adb0b8e/gemfire-core/src/test/java/com/gemstone/gemfire/test/fake/Fakes.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/test/fake/Fakes.java b/gemfire-core/src/test/java/com/gemstone/gemfire/test/fake/Fakes.java
new file mode 100644
index 0000000..ffb4896
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/test/fake/Fakes.java
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.test.fake;
+
+import static org.mockito.Mockito.*;
+
+import java.net.UnknownHostException;
+
+import org.junit.Assert;
+
+import com.gemstone.gemfire.CancelCriterion;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionManager;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+
+/**
+ * Factory methods for fake objects for use in test.
+ * 
+ * These fakes are essentially mock objects with some limited
+ * functionality. For example the fake cache can return a fake
+ * distributed system.
+ * 
+ * All of the fakes returned by this class are Mockito.mocks, so
+ * they can be modified by using Mockito stubbing, ie
+ * 
+ * <pre>
+ * cache = Fakes.cache();
+ * Mockito.when(cache.getName()).thenReturn(...)
+ * <pre>
+ * 
+ * Please help extend this class by adding other commonly
+ * used objects to this collection of fakes.
+ */
+public class Fakes {
+  
+  /**
+   * A fake cache, which contains a fake distributed
+   * system, distribution manager, etc.
+   */
+  public static GemFireCacheImpl cache() {
+    GemFireCacheImpl cache = mock(GemFireCacheImpl.class);
+    InternalDistributedSystem system = mock(InternalDistributedSystem.class);
+    DistributionConfig config = mock(DistributionConfig.class);
+    DistributionManager distributionManager = mock(DistributionManager.class);
+    CancelCriterion systemCancelCriterion = mock(CancelCriterion.class);
+    
+    InternalDistributedMember member;
+    try {
+      member = new InternalDistributedMember("localhost", 5555);
+    } catch (UnknownHostException e) {
+      throw new RuntimeException(e);
+    }
+    
+    
+    when(cache.getDistributedSystem()).thenReturn(system);
+    when(cache.getMyId()).thenReturn(member);
+    when(cache.getDistributionManager()).thenReturn(distributionManager);
+    when(cache.getCancelCriterion()).thenReturn(systemCancelCriterion);
+    
+    when(system.getDistributedMember()).thenReturn(member);
+    when(system.getConfig()).thenReturn(config);
+    when(system.getDistributionManager()).thenReturn(distributionManager);
+    when(system.getCancelCriterion()).thenReturn(systemCancelCriterion);
+    
+    when(distributionManager.getId()).thenReturn(member);
+    when(distributionManager.getConfig()).thenReturn(config);
+    when(distributionManager.getSystem()).thenReturn(system);
+    when(distributionManager.getCancelCriterion()).thenReturn(systemCancelCriterion);
+    
+    return cache;
+  }
+
+  /**
+   * A fake distributed system, which contains a fake distribution manager.
+   */
+  public static InternalDistributedSystem distributedSystem() {
+    return cache().getDistributedSystem();
+  }
+
+  private Fakes() {
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3adb0b8e/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
index 3b4bd02..472d821 100644
--- a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
+++ b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
@@ -3,8 +3,8 @@ fromData,62,2a2bb80023b500082a2bb900240100b5000b2a2bb80025b500052ab40005b9002601
 toData,30,2ab400082bb800202b2ab4000bb9002102002ab40005c000032bb80022b1
 
 com/gemstone/gemfire/admin/internal/FinishBackupRequest,2
-fromData,22,2a2bb700282a2bb80029b500022a2bb80029b50003b1
-toData,22,2a2bb7002a2ab400022bb8002b2ab400032bb8002bb1
+fromData,33,2a2bb700292a2bb8002ab500022a2bb8002ab500032a2bb8002bb6002cb50004b1
+toData,33,2a2bb7002d2ab400022bb8002e2ab400032bb8002e2ab40004b8002f2bb80030b1
 
 com/gemstone/gemfire/admin/internal/FinishBackupResponse,2
 fromData,14,2a2bb700042a2bb80005b50003b1


[17/33] incubator-geode git commit: Added a category to unit test

Posted by ds...@apache.org.
Added a category to unit test


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

Branch: refs/heads/feature/GEODE-831
Commit: 28ee7c15426c3cc6b43204d28ccf9ff17cafdab4
Parents: 781277f
Author: Jason Huynh <hu...@gmail.com>
Authored: Sat Feb 13 14:10:21 2016 -0800
Committer: Jason Huynh <hu...@gmail.com>
Committed: Sat Feb 13 14:10:21 2016 -0800

----------------------------------------------------------------------
 .../cache/query/internal/QueryExecutionContextJUnitTest.java | 8 ++++++--
 gradle/dependency-versions.properties                        | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/28ee7c15/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryExecutionContextJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryExecutionContextJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryExecutionContextJUnitTest.java
index ed789c5..1520e7b 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryExecutionContextJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryExecutionContextJUnitTest.java
@@ -16,11 +16,15 @@
  */
 package com.gemstone.gemfire.cache.query.internal;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
 import org.junit.Test;
-import static org.junit.Assert.*;
+import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.cache.query.internal.QueryExecutionContext;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
+@Category(UnitTest.class)
 public class QueryExecutionContextJUnitTest {
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/28ee7c15/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index bfa4789..6aa7023 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -26,7 +26,7 @@ catch-throwable.version = 1.4.4
 cdi-api.version = 1.2
 cglib.version = 3.1
 classmate.version = 0.9.0
-commons-collections.version = 3.2.1
+commons-collections.version = 3.2.2
 commons-configuration.version = 1.6
 commons-fileupload.version = 1.3.1
 commons-io.version = 2.3


[33/33] incubator-geode git commit: Merge remote-tracking branch 'origin/develop' into FreeListManager branch

Posted by ds...@apache.org.
Merge remote-tracking branch 'origin/develop' into FreeListManager branch


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

Branch: refs/heads/feature/GEODE-831
Commit: 607d041de3138ea3fd3d5f4c290b1c03ac166d78
Parents: 81c9476 81417f9
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Wed Feb 17 14:52:43 2016 -0800
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed Feb 17 14:52:43 2016 -0800

----------------------------------------------------------------------
 LICENSE                                         |    6 +
 README.md                                       |    4 +-
 build.gradle                                    |    3 +-
 gemfire-assembly/src/main/dist/LICENSE          |    5 +
 .../management/internal/AgentUtilJUnitTest.java |   11 +-
 .../internal/AdminDistributedSystemImpl.java    |   25 +-
 .../admin/internal/BackupDataStoreHelper.java   |   76 +
 .../admin/internal/BackupDataStoreResult.java   |   57 +
 .../admin/internal/FinishBackupRequest.java     |   14 +-
 .../admin/jmx/internal/AgentConfigImpl.java     |   25 +-
 .../cache/FailedSynchronizationException.java   |   10 +-
 .../cache/query/internal/CompiledLike.java      |   55 +-
 .../cache/query/internal/ExecutionContext.java  |    4 +
 .../query/internal/QueryExecutionContext.java   |   12 +-
 .../query/internal/index/AbstractIndex.java     |    4 +
 .../query/internal/index/CompactRangeIndex.java |    4 +-
 .../query/internal/index/IndexElemArray.java    |  694 ++---
 .../gemfire/distributed/ServerLauncher.java     |    3 +
 .../internal/AbstractDistributionConfig.java    | 2690 ++----------------
 .../distributed/internal/ConfigAttribute.java   |   36 +
 .../internal/ConfigAttributeChecker.java        |   31 +
 .../internal/ConfigAttributeDesc.java           |   31 +
 .../internal/ConfigAttributeGetter.java         |   31 +
 .../internal/ConfigAttributeSetter.java         |   31 +
 .../gemfire/distributed/internal/DMStats.java   |    2 +
 .../internal/DistributionConfig.java            | 1061 ++++---
 .../internal/DistributionConfigImpl.java        |  361 +--
 .../distributed/internal/DistributionStats.java |   10 +
 .../internal/InternalDistributedSystem.java     |   53 +-
 .../internal/LonerDistributionManager.java      |    2 +
 .../internal/RuntimeDistributionConfigImpl.java |   74 +-
 .../internal/locks/DLockService.java            |   18 +-
 .../internal/membership/NetView.java            |    3 +-
 .../membership/gms/fd/GMSHealthMonitor.java     |  217 +-
 .../membership/gms/interfaces/JoinLeave.java    |    6 +
 .../membership/gms/membership/GMSJoinLeave.java |  122 +-
 .../gms/messenger/JGroupsMessenger.java         |  109 +-
 .../gms/mgr/GMSMembershipManager.java           |    9 +-
 .../gemfire/internal/AbstractConfig.java        |   60 +-
 .../gemstone/gemfire/internal/ConfigSource.java |   64 +-
 .../internal/admin/remote/AdminResponse.java    |    2 +-
 .../gemfire/internal/cache/CacheServerImpl.java |   11 +
 .../internal/cache/CacheServerLauncher.java     |    4 +-
 .../internal/cache/GemFireCacheImpl.java        |    2 +-
 .../cache/persistence/BackupManager.java        |   10 +-
 .../cache/tier/sockets/CacheServerHelper.java   |   46 +-
 .../internal/cache/xmlcache/CacheCreation.java  |    9 +-
 .../gemfire/internal/i18n/LocalizedStrings.java |    1 +
 .../gemfire/internal/logging/LogConfig.java     |   12 +-
 .../gemfire/internal/tcp/Connection.java        |    5 +-
 .../gemfire/management/internal/AgentUtil.java  |    3 +
 .../internal/beans/DistributedSystemBridge.java |   40 +-
 .../internal/beans/MemberMBeanBridge.java       |   14 +-
 .../cache/query/MultithreadedTester.java        |   73 +
 .../functional/ParameterBindingJUnitTest.java   |  192 +-
 .../query/internal/QCompilerJUnitTest.java      |   49 +-
 .../QueryExecutionContextJUnitTest.java         |   67 +
 ...ueryFromClauseCanonicalizationJUnitTest.java |    7 -
 .../query/internal/ResultsBagJUnitTest.java     |    7 -
 .../index/CompactRangeIndexJUnitTest.java       |   27 +-
 .../ReconnectedCacheServerDUnitTest.java        |   27 +
 .../gemfire/distributed/LocatorDUnitTest.java   |   32 +-
 .../internal/DistributionConfigJUnitTest.java   |  313 ++
 .../gms/membership/GMSJoinLeaveJUnitTest.java   |   16 +
 .../messenger/JGroupsMessengerJUnitTest.java    |    4 +-
 .../gemfire/internal/ConfigSourceJUnitTest.java |   89 +
 .../gemfire/internal/cache/BackupDUnitTest.java |   57 +
 .../gemfire/internal/cache/BackupJUnitTest.java |    8 +-
 .../cache/FixedPRSinglehopDUnitTest.java        |   57 +-
 .../beans/DistributedSystemBridgeJUnitTest.java |  106 +
 .../com/gemstone/gemfire/test/fake/Fakes.java   |   99 +
 .../sanctionedDataSerializables.txt             |    4 +-
 .../tools/pulse/internal/data/Cluster.java      |   38 +-
 .../pulse/internal/data/JMXDataUpdater.java     |  742 ++---
 .../pulse/internal/data/PulseConstants.java     |    7 +-
 .../internal/service/ClusterMemberService.java  |   19 +-
 .../internal/service/MemberDetailsService.java  |   15 +-
 .../internal/service/MembersListService.java    |   13 +-
 .../src/main/resources/gemfire.properties       |    4 +-
 gemfire-pulse/src/main/webapp/DataBrowser.html  |   52 +-
 gemfire-pulse/src/main/webapp/Login.html        |   46 +-
 .../src/main/webapp/MemberDetails.html          |   35 +-
 .../src/main/webapp/QueryStatistics.html        |   31 +-
 .../src/main/webapp/clusterDetail.html          |   36 +-
 .../src/main/webapp/css/grips/horizontal.png    |  Bin 0 -> 2753 bytes
 .../src/main/webapp/css/grips/vertical.png      |  Bin 0 -> 91 bytes
 gemfire-pulse/src/main/webapp/css/style.css     |   44 +-
 .../src/main/webapp/images/about-geode.png      |  Bin 0 -> 7640 bytes
 .../main/webapp/images/apache_geode_logo.png    |  Bin 0 -> 23616 bytes
 .../src/main/webapp/images/pivotal-logo.png     |  Bin 4302 -> 3500 bytes
 .../main/webapp/properties/gemfire.properties   |    4 +-
 .../webapp/properties/gemfire_en.properties     |    4 +-
 .../main/webapp/properties/gemfirexd.properties |    2 +-
 .../webapp/properties/gemfirexd_en.properties   |    2 +-
 gemfire-pulse/src/main/webapp/regionDetail.html |   33 +-
 .../src/main/webapp/scripts/lib/split.js        |  375 +++
 .../webapp/scripts/pulsescript/clusterDetail.js |   70 +-
 .../scripts/pulsescript/pages/DataBrowser.js    |   13 +-
 .../tools/pulse/tests/PulseBaseTest.java        |    6 +-
 .../gemfire/tools/pulse/tests/PulseTest.java    |    4 +-
 gradle.properties                               |    8 +-
 gradle/dependency-versions.properties           |    2 +-
 gradle/publish.gradle                           |   23 +
 103 files changed, 4304 insertions(+), 4750 deletions(-)
----------------------------------------------------------------------



[14/33] incubator-geode git commit: Fixing problems with network partition detection

Posted by ds...@apache.org.
Fixing problems with network partition detection

Recent changes in GMSJoinLeave and GMSHealthMonitor destabilized network
partition detection to the point that it was barely working.  This corrects
faults that were causing the failures - exponential barrages of suspect
processing and failure to detect loss of members during membership view
creation.

GMSJoinLeave's removeHealthyMembers and filterMembers methods had some problems
that resulted in unhealthy members not being detected.  GMSHealthMonitor
did not have barriers in place to prevent initiation of concurrent suspect
processing on the same member.  JGroupsMessenger was initiating final checks
on members if unable to send a message to them instead of merely raising
suspicion.


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

Branch: refs/heads/feature/GEODE-831
Commit: db654a7897f70d7f4c72c22f22c19e6c565e7990
Parents: 6f0a329
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Fri Feb 12 07:55:56 2016 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Fri Feb 12 08:09:19 2016 -0800

----------------------------------------------------------------------
 .../internal/membership/NetView.java            |   3 +-
 .../membership/gms/fd/GMSHealthMonitor.java     | 217 ++++++++++---------
 .../membership/gms/interfaces/JoinLeave.java    |   6 +
 .../membership/gms/membership/GMSJoinLeave.java | 122 +++++++----
 .../gms/messenger/JGroupsMessenger.java         |   4 +-
 .../gms/membership/GMSJoinLeaveJUnitTest.java   |  16 ++
 .../messenger/JGroupsMessengerJUnitTest.java    |   4 +-
 7 files changed, 229 insertions(+), 143 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/db654a78/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java
index b0ddcc0..40f5f71 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java
@@ -32,6 +32,7 @@ import java.util.Set;
 import org.apache.logging.log4j.Logger;
 
 import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.internal.DistributionManager;
 import com.gemstone.gemfire.internal.DataSerializableFixedID;
 import com.gemstone.gemfire.internal.InternalDataSerializer;
@@ -261,7 +262,7 @@ public class NetView implements DataSerializableFixedID {
     }
   }
 
-  public boolean contains(InternalDistributedMember mbr) {
+  public boolean contains(DistributedMember mbr) {
     return this.hashedMembers.contains(mbr);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/db654a78/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index b20fe03..beb781d 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -141,10 +141,10 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
    */
   final private ConcurrentHashMap<InternalDistributedMember, NetView> suspectedMemberInView = new ConcurrentHashMap<>();
   
-//  /**
-//   * Members undergoing final checks
-//   */
-//  final private List<InternalDistributedMember> membersInFinalCheck = Collections.synchronizedList(new ArrayList<>(30));
+  /**
+   * Members undergoing final checks
+   */
+  final private List<InternalDistributedMember> membersInFinalCheck = Collections.synchronizedList(new ArrayList<>(30));
 
   /**
    * Replies to messages
@@ -334,7 +334,8 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
           }
         }
       } catch (IOException e) {
-        logger.debug("Unexpected exception", e);
+        // this is expected if it is a connection-timeout or other failure
+        // to connect
       } catch (RuntimeException e) {
         logger.debug("Unexpected runtime exception", e);
         throw e;
@@ -346,7 +347,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
           try {
             socket.close();
           } catch (IOException e) {
-            logger.info("Unexpected exception", e);
+            // expected if the socket is already closed
           }
         }
       }
@@ -361,14 +362,22 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
   }
 
   /*
-   * It records the member activity for current time interval.
+   * Record the member activity for current time interval.
    */
   @Override
   public void contactedBy(InternalDistributedMember sender) {
-    TimeStamp cTS = new TimeStamp(currentTimeStamp);
+    contactedBy(sender, currentTimeStamp);
+  }
+  
+  
+  /**
+   * Record member activity at a specified time
+   */
+  private void contactedBy(InternalDistributedMember sender, long timeStamp) {
+    TimeStamp cTS = new TimeStamp(timeStamp);
     cTS = memberTimeStamps.putIfAbsent(sender, cTS);
     if (cTS != null) {
-      cTS.setTimeStamp(currentTimeStamp);
+      cTS.setTimeStamp(timeStamp);
     }
     if (suspectedMemberInView.remove(sender) != null) {
       logger.info("No longer suspecting {}", sender);
@@ -376,6 +385,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
     setNextNeighbor(currentView, null);
   }
 
+  
   private HeartbeatRequestMessage constructHeartbeatRequestMessage(final InternalDistributedMember mbr) {
     final int reqId = requestId.getAndIncrement();
     final HeartbeatRequestMessage hrm = new HeartbeatRequestMessage(mbr, reqId);
@@ -413,6 +423,9 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
   }
 
   private void initiateSuspicion(InternalDistributedMember mbr, String reason) {
+    if (services.getJoinLeave().isMemberLeaving(mbr)) {
+      return;
+    }
     SuspectRequest sr = new SuspectRequest(mbr, reason);
     List<SuspectRequest> sl = new ArrayList<SuspectRequest>();
     sl.add(sr);
@@ -432,6 +445,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
       // messages by returning true.
       return true;
     }
+    long startTime = System.currentTimeMillis();
     logger.trace("Checking member {}", member);
     final HeartbeatRequestMessage hrm = constructHeartbeatRequestMessage(member);
     final Response pingResp = new Response();
@@ -448,6 +462,9 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
             pingResp.wait(memberTimeout);
           }
           TimeStamp ts = memberTimeStamps.get(member);
+          if (ts != null && ts.getTime() > startTime) {
+            return true;
+          }
           if (pingResp.getResponseMsg() == null) {
             if (isStopping) {
               return true;
@@ -489,7 +506,8 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
       return doTCPCheckMember(suspectMember, clientSocket);
     }
     catch (IOException e) {
-      logger.debug("Unexpected exception", e);
+      // this is expected if it is a connection-timeout or other failure
+      // to connect
     } 
     finally {
       try {
@@ -498,7 +516,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
           clientSocket.close();
         }
       } catch (IOException e) {
-        logger.trace("Unexpected exception", e);
+        // expected
       }
     }
     return false;
@@ -518,9 +536,11 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
         this.stats.incTcpFinalCheckRequestsSent();
         logger.debug("Connected - reading response from suspect member {}", suspectMember);
         int b = in.read();
-        this.stats.incFinalCheckResponsesReceived();
-        this.stats.incTcpFinalCheckResponsesReceived();
         logger.debug("Received {}", (b == OK ? "OK" : (b == ERROR ? "ERROR" : b)), suspectMember);
+        if (b >= 0) {
+          this.stats.incFinalCheckResponsesReceived();
+          this.stats.incTcpFinalCheckResponsesReceived();
+        }
         if (b == OK) {
           TimeStamp ts = memberTimeStamps.get(suspectMember);
           if (ts != null) {
@@ -1030,7 +1050,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
     this.stats.incHeartbeatsReceived();
     if (m.getRequestId() < 0) {
       // a periodic heartbeat
-      contactedBy(m.getSender());
+      contactedBy(m.getSender(), System.currentTimeMillis());
     } else {
       Response resp = requestIdVsResponse.get(m.getRequestId());
       logger.trace("Got heartbeat from member {}. {}", m.getSender(), (resp != null ? "Check thread still waiting" : "Check thread is not waiting"));
@@ -1162,56 +1182,49 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
   private void checkIfAvailable(final InternalDistributedMember initiator,
       List<SuspectRequest> sMembers, final NetView cv) {
 
-//    List<InternalDistributedMember> membersChecked = new ArrayList<>(10);
-    try {
-      for (int i = 0; i < sMembers.size(); i++) {
-        final SuspectRequest sr = sMembers.get(i);
-        final InternalDistributedMember mbr = sr.getSuspectMember();
+    for (int i = 0; i < sMembers.size(); i++) {
+      final SuspectRequest sr = sMembers.get(i);
+      final InternalDistributedMember mbr = sr.getSuspectMember();
 
-        if (!cv.contains(mbr) /*|| membersInFinalCheck.contains(mbr)*/) {
-          continue;
-        }
+      if (!cv.contains(mbr) || membersInFinalCheck.contains(mbr)) {
+        continue;
+      }
 
-        if (mbr.equals(localAddress)) {
-          continue;// self
-        }
-        
-//        membersChecked.add(mbr);
-
-        // suspectMemberInView is now set by the heartbeat monitoring code
-        // to allow us to move on from watching members we've already
-        // suspected.  Since that code is updating this collection we
-        // cannot use it here as an indication that a member is currently
-        // undergoing a final check.
-        //      NetView view;
-        //      view = suspectedMemberInView.putIfAbsent(mbr, cv);
-
-        //      if (view == null || !view.equals(cv)) {
-        final String reason = sr.getReason();
-        logger.debug("Scheduling final check for member {}; reason={}", mbr, reason);
-        // its a coordinator
-        checkExecutor.execute(new Runnable() {
-
-          @Override
-          public void run() {
-            try {
-              inlineCheckIfAvailable(initiator, cv, true, mbr,
-                  reason);
-            } catch (DistributedSystemDisconnectedException e) {
-              return;
-            } catch (Exception e) {
-              logger.info("Unexpected exception while verifying member", e);
-            } finally {
-              GMSHealthMonitor.this.suspectedMemberInView.remove(mbr);
-            }
+      if (mbr.equals(localAddress)) {
+        continue;// self
+      }
+
+      // suspectMemberInView is now set by the heartbeat monitoring code
+      // to allow us to move on from watching members we've already
+      // suspected.  Since that code is updating this collection we
+      // cannot use it here as an indication that a member is currently
+      // undergoing a final check.
+      //      NetView view;
+      //      view = suspectedMemberInView.putIfAbsent(mbr, cv);
+
+      //      if (view == null || !view.equals(cv)) {
+      final String reason = sr.getReason();
+      logger.debug("Scheduling final check for member {}; reason={}", mbr, reason);
+      // its a coordinator
+      checkExecutor.execute(new Runnable() {
+
+        @Override
+        public void run() {
+          try {
+            inlineCheckIfAvailable(initiator, cv, true, mbr,
+                reason);
+          } catch (DistributedSystemDisconnectedException e) {
+            return;
+          } catch (Exception e) {
+            logger.info("Unexpected exception while verifying member", e);
+          } finally {
+            GMSHealthMonitor.this.suspectedMemberInView.remove(mbr);
           }
+        }
 
-          
-        });
-        //      }// scheduling for final check and removing it..
-      }
-    } finally {
-//      membersInFinalCheck.removeAll(membersChecked);
+
+      });
+      //      }// scheduling for final check and removing it..
     }
   }
 
@@ -1220,50 +1233,60 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
       boolean initiateRemoval,
       final InternalDistributedMember mbr, final String reason) {
 
-    services.memberSuspected(initiator, mbr, reason);
-    long startTime = System.currentTimeMillis();
-    // for some reason we used to update the timestamp for the member
-    // with the startTime, but we don't want to do that because it looks
-    // like a heartbeat has been received
-
-    logger.info("Performing final check for suspect member {} reason={}", mbr, reason);
-    boolean pinged;
-    int port = cv.getFailureDetectionPort(mbr);
-    if (port <= 0) {
-      logger.info("Unable to locate failure detection port - requesting a heartbeat");
-      if (logger.isDebugEnabled()) {
-        logger.debug("\ncurrent view: {}\nports: {}", cv, Arrays.toString(cv.getFailureDetectionPorts()));
-      }
-      pinged = GMSHealthMonitor.this.doCheckMember(mbr);
-      GMSHealthMonitor.this.stats.incFinalCheckRequestsSent();
-      GMSHealthMonitor.this.stats.incUdpFinalCheckRequestsSent();
-      if (pinged) {
-        GMSHealthMonitor.this.stats.incFinalCheckResponsesReceived();
-        GMSHealthMonitor.this.stats.incUdpFinalCheckResponsesReceived();
-      }
-    } else {
-      pinged = GMSHealthMonitor.this.doTCPCheckMember(mbr, port);
+    if (services.getJoinLeave().isMemberLeaving(mbr)) {
+      return false;
     }
 
     boolean failed = false;
-    if (!pinged && !isStopping) {
-      TimeStamp ts = memberTimeStamps.get(mbr);
-      if (ts == null || ts.getTime() <= startTime) {
-        logger.info("Final check failed - requesting removal of suspect member " + mbr);
-        if (initiateRemoval) {
-          services.getJoinLeave().remove(mbr, reason);
+
+    membersInFinalCheck.add(mbr);
+    try {
+      services.memberSuspected(initiator, mbr, reason);
+      long startTime = System.currentTimeMillis();
+      // for some reason we used to update the timestamp for the member
+      // with the startTime, but we don't want to do that because it looks
+      // like a heartbeat has been received
+  
+      logger.info("Performing final check for suspect member {} reason={}", mbr, reason);
+      boolean pinged;
+      int port = cv.getFailureDetectionPort(mbr);
+      if (port <= 0) {
+        logger.info("Unable to locate failure detection port - requesting a heartbeat");
+        if (logger.isDebugEnabled()) {
+          logger.debug("\ncurrent view: {}\nports: {}", cv, Arrays.toString(cv.getFailureDetectionPorts()));
+        }
+        pinged = GMSHealthMonitor.this.doCheckMember(mbr);
+        GMSHealthMonitor.this.stats.incFinalCheckRequestsSent();
+        GMSHealthMonitor.this.stats.incUdpFinalCheckRequestsSent();
+        if (pinged) {
+          GMSHealthMonitor.this.stats.incFinalCheckResponsesReceived();
+          GMSHealthMonitor.this.stats.incUdpFinalCheckResponsesReceived();
         }
-        failed = true;
       } else {
-        logger.info("Final check failed but detected recent message traffic for suspect member " + mbr);
+        pinged = GMSHealthMonitor.this.doTCPCheckMember(mbr, port);
       }
+  
+      if (!pinged && !isStopping) {
+        TimeStamp ts = memberTimeStamps.get(mbr);
+        if (ts == null || ts.getTime() <= startTime) {
+          logger.info("Final check failed - requesting removal of suspect member " + mbr);
+          if (initiateRemoval) {
+            services.getJoinLeave().remove(mbr, reason);
+          }
+          failed = true;
+        } else {
+          logger.info("Final check failed but detected recent message traffic for suspect member " + mbr);
+        }
+      }
+      if (!failed) {
+        logger.info("Final check passed for suspect member " + mbr);
+      }
+      // whether it's alive or not, at this point we allow it to
+      // be watched again
+      suspectedMemberInView.remove(mbr);
+    } finally {
+      membersInFinalCheck.remove(mbr);
     }
-    if (!failed) {
-      logger.info("Final check passed for suspect member " + mbr);
-    }
-    // whether it's alive or not, at this point we allow it to
-    // be watched again
-    suspectedMemberInView.remove(mbr);
     return !failed;
   }
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/db654a78/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/interfaces/JoinLeave.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/interfaces/JoinLeave.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/interfaces/JoinLeave.java
index 3f2d847..87409c5 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/interfaces/JoinLeave.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/interfaces/JoinLeave.java
@@ -61,6 +61,12 @@ public interface JoinLeave extends Service {
   NetView getPreviousView();
   
   /**
+   * check to see if a member is already in the process of leaving or
+   * being removed (in the next view)
+   */
+  boolean isMemberLeaving(DistributedMember mbr);
+  
+  /**
    * test hook
    */
   void disableDisconnectOnQuorumLossForTesting();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/db654a78/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 0f16ba9..5d34041 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -132,6 +132,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
   /** the previous view **/
   private volatile NetView previousView;
 
+  /** members who we have been declared dead in the current view */
   private final Set<InternalDistributedMember> removedMembers = new HashSet<>();
 
   /** members who we've received a leave message from **/
@@ -390,6 +391,26 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
     }
     return response;
   }
+  
+  @Override
+  public boolean isMemberLeaving(DistributedMember mbr) {
+    if (getPendingRequestIDs(LEAVE_REQUEST_MESSAGE).contains(mbr)
+        || getPendingRequestIDs(REMOVE_MEMBER_REQUEST).contains(mbr)
+        || !currentView.contains(mbr)) {
+      return true;
+    }
+    synchronized(removedMembers) {
+      if (removedMembers.contains(mbr)) {
+        return true;
+      }
+    }
+    synchronized(leftMembers) {
+      if (leftMembers.contains(mbr)) {
+        return true;
+      }
+    }
+    return false;
+  }
 
   /**
    * process a join request from another member. If this is the coordinator
@@ -465,8 +486,9 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
     }
 
     if (incomingRequest.getMemberID().equals(this.localAddress)) {
-      logger.info("I am being told to leave the distributed system");
+      logger.info("I am being told to leave the distributed system by {}", incomingRequest.getSender());
       forceDisconnect(incomingRequest.getReason());
+      return;
     }
 
     if (!isCoordinator && !isStopping && !services.getCancelCriterion().isCancelInProgress()) {
@@ -504,6 +526,8 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
    */
   private void processRemoveRequest(RemoveMemberMessage incomingRequest) {
     NetView v = currentView;
+    boolean fromMe = incomingRequest.getSender() == null ||
+        incomingRequest.getSender().equals(localAddress);
 
     InternalDistributedMember mbr = incomingRequest.getMemberID();
 
@@ -517,9 +541,11 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       return;
     }
 
-    logger.info("Membership received a request to remove " + mbr
+    if (!fromMe) {
+      logger.info("Membership received a request to remove " + mbr
         + " from " + incomingRequest.getSender() 
         + " reason="+incomingRequest.getReason());
+    }
 
     if (mbr.equals(this.localAddress)) {
       // oops - I've been kicked out
@@ -528,7 +554,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
     }
 
     if (getPendingRequestIDs(REMOVE_MEMBER_REQUEST).contains(mbr)) {
-      logger.debug("ignoring request as I already have a removal request for this member");
+      logger.debug("ignoring removal request as I already have a removal request for this member");
       return;
     }
 
@@ -805,6 +831,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       }
     } else { // !preparing
       if (isJoined && currentView != null && !view.contains(this.localAddress)) {
+        logger.fatal("This member is no longer in the membership view.  My ID is {} and the new view is {}", localAddress, view);
         forceDisconnect("This node is no longer in the membership view");
       } else {
         if (!m.isRebroadcast()) { // no need to ack a rebroadcast view
@@ -2066,6 +2093,8 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
           }
         }
 
+        logger.debug("unresponsive members that could not be reached: {}", unresponsive);
+        
         List<InternalDistributedMember> failures = new ArrayList<>(currentView.getCrashedMembers().size() + unresponsive.size());
 
         if (conflictingView != null && !conflictingView.getCreator().equals(localAddress) && conflictingView.getViewId() > newView.getViewId()
@@ -2149,42 +2178,51 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
      * performs health checks on the collection of members, removing any that
      * are found to be healthy
      * 
-     * @param mbrs
+     * @param suspects
      */
-    private void removeHealthyMembers(final Collection<InternalDistributedMember> mbrs) throws InterruptedException {
-      List<Callable<InternalDistributedMember>> checkers = new ArrayList<Callable<InternalDistributedMember>>(mbrs.size());
+    private void removeHealthyMembers(final Set<InternalDistributedMember> suspects) throws InterruptedException {
+      List<Callable<InternalDistributedMember>> checkers = new ArrayList<Callable<InternalDistributedMember>>(suspects.size());
 
       Set<InternalDistributedMember> newRemovals = new HashSet<>();
       Set<InternalDistributedMember> newLeaves = new HashSet<>();
 
-      filterMembers(mbrs, newRemovals, REMOVE_MEMBER_REQUEST);
-      filterMembers(mbrs, newLeaves, LEAVE_REQUEST_MESSAGE);   
+      filterMembers(suspects, newRemovals, REMOVE_MEMBER_REQUEST);
+      filterMembers(suspects, newLeaves, LEAVE_REQUEST_MESSAGE);
+      newRemovals.removeAll(newLeaves);  // if we received a Leave req the member is "healthy" 
       
-      for (InternalDistributedMember mbr : mbrs) {
+      suspects.removeAll(newLeaves);
+      
+      for (InternalDistributedMember mbr : suspects) {
+        if (newRemovals.contains(mbr) || newLeaves.contains(mbr)) {
+          continue; // no need to check this member - it's already been checked or is leaving
+        }
         checkers.add(new Callable<InternalDistributedMember>() {
           @Override
           public InternalDistributedMember call() throws Exception {
-            // return the member id if it fails health checks
             boolean available = GMSJoinLeave.this.checkIfAvailable(mbr);
             
             synchronized (viewRequests) {
               if (available) {
-                mbrs.remove(mbr);
+                suspects.remove(mbr);
               }
               viewRequests.notifyAll();
             }
             return mbr;
           }
+          @Override
+          public String toString() {
+            return mbr.toString();
+          }
         });
       }
-
-      mbrs.removeAll(newLeaves);
-
-      if (mbrs.isEmpty()) {
+      
+      if (checkers.isEmpty()) {
+        logger.debug("all unresponsive members are already scheduled to be removed");
         return;
       }
-      
-      ExecutorService svc = Executors.newFixedThreadPool(mbrs.size(), new ThreadFactory() {
+
+      logger.debug("checking availability of these members: {}", checkers);
+      ExecutorService svc = Executors.newFixedThreadPool(suspects.size(), new ThreadFactory() {
         AtomicInteger i = new AtomicInteger();
 
         @Override
@@ -2196,17 +2234,22 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
 
       try {
         long giveUpTime = System.currentTimeMillis() + viewAckTimeout;
-        List<Future<InternalDistributedMember>> futures;
-        futures = submitAll(svc, checkers);
+        // submit the tasks that will remove dead members from the suspects collection
+        submitAll(svc, checkers);
+        
+        // now wait for the tasks to do their work
         long waitTime = giveUpTime - System.currentTimeMillis();
         synchronized (viewRequests) {
-          while(waitTime>0 ) {
-            logger.debug("removeHealthyMembers: mbrs" + mbrs.size());
+          while ( waitTime > 0 ) {
+            logger.debug("removeHealthyMembers: mbrs" + suspects.size());
             
-            filterMembers(mbrs, newRemovals, REMOVE_MEMBER_REQUEST);
-            filterMembers(mbrs, newLeaves, LEAVE_REQUEST_MESSAGE);   
+            filterMembers(suspects, newRemovals, REMOVE_MEMBER_REQUEST);
+            filterMembers(suspects, newLeaves, LEAVE_REQUEST_MESSAGE);
+            newRemovals.removeAll(newLeaves);
             
-            if(mbrs.isEmpty()) {
+            suspects.removeAll(newLeaves);
+            
+            if(suspects.isEmpty() || newRemovals.containsAll(suspects)) {
               break;
             }
             
@@ -2214,31 +2257,28 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
             waitTime = giveUpTime - System.currentTimeMillis();
           }
         }
-        
-        //we have waited for all members, now check if we considered any removeRequest;
-        //add them back to create new view
-        if(!newRemovals.isEmpty()) {
-          newRemovals.removeAll(newLeaves);
-          mbrs.addAll(newRemovals);
-        }
-        
       } finally {
         svc.shutdownNow();
       }
     }
 
-    protected void filterMembers(Collection<InternalDistributedMember> mbrs, Set<InternalDistributedMember> removalRequestForMembers, short requestType) {
-      Set<InternalDistributedMember> gotRemovalRequests = getPendingRequestIDs(requestType);
+    /**
+     * This gets pending requests and returns the IDs of any that are in the given collection
+     * @param mbrs collection of IDs to search for
+     * @param matchingMembers collection to store matching IDs in
+     * @param requestType leave/remove/join
+     */
+    protected void filterMembers(Collection<InternalDistributedMember> mbrs, Set<InternalDistributedMember> matchingMembers, short requestType) {
+      Set<InternalDistributedMember> requests = getPendingRequestIDs(requestType);
       
-      if(!gotRemovalRequests.isEmpty()) {
-        logger.debug("removeHealthyMembers: gotRemovalRequests " + gotRemovalRequests.size());
-        Iterator<InternalDistributedMember> itr = gotRemovalRequests.iterator();
+      if(!requests.isEmpty()) {
+        logger.debug("filterMembers: processing " + requests.size() + " requests for type " + requestType);
+        Iterator<InternalDistributedMember> itr = requests.iterator();
         while(itr.hasNext()) {
-          InternalDistributedMember removeMember = itr.next();
-          if(mbrs.contains(removeMember)) {
+          InternalDistributedMember memberID = itr.next();
+          if(mbrs.contains(memberID)) {
             testFlagForRemovalRequest = true;
-            removalRequestForMembers.add(removeMember);
-            mbrs.remove(removeMember);
+            matchingMembers.add(memberID);
           }
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/db654a78/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
index be2c405..3bd1e83 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
@@ -401,8 +401,8 @@ public class JGroupsMessenger implements Messenger {
         }
       }
       if (recipient != null) {
-        services.getHealthMonitor().checkIfAvailable(recipient,
-            "Unable to send messages to this member via JGroups", true);
+        services.getHealthMonitor().suspect(recipient,
+            "Unable to send messages to this member via JGroups");
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/db654a78/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
index 5b58c27..79aa02a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
@@ -303,6 +303,22 @@ public class GMSJoinLeaveJUnitTest {
   }
   
   @Test
+  public void testIsMemberLeaving() throws Exception {
+    initMocks();
+    prepareAndInstallView(mockMembers[0], createMemberList(mockMembers[0], mockMembers[1], gmsJoinLeaveMemberId));
+    MethodExecuted removeMessageSent = new MethodExecuted();
+    when(messenger.send(any(RemoveMemberMessage.class))).thenAnswer(removeMessageSent);
+    assertFalse(gmsJoinLeave.isMemberLeaving(mockMembers[0]));
+    assertFalse(gmsJoinLeave.isMemberLeaving(mockMembers[1]));
+    gmsJoinLeave.remove(mockMembers[0], "removing for test");
+    assertTrue(gmsJoinLeave.isMemberLeaving(mockMembers[0]));
+    LeaveRequestMessage msg = new LeaveRequestMessage(gmsJoinLeave.getMemberID(), mockMembers[1], "leaving for test");
+    msg.setSender(mockMembers[1]);
+    gmsJoinLeave.processMessage(msg);
+    assertTrue(gmsJoinLeave.isMemberLeaving(mockMembers[1]));
+  }
+  
+  @Test
   public void testRemoveAndLeaveIsNotACrash() throws Exception {
     // simultaneous leave & remove requests for a member
     // should not result in it's being seen as a crashed member

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/db654a78/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
index 805dd88..f30efc8 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
@@ -164,7 +164,7 @@ public class JGroupsMessengerJUnitTest {
     when(joinLeave.getView()).thenReturn(v);
     messenger.installView(v);
     messenger.handleJGroupsIOException(new IOException("je m'en fiche"), new JGAddress(v.getMembers().get(1)));
-    verify(healthMonitor).checkIfAvailable(isA(InternalDistributedMember.class), isA(String.class), isA(Boolean.class));
+    verify(healthMonitor).suspect(isA(InternalDistributedMember.class), isA(String.class));
   }
   
   @Test
@@ -742,7 +742,7 @@ public class JGroupsMessengerJUnitTest {
     IOException ioe = new IOException("test exception");
     messenger.handleJGroupsIOException(ioe, new JGAddress(mbr));
     messenger.handleJGroupsIOException(ioe, new JGAddress(mbr)); // should be ignored
-    verify(healthMonitor).checkIfAvailable(mbr, "Unable to send messages to this member via JGroups", true);
+    verify(healthMonitor).suspect(mbr, "Unable to send messages to this member via JGroups");
   }
   
   @Test


[32/33] incubator-geode git commit: finish up FreeListManagerTest

Posted by ds...@apache.org.
finish up FreeListManagerTest


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

Branch: refs/heads/feature/GEODE-831
Commit: 81c9476ec533d0a2bcc69632994c3a34b9b661f4
Parents: 95e23f0
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Wed Feb 17 14:51:10 2016 -0800
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed Feb 17 14:51:10 2016 -0800

----------------------------------------------------------------------
 .../internal/offheap/FreeListManager.java       |  60 +++---
 .../internal/offheap/FreeListManagerTest.java   | 181 ++++++++++++++++++-
 2 files changed, 207 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81c9476e/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
index 951e8a8..8efefbd 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
@@ -234,14 +234,18 @@ public class FreeListManager {
   private void logOffHeapState(int chunkSize) {
     if (InternalDistributedSystem.getAnyInstance() != null) {
       LogWriter lw = InternalDistributedSystem.getAnyInstance().getLogWriter();
-      OffHeapMemoryStats stats = this.ma.getStats();
-      lw.info("OutOfOffHeapMemory allocating size of " + chunkSize + ". allocated=" + this.allocatedSize.get() + " compactions=" + this.compactCount.get() + " objects=" + stats.getObjects() + " free=" + stats.getFreeMemory() + " fragments=" + stats.getFragments() + " largestFragment=" + stats.getLargestFragment() + " fragmentation=" + stats.getFragmentation());
-      logFragmentState(lw);
-      logTinyState(lw);
-      logHugeState(lw);
+      logOffHeapState(lw, chunkSize);
     }
   }
 
+  void logOffHeapState(LogWriter lw, int chunkSize) {
+    OffHeapMemoryStats stats = this.ma.getStats();
+    lw.info("OutOfOffHeapMemory allocating size of " + chunkSize + ". allocated=" + this.allocatedSize.get() + " compactions=" + this.compactCount.get() + " objects=" + stats.getObjects() + " free=" + stats.getFreeMemory() + " fragments=" + stats.getFragments() + " largestFragment=" + stats.getLargestFragment() + " fragmentation=" + stats.getFragmentation());
+    logFragmentState(lw);
+    logTinyState(lw);
+    logHugeState(lw);
+  }
+
   private void logHugeState(LogWriter lw) {
     for (Chunk c: this.hugeChunkSet) {
       lw.info("Free huge of size " + c.getSize());
@@ -264,7 +268,7 @@ public class FreeListManager {
     }
   }
 
-  private final AtomicInteger compactCount = new AtomicInteger();
+  protected final AtomicInteger compactCount = new AtomicInteger();
   /*
    * Set this to "true" to perform data integrity checks on allocated and reused Chunks.  This may clobber 
    * performance so turn on only when necessary.
@@ -311,6 +315,7 @@ public class FreeListManager {
   boolean compact(int chunkSize) {
     final long startCompactionTime = this.ma.getStats().startCompaction();
     final int countPreSync = this.compactCount.get();
+    afterCompactCountFetched();
     try {
       synchronized (this) {
         if (this.compactCount.get() != countPreSync) {
@@ -329,7 +334,6 @@ public class FreeListManager {
           long addr = l.poll();
           while (addr != 0) {
             int idx = Arrays.binarySearch(sorted, 0, sortedSize, addr);
-            //System.out.println("DEBUG addr=" + addr + " size=" + Chunk.getSize(addr) + " idx="+idx + " sortedSize=" + sortedSize);
             idx = -idx;
             idx--;
             if (idx == sortedSize) {
@@ -442,6 +446,12 @@ public class FreeListManager {
     }
   }
 
+  /**
+   * Unit tests override this method to get better test coverage
+   */
+  protected void afterCompactCountFetched() {
+  }
+  
   static void verifyOffHeapAlignment(int tinyMultiple) {
     if (tinyMultiple <= 0 || (tinyMultiple & 3) != 0) {
       throw new IllegalStateException("gemfire.OFF_HEAP_ALIGNMENT must be a multiple of 8.");
@@ -542,7 +552,7 @@ public class FreeListManager {
     }
   }
 
-  private Chunk allocateFromFragment(final int fragIdx, final int chunkSize) {
+  Chunk allocateFromFragment(final int fragIdx, final int chunkSize) {
     if (fragIdx >= this.fragmentList.size()) return null;
     final Fragment fragment;
     try {
@@ -573,11 +583,7 @@ public class FreeListManager {
           // We did the allocate!
           this.lastFragmentAllocation.set(fragIdx);
           Chunk result = new GemFireChunk(fragment.getMemoryAddress()+oldOffset, chunkSize+extraSize);
-
-          if(this.validateMemoryWithFill) {
-            result.validateFill();
-          }
-
+          checkDataIntegrity(result);
           return result;
         } else {
           Chunk result = basicAllocate(chunkSize, false);
@@ -603,12 +609,7 @@ public class FreeListManager {
       long memAddr = clq.poll();
       if (memAddr != 0) {
         Chunk result = new GemFireChunk(memAddr);
-
-        // Data integrity check.
-        if(this.validateMemoryWithFill) {          
-          result.validateFill();
-        }
-
+        checkDataIntegrity(result);
         result.readyForAllocation();
         return result;
       }
@@ -627,11 +628,7 @@ public class FreeListManager {
     if (result != null) {
       if (result.getSize() - (HUGE_MULTIPLE - Chunk.OFF_HEAP_HEADER_SIZE) < size) {
         // close enough to the requested size; just return it.
-
-        // Data integrity check.
-        if(this.validateMemoryWithFill) {
-          result.validateFill();
-        }
+        checkDataIntegrity(result);
         result.readyForAllocation();
         return result;
       } else {
@@ -647,6 +644,11 @@ public class FreeListManager {
     }
   }
   
+  private void checkDataIntegrity(Chunk data) {
+    if (this.validateMemoryWithFill) {
+      data.validateFill();
+    }
+  }
   /**
    * Used by the FreeListManager to easily search its
    * ConcurrentSkipListSet. This is not a real chunk
@@ -697,15 +699,21 @@ public class FreeListManager {
     if (clq != null) {
       clq.offer(addr);
     } else {
-      clq = new SyncChunkStack();
+      clq = createFreeListForEmptySlot(freeLists, idx);
       clq.offer(addr);
       if (!freeLists.compareAndSet(idx, null, clq)) {
         clq = freeLists.get(idx);
         clq.offer(addr);
       }
     }
-
   }
+  /**
+   * Tests override this method to simulate concurrent modification
+   */
+  protected SyncChunkStack createFreeListForEmptySlot(AtomicReferenceArray<SyncChunkStack> freeLists, int idx) {
+    return new SyncChunkStack();
+  }
+  
   private void freeHuge(long addr, int cSize) {
     this.hugeChunkSet.add(new GemFireChunk(addr)); // TODO make this a collection of longs
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81c9476e/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
index 5f3a546..0de4ea7 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
@@ -23,6 +23,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicReferenceArray;
 
 import org.junit.After;
 import org.junit.AfterClass;
@@ -32,6 +33,7 @@ import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.OutOfOffHeapMemoryException;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
@@ -44,7 +46,7 @@ public class FreeListManagerTest {
   private final int DEFAULT_SLAB_SIZE = 1024*1024*5;
   private final SimpleMemoryAllocatorImpl ma = mock(SimpleMemoryAllocatorImpl.class);
   private final OffHeapMemoryStats stats = mock(OffHeapMemoryStats.class);
-  private FreeListManager freeListManager;
+  private TestableFreeListManager freeListManager;
   
 
   @BeforeClass
@@ -67,12 +69,15 @@ public class FreeListManagerTest {
     }
   }
   
-  private static FreeListManager createFreeListManager(SimpleMemoryAllocatorImpl ma, AddressableMemoryChunk[] slabs) {
+  private static TestableFreeListManager createFreeListManager(SimpleMemoryAllocatorImpl ma, AddressableMemoryChunk[] slabs) {
     return new TestableFreeListManager(ma, slabs);
   }
   
   private void setUpSingleSlabManager() {
-    UnsafeMemoryChunk slab = new UnsafeMemoryChunk(DEFAULT_SLAB_SIZE);
+    setUpSingleSlabManager(DEFAULT_SLAB_SIZE);
+  }
+  private void setUpSingleSlabManager(int slabSize) {
+    UnsafeMemoryChunk slab = new UnsafeMemoryChunk(slabSize);
     this.freeListManager = createFreeListManager(ma, new UnsafeMemoryChunk[] {slab});
   }
 
@@ -190,6 +195,22 @@ public class FreeListManagerTest {
   }
    
   @Test
+  public void freeTinyMemoryWithTwoTinyFreeListsEqualToChunkSize() {
+    setUpSingleSlabManager();
+    int dataSize = 10;
+    
+    Chunk c = this.freeListManager.allocate(dataSize);
+    Chunk.release(c.getMemoryAddress(), this.freeListManager);
+    
+    int dataSize2 = 100;
+    
+    Chunk c2 = this.freeListManager.allocate(dataSize2);
+    Chunk.release(c2.getMemoryAddress(), this.freeListManager);
+    
+    assertThat(this.freeListManager.getFreeTinyMemory()).isEqualTo(computeExpectedSize(dataSize)+computeExpectedSize(dataSize2));
+  }
+   
+  @Test
   public void freeHugeMemoryDefault() {
     setUpSingleSlabManager();
     
@@ -275,7 +296,7 @@ public class FreeListManagerTest {
     for (Chunk c: chunks) {
       Chunk.release(c.getMemoryAddress(), this.freeListManager);
     }
-    
+    this.freeListManager.firstCompact = false;
     assertThat(this.freeListManager.compact(DEFAULT_SLAB_SIZE+1)).isFalse();
   }
   
@@ -328,7 +349,7 @@ public class FreeListManagerTest {
   public void compactAfterAllocatingAll() {
     setUpSingleSlabManager();
     Chunk c = freeListManager.allocate(DEFAULT_SLAB_SIZE-8);
-    
+    this.freeListManager.firstCompact = false;
     assertThat(this.freeListManager.compact(1)).isFalse();
     // call compact twice for extra code coverage
     assertThat(this.freeListManager.compact(1)).isFalse();
@@ -336,13 +357,75 @@ public class FreeListManagerTest {
   }
   
   @Test
+  public void afterAllocatingAllOneSizeCompactToAllocateDifferentSize() {
+    setUpSingleSlabManager();
+    ArrayList<Chunk> chunksToFree = new ArrayList<>();
+    ArrayList<Chunk> chunksToFreeLater = new ArrayList<>();
+    int ALLOCATE_COUNT = 1000;
+    Chunk bigChunk = freeListManager.allocate(DEFAULT_SLAB_SIZE-8-(ALLOCATE_COUNT*32)-256-256);
+    for (int i=0; i < ALLOCATE_COUNT; i++) {
+      Chunk c = freeListManager.allocate(24);
+      if (i%3 != 2) {
+        chunksToFree.add(c);
+      } else {
+        chunksToFreeLater.add(c);
+      }
+    }
+    Chunk c1 = freeListManager.allocate(64-8);
+    Chunk c2 = freeListManager.allocate(64-8);
+    Chunk c3 = freeListManager.allocate(64-8);
+    Chunk c4 = freeListManager.allocate(64-8);
+
+    Chunk mediumChunk1 = freeListManager.allocate(128-8);
+    Chunk mediumChunk2 = freeListManager.allocate(128-8);
+
+    Chunk.release(bigChunk.getMemoryAddress(), freeListManager);
+    int s = chunksToFree.size();
+    for (int i=s/2; i >=0; i--) {
+      Chunk c = chunksToFree.get(i);
+      Chunk.release(c.getMemoryAddress(), freeListManager);
+    }
+    for (int i=(s/2)+1; i < s; i++) {
+      Chunk c = chunksToFree.get(i);
+      Chunk.release(c.getMemoryAddress(), freeListManager);
+    }
+    Chunk.release(c3.getMemoryAddress(), freeListManager);
+    Chunk.release(c1.getMemoryAddress(), freeListManager);
+    Chunk.release(c2.getMemoryAddress(), freeListManager);
+    Chunk.release(c4.getMemoryAddress(), freeListManager);
+    Chunk.release(mediumChunk1.getMemoryAddress(), freeListManager);
+    Chunk.release(mediumChunk2.getMemoryAddress(), freeListManager);
+    this.freeListManager.firstCompact = false;
+    assertThat(freeListManager.compact(DEFAULT_SLAB_SIZE-(ALLOCATE_COUNT*32))).isFalse();
+    for (int i=0; i < ((256*2)/96); i++) {
+      Chunk.release(chunksToFreeLater.get(i).getMemoryAddress(), freeListManager);
+    }
+    assertThat(freeListManager.compact(DEFAULT_SLAB_SIZE-(ALLOCATE_COUNT*32))).isTrue();
+  }
+  
+  @Test
+  public void afterAllocatingAndFreeingCompact() {
+    int slabSize = 1024*3;
+    setUpSingleSlabManager(slabSize);
+    Chunk bigChunk1 = freeListManager.allocate(slabSize/3-8);
+    Chunk bigChunk2 = freeListManager.allocate(slabSize/3-8);
+    Chunk bigChunk3 = freeListManager.allocate(slabSize/3-8);
+    this.freeListManager.firstCompact = false;
+    assertThat(freeListManager.compact(1)).isFalse();
+    Chunk.release(bigChunk3.getMemoryAddress(), freeListManager);
+    Chunk.release(bigChunk2.getMemoryAddress(), freeListManager);
+    Chunk.release(bigChunk1.getMemoryAddress(), freeListManager);
+    assertThat(freeListManager.compact(slabSize)).isTrue();
+  }
+  
+  @Test
   public void compactWithEmptyTinyFreeList() {
     setUpSingleSlabManager();
     Fragment originalFragment = this.freeListManager.getFragmentList().get(0);
     Chunk c = freeListManager.allocate(16);
     Chunk.release(c.getMemoryAddress(), this.freeListManager);
     c = freeListManager.allocate(16);
-    
+    this.freeListManager.firstCompact = false;
     assertThat(this.freeListManager.compact(1)).isTrue();
     assertThat(this.freeListManager.getFragmentList()).hasSize(1);
     Fragment compactedFragment = this.freeListManager.getFragmentList().get(0);
@@ -586,7 +669,7 @@ public class FreeListManagerTest {
   
   @Test
   public void orderBlocksContainsTinyFree() {
-    UnsafeMemoryChunk chunk = new UnsafeMemoryChunk(64);
+    UnsafeMemoryChunk chunk = new UnsafeMemoryChunk(96);
     long address = chunk.getMemoryAddress();
     this.freeListManager = createFreeListManager(ma, new UnsafeMemoryChunk[] {chunk});
     Chunk c = this.freeListManager.allocate(24);
@@ -595,9 +678,67 @@ public class FreeListManagerTest {
 
     List<MemoryBlock> ob = this.freeListManager.getOrderedBlocks();
     assertThat(ob).hasSize(3);
-//    assertThat(ob.get(0).getMemoryAddress()).isEqualTo(address);
   }
 
+  @Test
+  public void allocatedBlocksEmptyIfNoAllocations() {
+    UnsafeMemoryChunk chunk = new UnsafeMemoryChunk(10);
+    this.freeListManager = createFreeListManager(ma, new UnsafeMemoryChunk[] {chunk});
+    List<MemoryBlock> ob = this.freeListManager.getAllocatedBlocks();
+    assertThat(ob).hasSize(0);
+  }
+
+  @Test
+  public void allocatedBlocksEmptyAfterFree() {
+    UnsafeMemoryChunk chunk = new UnsafeMemoryChunk(96);
+    this.freeListManager = createFreeListManager(ma, new UnsafeMemoryChunk[] {chunk});
+    Chunk c = this.freeListManager.allocate(24);
+    Chunk.release(c.getMemoryAddress(), this.freeListManager);
+    List<MemoryBlock> ob = this.freeListManager.getAllocatedBlocks();
+    assertThat(ob).hasSize(0);
+  }
+
+  @Test
+  public void allocatedBlocksHasAllocatedChunk() {
+    UnsafeMemoryChunk chunk = new UnsafeMemoryChunk(96);
+    this.freeListManager = createFreeListManager(ma, new UnsafeMemoryChunk[] {chunk});
+    Chunk c = this.freeListManager.allocate(24);
+    List<MemoryBlock> ob = this.freeListManager.getAllocatedBlocks();
+    assertThat(ob).hasSize(1);
+    assertThat(ob.get(0).getMemoryAddress()).isEqualTo(c.getMemoryAddress());
+  }
+  
+  @Test
+  public void allocatedBlocksHasBothAllocatedChunks() {
+    UnsafeMemoryChunk chunk = new UnsafeMemoryChunk(96);
+    this.freeListManager = createFreeListManager(ma, new UnsafeMemoryChunk[] {chunk});
+    Chunk c = this.freeListManager.allocate(24);
+    Chunk c2 = this.freeListManager.allocate(33);
+    List<MemoryBlock> ob = this.freeListManager.getAllocatedBlocks();
+    assertThat(ob).hasSize(2);
+  }
+  
+  @Test
+  public void allocateFromFragmentWithBadIndexesReturnsNull() {
+    UnsafeMemoryChunk chunk = new UnsafeMemoryChunk(96);
+    this.freeListManager = createFreeListManager(ma, new UnsafeMemoryChunk[] {chunk});
+    assertThat(this.freeListManager.allocateFromFragment(-1, 32)).isNull();
+    assertThat(this.freeListManager.allocateFromFragment(1, 32)).isNull();
+  }
+
+  @Test
+  public void testLogging() {
+    UnsafeMemoryChunk chunk = new UnsafeMemoryChunk(32);
+    UnsafeMemoryChunk chunk2 = new UnsafeMemoryChunk(1024*1024*5);
+    this.freeListManager = createFreeListManager(ma, new UnsafeMemoryChunk[] {chunk, chunk2});
+    Chunk c = this.freeListManager.allocate(24);
+    Chunk c2 = this.freeListManager.allocate(1024*1024);
+    Chunk.release(c.getMemoryAddress(), this.freeListManager);
+    Chunk.release(c2.getMemoryAddress(), this.freeListManager);
+    
+    LogWriter lw = mock(LogWriter.class);
+    this.freeListManager.logOffHeapState(lw, 1024);
+  }
   /**
    * Just like Fragment except that the first time allocate is called
    * it returns false indicating that the allocate failed.
@@ -619,11 +760,35 @@ public class FreeListManagerTest {
     }
   }
   private static class TestableFreeListManager extends FreeListManager {
+    private boolean firstTime = true;
+    
     @Override
     protected Fragment createFragment(long addr, int size) {
       return new TestableFragment(addr, size);
     }
 
+    @Override
+    protected SyncChunkStack createFreeListForEmptySlot(AtomicReferenceArray<SyncChunkStack> freeLists, int idx) {
+      if (this.firstTime) {
+        this.firstTime = false;
+        SyncChunkStack clq = super.createFreeListForEmptySlot(freeLists, idx);
+        if (!freeLists.compareAndSet(idx, null, clq)) {
+          fail("this should never happen. Indicates a concurrent modification");
+        }
+      }
+      return super.createFreeListForEmptySlot(freeLists, idx);
+    }
+
+    public boolean firstCompact = true;
+    @Override
+    protected void afterCompactCountFetched() {
+      if (this.firstCompact) {
+        this.firstCompact = false;
+        // Force compact into thinking a concurrent compaction happened.
+        this.compactCount.incrementAndGet();
+      }
+    }
+    
     public TestableFreeListManager(SimpleMemoryAllocatorImpl ma, AddressableMemoryChunk[] slabs) {
       super(ma, slabs);
     }


[09/33] incubator-geode git commit: GEODE-918: Add ASF header to generate pom files

Posted by ds...@apache.org.
GEODE-918: Add ASF header to generate pom files


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

Branch: refs/heads/feature/GEODE-831
Commit: a928ea7a76e887d5514ad98739d87e6ee2bb2278
Parents: dcf6bef
Author: Anthony Baker <ab...@apache.org>
Authored: Thu Feb 11 12:49:01 2016 -0800
Committer: Anthony Baker <ab...@apache.org>
Committed: Thu Feb 11 19:56:10 2016 -0800

----------------------------------------------------------------------
 gradle/publish.gradle | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a928ea7a/gradle/publish.gradle
----------------------------------------------------------------------
diff --git a/gradle/publish.gradle b/gradle/publish.gradle
index 4eb6a75..73e4cd3 100644
--- a/gradle/publish.gradle
+++ b/gradle/publish.gradle
@@ -30,6 +30,29 @@ subprojects {
   }
   
   modifyPom {
+    withXml {
+      def elem = asElement()
+      def hdr = elem.getOwnerDocument().createComment(
+  '''
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ''')
+
+      elem.insertBefore(hdr, elem.getFirstChild())
+    }
+
     project {
       name 'Apache Geode (incubating)'
       description 'Apache Geode (incubating) provides a database-like consistency model, reliable transaction processing and a shared-nothing architecture to maintain very low latency performance with high concurrency processing'


[31/33] incubator-geode git commit: GEODE-511: rebranding pulse

Posted by ds...@apache.org.
GEODE-511: rebranding pulse


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

Branch: refs/heads/feature/GEODE-831
Commit: 81417f93a157dd4bd25a3f5848c9d368829ef364
Parents: 1975556
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Wed Feb 17 07:45:28 2016 -0800
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Wed Feb 17 10:37:17 2016 -0800

----------------------------------------------------------------------
 .../src/main/resources/gemfire.properties       |   4 +-
 gemfire-pulse/src/main/webapp/DataBrowser.html  |  35 ++++----------
 gemfire-pulse/src/main/webapp/Login.html        |  46 ++++---------------
 .../src/main/webapp/MemberDetails.html          |  35 ++++----------
 .../src/main/webapp/QueryStatistics.html        |  31 ++++---------
 .../src/main/webapp/clusterDetail.html          |  36 +++++----------
 gemfire-pulse/src/main/webapp/css/style.css     |  10 +++-
 .../src/main/webapp/images/about-geode.png      | Bin 0 -> 7640 bytes
 .../main/webapp/images/apache_geode_logo.png    | Bin 0 -> 23616 bytes
 .../src/main/webapp/images/pivotal-logo.png     | Bin 4302 -> 3500 bytes
 .../main/webapp/properties/gemfire.properties   |   4 +-
 .../webapp/properties/gemfire_en.properties     |   4 +-
 .../main/webapp/properties/gemfirexd.properties |   2 +-
 .../webapp/properties/gemfirexd_en.properties   |   2 +-
 gemfire-pulse/src/main/webapp/regionDetail.html |  33 ++++---------
 15 files changed, 73 insertions(+), 169 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/resources/gemfire.properties
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/resources/gemfire.properties b/gemfire-pulse/src/main/resources/gemfire.properties
index e1db67c..84ae196 100644
--- a/gemfire-pulse/src/main/resources/gemfire.properties
+++ b/gemfire-pulse/src/main/resources/gemfire.properties
@@ -24,9 +24,9 @@ pulse-readgetpersec-custom=Read/Sec.
 pulse-writes-custom=Writes
 pulse-reads-custom=Reads
 pulse-monitoring-custom=images/pulse-monitoring.png
-pulse-aboutimg-custom=images/about.png
+pulse-aboutimg-custom=images/about-geode.png
 pulse-help-custom=http://gemfire.docs.pivotal.io/latest/userguide/index.html#tools_modules/pulse/chapter_overview.html
-pulse-about-custom=The Pulse tool monitors Pivotal&#0153; GemFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
+pulse-about-custom=The Pulse tool monitors Apache Geode&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
 pulse-regionstableCaps-custom=Regions
 pulse-rtSummaryBySize-custom=Regions Summary - By Entry Count
 pulse-regionstablePath-custom=Region Path:&nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/webapp/DataBrowser.html
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/DataBrowser.html b/gemfire-pulse/src/main/webapp/DataBrowser.html
index 341f359..a046cf4 100644
--- a/gemfire-pulse/src/main/webapp/DataBrowser.html
+++ b/gemfire-pulse/src/main/webapp/DataBrowser.html
@@ -118,36 +118,21 @@
 	        <div id="detailsAbout" class="aboutBlock display-none">
 	          <div class="aboutDetailsBlock">
 	            <div class="left widthfull-100per marginBottom30">
-	              <div class="left"><img src="images/about.png">
+	              <div class="left"><img src="images/about-geode.png">
 	                <div>
 	                 <div class="aboutVersionBlock left" id="pulseVersion"></div>
 	                 <div class="left termsBlock">&nbsp;<a id="pulseVersionDetailsLink" href="#dialog1" class="display-none" >Version Details</a></div>
 	                </div>
 	              </div>
-	              <div class="right aboutText">The Pulse tool monitors Pivotal&#0153; GemFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.</div>
+	              <div class="right aboutText">The Pulse tool monitors Apache Geode system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.</div>
 	            </div>
-	            <div class="left widthfull-100per">
-	                <div class="left copyright">
-	                  Copyright &#0169; 2012-2014 Pivotal Software, Inc. All Rights Reserved. 
-                  This product is protected by U.S. and international copyright 
-                  and intellectual property laws. Pivotal products are covered by 
-                  one or more patents listed at <a href="http://www.pivotal.io/patents"
-                  target="_blank" class="termsBlockLink text-center">http://www.pivotal.io/patents</a>.
-	                </div>
-	               
-	                <div class="left copyright">Pivotal is a registered
-	                  trademark or trademark of Pivotal Software, Inc. in the United States and
-	                  other jurisdictions. All other marks and names mentioned herein
-	                  may be trademarks of their respective companies.</div>
-	               
-	                <div class="left termsBlock">
-	                  <a href="oslicenses.txt" target="_blank">Open Source
-	                    Licenses</a>
-	                </div>
-	               <!--  <div class="right termsBlock">
-	                  Pulse <a href="#.">Terms of Service</a>
-	                </div>-->
-	              </div>
+				  <div class="left widthfull-100per copyright">
+					  <p>Apache Geode (incubating)<br>
+						  Copyright 2016 The Apache Software Foundation.</p>
+					  <p>&nbsp;</p>
+					  <p>This product includes software developed at
+						  The Apache Software Foundation (http://www.apache.org/).</p>
+				  </div>
 	            </div>
 	        </div>
 				</div>
@@ -166,7 +151,7 @@
         <a id="clusterNameLink" href="#." class="left textbold HeaderLink HeaderLinkActive" onclick="openClusterDetail();">Cluster View</a>
       </div>
 			<div class="textbold right logoBlock">
-				<a href="#.">[LOGO]</a>
+				<img src="images/apache_geode_logo.png"/><a href="#.">[LOGO]</a>
 			</div>
 		</header>
 		<div class="clear"></div>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/webapp/Login.html
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/Login.html b/gemfire-pulse/src/main/webapp/Login.html
index 04ed81f..f22490f 100644
--- a/gemfire-pulse/src/main/webapp/Login.html
+++ b/gemfire-pulse/src/main/webapp/Login.html
@@ -73,12 +73,12 @@ $(function(){
 <div id="loginWidth"> 
   <!-- Header block-->
   <header>
-    <div class="textbold right logoBlock"><a href="#.">[LOGO]</a></div>
+    <div class="textbold right logoBlock"><img src="images/apache_geode_logo.png"/><a href="#.">[LOGO]</a></div>
   </header>
   <div class="clear"></div>
   <!-- Middle block-->
   <div class="loginMasterBlock">
-    <div class="pulseBottomSpace"><img data-prod-custom="pulse-monitoring-custom" src="images/pulse-monitoring.png">
+    <div class="pulseBottomSpace"><img src="images/about-geode.png">
       <div class="text-center" id="pulseVersion"></div>
     </div>
     <!-- error Block-->
@@ -97,46 +97,18 @@ $(function(){
     </form>
     </div>
     <br>
-    <div class="text-center copyright">Copyright &#0169; 2012-2014 Piovtal Software, Inc. All rights reserved.</div>
+    <div class="left widthfull-100per copyright">
+      <p>Apache Geode (incubating)<br>
+        Copyright 2016 The Apache Software Foundation.</p>
+      <p>&nbsp;</p>
+      <p>This product includes software developed at
+        The Apache Software Foundation (http://www.apache.org/).</p>
+    </div>
   </div>
 </div>
 <!-- Placeholder--> 
 <script>
 $('input[placeholder], textarea[placeholder]').placeholder();
 </script>
-
-	<!-- <div style="width:100%; padding-top: 20%; padding-bottom: 20%;"> 
-    <div style="margin-left: 30%;">
-      <div style="float:left; border-right: medium solid #CCCCCC;">
-        <form method="POST" action="ClusterLogin" name="loginForm" id="loginForm">
-          <div style="width: 300px; padding-top: 10px;">
-            <span style="width:50px;">User Name:</span>
-            <input type="text" name="user_name" id="user_name" style="float: right; margin-right: 10px;" />
-          </div>
-          <div style="width: 300px; padding-top: 10px;">
-            <span style="width:50px;">Password:</span>
-            <input type="password" name="user_password" id="user_password" style="float: right; margin-right: 10px;" />
-          </div>
-          <div id="locatorHostDiv" style="width: 300px; padding-top: 10px;">
-            <span style="width:50px;">Locator Host:</span>
-            <input type="text" name="locator_host" id="locator_host" style="float: right; margin-right: 10px;" />
-          </div>
-          <div id="locatorPortDiv" style="width: 300px; padding-top: 10px;">
-            <span style="width:50px;">Locator Port:</span>
-            <input type="text" name="locator_port" id="locator_port" style="float: right; margin-right: 10px;" />
-          </div>
-	        <div style="width: 300px; padding-top: 10px;">
-            <input type="reset" value="Cancel" style="float: right; margin-right: 10px;" />
-            <input type="submit" value="Submit" style="float: right; margin-right: 10px;" />
-          </div>
-	      </form>
-	      <label id="errorText" style="color: #FF0000;"></label>
-      </div>
-      <div style="float:left; margin: 40px; ">
-        <div style="font-size: xx-large; text-align: center;"><label>Pulse</label></div>
-        <div><label>GemFire Monitoring</label></div>
-      </div>
-    </div>
-  </div> -->
 </body>
 </html>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/webapp/MemberDetails.html
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/MemberDetails.html b/gemfire-pulse/src/main/webapp/MemberDetails.html
index 0bb193e..f358c1c 100644
--- a/gemfire-pulse/src/main/webapp/MemberDetails.html
+++ b/gemfire-pulse/src/main/webapp/MemberDetails.html
@@ -108,36 +108,21 @@
         <div id="detailsAbout" class="aboutBlock display-none">
           <div class="aboutDetailsBlock">
             <div class="left widthfull-100per marginBottom30">
-              <div class="left"><img data-prod-custom="pulse-aboutimg-custom" src="images/about.png">
+              <div class="left"><img data-prod-custom="pulse-aboutimg-custom" src="images/about-geode.png">
                 <div>
                  <div class="aboutVersionBlock left" id="pulseVersion"></div>
                  <div class="left termsBlock">&nbsp;<a id="pulseVersionDetailsLink" href="#dialog1" class="display-none" >Version Details</a></div>
                 </div>
               </div>
-              <div data-prod-custom="pulse-about-custom" class="right aboutText">The Pulse tool monitors Pivotal&#0153; GemFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.</div>
+              <div data-prod-custom="pulse-about-custom" class="right aboutText">The Pulse tool monitors Apache Geode system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.</div>
             </div>
-            <div class="left widthfull-100per">
-                <div class="left copyright">
-                  Copyright &#0169; 2012-2014 Pivotal Software, Inc. All Rights Reserved. 
-                  This product is protected by U.S. and international copyright 
-                  and intellectual property laws. Pivotal products are covered by 
-                  one or more patents listed at <a href="http://www.pivotal.io/patents"
-                  target="_blank" class="termsBlockLink text-center">http://www.pivotal.io/patents</a>.
-                </div>
-               
-                <div class="left copyright">Pivotal is a registered
-                  trademark or trademark of Pivotal Software, Inc. in the United States and
-                  other jurisdictions. All other marks and names mentioned herein
-                  may be trademarks of their respective companies.</div>
-               
-                <div class="left termsBlock">
-                  <a href="oslicenses.txt" target="_blank">Open Source
-                    Licenses</a>
-                </div>
-               <!--  <div class="right termsBlock">
-                  Pulse <a href="#.">Terms of Service</a>
-                </div>-->
-              </div>
+			  <div class="left widthfull-100per copyright">
+				  <p>Apache Geode (incubating)<br>
+					  Copyright 2016 The Apache Software Foundation.</p>
+				  <p>&nbsp;</p>
+				  <p>This product includes software developed at
+					  The Apache Software Foundation (http://www.apache.org/).</p>
+			  </div>
             </div>
         </div>
       
@@ -157,7 +142,7 @@
 				<a id="clusterNameLink" href="#." class="left textbold HeaderLink HeaderLinkActive" onclick="openClusterDetail();"></a>
 			</div>
 			<div class="textbold right logoBlock">
-				<a href="#.">[LOGO]</a>
+				<img src="images/apache_geode_logo.png"/><a href="#.">[LOGO]</a>
 			</div>
 		</header>
 		<div class="clear"></div>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/webapp/QueryStatistics.html
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/QueryStatistics.html b/gemfire-pulse/src/main/webapp/QueryStatistics.html
index 4f09e7e..c5fb1a0 100644
--- a/gemfire-pulse/src/main/webapp/QueryStatistics.html
+++ b/gemfire-pulse/src/main/webapp/QueryStatistics.html
@@ -121,7 +121,7 @@
 							<div class="left widthfull-100per marginBottom30">
 								<div class="left">
 									<img data-prod-custom="pulse-aboutimg-custom"
-										src="images/about.png">
+										src="images/about-geode.png">
 									<div>
 										<div class="aboutVersionBlock left" id="pulseVersion"></div>
 										<div class="left termsBlock">
@@ -137,27 +137,12 @@
 									data, system alerts, throughput performance and statistics for
 									system members and connected clients.</div>
 							</div>
-							<div class="left widthfull-100per">
-								<div class="left copyright">
-									Copyright © 2012-2014 Pivotal Software, Inc. All Rights Reserved.
-									This product is protected by U.S. and international copyright
-									and intellectual property laws. Pivotal products are covered by
-									one or more patents listed at <a href="http://www.pivotal.io/patents"
-									target="_blank" class="termsBlockLink text-center">http://www.pivotal.io/patents</a>.
-								</div>
-
-								<div class="left copyright">Pivotal is a registered
-									trademark or trademark of Pivotal Software, Inc. in the United States and
-									other jurisdictions. All other marks and names mentioned herein
-									may be trademarks of their respective companies.</div>
-
-								<div class="left termsBlock">
-									<a href="oslicenses.txt" target="_blank">Open Source
-										Licenses</a>
-								</div>
-								<!--  <div class="right termsBlock">
-	                  Pulse <a href="#.">Terms of Service</a>
-	                </div>-->
+							<div class="left widthfull-100per copyright">
+								<p>Apache Geode (incubating)<br>
+									Copyright 2016 The Apache Software Foundation.</p>
+								<p>&nbsp;</p>
+								<p>This product includes software developed at
+									The Apache Software Foundation (http://www.apache.org/).</p>
 							</div>
 						</div>
 					</div>
@@ -185,7 +170,7 @@
 					class="left textbold HeaderLink HeaderLinkActive" id="clusterName"></a>
 			</div>
 			<div class="textbold right logoBlock">
-				<a href="#.">[LOGO]</a>
+				<img src="images/apache_geode_logo.png"/><a href="#.">[LOGO]</a>
 			</div>
 		</header>
 		<div class="clear"></div>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/webapp/clusterDetail.html
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/clusterDetail.html b/gemfire-pulse/src/main/webapp/clusterDetail.html
index 563511d..718a5b9 100644
--- a/gemfire-pulse/src/main/webapp/clusterDetail.html
+++ b/gemfire-pulse/src/main/webapp/clusterDetail.html
@@ -99,37 +99,22 @@
         <div id="detailsAbout" class="aboutBlock display-none">
           <div class="aboutDetailsBlock">
             <div class="left widthfull-100per marginBottom30">
-              <div class="left"><img data-prod-custom="pulse-aboutimg-custom" src="images/about.png">
+              <div class="left"><img data-prod-custom="pulse-aboutimg-custom" src="images/about-geode.png">
                 <div>
                   <div class="aboutVersionBlock left" id="pulseVersion"></div>
                   <div class="left termsBlock">&nbsp;<a id="pulseVersionDetailsLink" href="#dialog1" class="display-none" >Version Details</a></div>
                 </div>
               </div>
-              <div data-prod-custom="pulse-about-custom" class="right aboutText">The Pulse tool monitors Pivotal&#0153; GemFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.</div>
+              <div data-prod-custom="pulse-about-custom" class="right aboutText">The Pulse tool monitors Apache Geode system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.</div>
             </div>
-							<div class="left widthfull-100per">
-								<div class="left copyright">
-									Copyright &#0169; 2012-2014 Pivotal Software, Inc. All Rights Reserved.
-									This product is protected by U.S. and international copyright 
-									and intellectual property laws. Pivotal products are covered by
-									one or more patents listed at <a href="http://www.pivotal.io/patents"
-									target="_blank" class="termsBlockLink text-center">http://www.pivotal.io/patents</a>.
-								</div>
-								
-								<div class="left copyright">Pivotal is a registered
-									trademark or trademark of Pivotal Software, Inc. in the United States and
-									other jurisdictions. All other marks and names mentioned herein
-									may be trademarks of their respective companies.</div>
-								
-								<div class="left termsBlock">
-									<a href="oslicenses.txt" target="_blank">Open Source
-										Licenses</a>
-								</div>
-								<!-- <div class="right termsBlock">
-									Pulse <a href="#.">Terms of Service</a>
-								</div>-->
-							</div>
-						</div>
+			<div class="left widthfull-100per copyright">
+				<p>Apache Geode (incubating)<br>
+				Copyright 2016 The Apache Software Foundation.</p>
+				<p>&nbsp;</p>
+				<p>This product includes software developed at
+				The Apache Software Foundation (http://www.apache.org/).</p>
+			</div>
+		</div>
         </div>
       </div>
       <div class="left headerTopSeperator"></div>
@@ -148,6 +133,7 @@
 					id="clusterName" ></a>
 			</div>
 			<div class="textbold right logoBlock">
+				<img src="images/apache_geode_logo.png"/>
 				<a href="#.">[LOGO]</a>
 			</div>
 		</header>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/webapp/css/style.css
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/css/style.css b/gemfire-pulse/src/main/webapp/css/style.css
index 45c5f06..32ee3d1 100644
--- a/gemfire-pulse/src/main/webapp/css/style.css
+++ b/gemfire-pulse/src/main/webapp/css/style.css
@@ -203,13 +203,19 @@ body {
 
 /*----------------------------Header ends---------------------------------------*/
 .logoBlock {
-	background: url(../images/pivotal-logo.png) no-repeat center center;
-	width: 198px;
+	background: url(../images/pivotal-logo.png) no-repeat right;
+	width: 185px;
 	height: 36px;
 	cursor: pointer;
 	margin: 6px 0px
 }
 
+.logoBlock img {
+    width: 100px;
+    vertical-align: middle;
+    padding-top: 2px;
+}
+
 .logoBlock a {
 	visibility: hidden;
 	display: block;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/webapp/images/about-geode.png
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/images/about-geode.png b/gemfire-pulse/src/main/webapp/images/about-geode.png
new file mode 100644
index 0000000..345c0ae
Binary files /dev/null and b/gemfire-pulse/src/main/webapp/images/about-geode.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/webapp/images/apache_geode_logo.png
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/images/apache_geode_logo.png b/gemfire-pulse/src/main/webapp/images/apache_geode_logo.png
new file mode 100644
index 0000000..14b6ac0
Binary files /dev/null and b/gemfire-pulse/src/main/webapp/images/apache_geode_logo.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/webapp/images/pivotal-logo.png
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/images/pivotal-logo.png b/gemfire-pulse/src/main/webapp/images/pivotal-logo.png
index 7811bce..3faa227 100644
Binary files a/gemfire-pulse/src/main/webapp/images/pivotal-logo.png and b/gemfire-pulse/src/main/webapp/images/pivotal-logo.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/webapp/properties/gemfire.properties
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/properties/gemfire.properties b/gemfire-pulse/src/main/webapp/properties/gemfire.properties
index 58b516e..9e45d25 100644
--- a/gemfire-pulse/src/main/webapp/properties/gemfire.properties
+++ b/gemfire-pulse/src/main/webapp/properties/gemfire.properties
@@ -22,9 +22,9 @@ pulse-readgetpersec-custom=Read/Sec.
 pulse-writes-custom=Writes
 pulse-reads-custom=Reads
 pulse-monitoring-custom=images/pulse-monitoring.png
-pulse-aboutimg-custom=images/about.png
+pulse-aboutimg-custom=images/about-geode.png
 pulse-help-custom=http://gemfire.docs.pivotal.io/latest/userguide/index.html#tools_modules/pulse/chapter_overview.html
-pulse-about-custom=The Pulse tool monitors Pivotal&#0153; GemFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
+pulse-about-custom=The Pulse tool monitors Apache Geode system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
 pulse-regionstableCaps-custom=Regions
 pulse-rtSummaryBySize-custom=Regions Summary - By Entry Count
 pulse-regionstablePath-custom=Region Path:&nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/webapp/properties/gemfire_en.properties
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/properties/gemfire_en.properties b/gemfire-pulse/src/main/webapp/properties/gemfire_en.properties
index 58b516e..9e45d25 100644
--- a/gemfire-pulse/src/main/webapp/properties/gemfire_en.properties
+++ b/gemfire-pulse/src/main/webapp/properties/gemfire_en.properties
@@ -22,9 +22,9 @@ pulse-readgetpersec-custom=Read/Sec.
 pulse-writes-custom=Writes
 pulse-reads-custom=Reads
 pulse-monitoring-custom=images/pulse-monitoring.png
-pulse-aboutimg-custom=images/about.png
+pulse-aboutimg-custom=images/about-geode.png
 pulse-help-custom=http://gemfire.docs.pivotal.io/latest/userguide/index.html#tools_modules/pulse/chapter_overview.html
-pulse-about-custom=The Pulse tool monitors Pivotal&#0153; GemFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
+pulse-about-custom=The Pulse tool monitors Apache Geode system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
 pulse-regionstableCaps-custom=Regions
 pulse-rtSummaryBySize-custom=Regions Summary - By Entry Count
 pulse-regionstablePath-custom=Region Path:&nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/webapp/properties/gemfirexd.properties
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/properties/gemfirexd.properties b/gemfire-pulse/src/main/webapp/properties/gemfirexd.properties
index 5a77751..5bab6c2 100644
--- a/gemfire-pulse/src/main/webapp/properties/gemfirexd.properties
+++ b/gemfire-pulse/src/main/webapp/properties/gemfirexd.properties
@@ -24,7 +24,7 @@ pulse-reads-custom=Reads
 pulse-monitoring-custom=images/pulse-monitoring-gemfirexd.png
 pulse-aboutimg-custom=images/about-gemfirexd.png
 pulse-help-custom=http://www.pivotal.io/pivotal-products/data/pivotal-gemfire-xd
-pulse-about-custom=The Pulse tool monitors Pivotal&#0153; GemFire XD systems in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
+pulse-about-custom=The Pulse tool monitors Apache Geode systems in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
 pulse-regionstableCaps-custom=Tables
 pulse-rtSummaryBySize-custom=Tables Summary - By Row Count
 pulse-regionstablePath-custom=Table Path:&nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/webapp/properties/gemfirexd_en.properties
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/properties/gemfirexd_en.properties b/gemfire-pulse/src/main/webapp/properties/gemfirexd_en.properties
index 5a77751..5bab6c2 100644
--- a/gemfire-pulse/src/main/webapp/properties/gemfirexd_en.properties
+++ b/gemfire-pulse/src/main/webapp/properties/gemfirexd_en.properties
@@ -24,7 +24,7 @@ pulse-reads-custom=Reads
 pulse-monitoring-custom=images/pulse-monitoring-gemfirexd.png
 pulse-aboutimg-custom=images/about-gemfirexd.png
 pulse-help-custom=http://www.pivotal.io/pivotal-products/data/pivotal-gemfire-xd
-pulse-about-custom=The Pulse tool monitors Pivotal&#0153; GemFire XD systems in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
+pulse-about-custom=The Pulse tool monitors Apache Geode systems in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
 pulse-regionstableCaps-custom=Tables
 pulse-rtSummaryBySize-custom=Tables Summary - By Row Count
 pulse-regionstablePath-custom=Table Path:&nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/81417f93/gemfire-pulse/src/main/webapp/regionDetail.html
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/main/webapp/regionDetail.html b/gemfire-pulse/src/main/webapp/regionDetail.html
index 29324c5..8742769 100644
--- a/gemfire-pulse/src/main/webapp/regionDetail.html
+++ b/gemfire-pulse/src/main/webapp/regionDetail.html
@@ -190,35 +190,20 @@
         <div id="detailsAbout" class="aboutBlock display-none">
           <div class="aboutDetailsBlock">
             <div class="left widthfull-100per marginBottom30">
-              <div class="left"><img data-prod-custom="pulse-aboutimg-custom" src="images/about.png">
+              <div class="left"><img data-prod-custom="pulse-aboutimg-custom" src="images/about-geode.png">
                 <div>
                  <div class="aboutVersionBlock left" id="pulseVersion"></div>
                  <div class="left termsBlock">&nbsp;<a id="pulseVersionDetailsLink"  href="#dialog1" class="display-none" >Version Details</a></div>
                 </div>
               </div>
-              <div data-prod-custom="pulse-about-custom" class="right aboutText">The Pulse tool monitors Pivotal&#0153; GemFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.</div>
+              <div data-prod-custom="pulse-about-custom" class="right aboutText">The Pulse tool monitors Apache Geode system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.</div>
             </div>
-           <div class="left widthfull-100per">
-                <div class="left copyright">
-                  Copyright &#0169; 2012-2014 Pivotal Software, Inc. All Rights Reserved. 
-                  This product is protected by U.S. and international copyright and 
-                  intellectual property laws. Pivotal products are covered by one or 
-                  more patents listed at <a href="http://www.pivotal.io/patents"
-                  target="_blank" class="termsBlockLink text-center">http://www.pivotal.io/patents</a>.
-                </div>
-                
-                <div class="left copyright">Pivotal is a registered
-                  trademark or trademark of Pivotal Software, Inc. in the United States and
-                  other jurisdictions. All other marks and names mentioned herein
-                  may be trademarks of their respective companies.</div>
-                
-                <div class="left termsBlock">
-                  <a href="oslicenses.txt" target="_blank">Open Source
-                    Licenses</a>
-                </div>
-               <!-- <div class="right termsBlock">
-                  Pulse <a href="#.">Terms of Service</a>
-                </div>-->
+              <div class="left widthfull-100per copyright">
+                  <p>Apache Geode (incubating)<br>
+                      Copyright 2016 The Apache Software Foundation.</p>
+                  <p>&nbsp;</p>
+                  <p>This product includes software developed at
+                      The Apache Software Foundation (http://www.apache.org/).</p>
               </div>
             </div>
         </div>
@@ -238,7 +223,7 @@
     <div class="left">
       <a href="#." class="left textbold HeaderLink HeaderLinkActive" id="clusterName"  onclick="openClusterDetail();"></a>
     </div>
-    <div class="textbold right logoBlock"><a href="#.">[LOGO]</a></div>
+    <div class="textbold right logoBlock"><img src="images/apache_geode_logo.png"/><a href="#.">[LOGO]</a></div>
   </header>
   <div class="clear"></div>
   <div class="subHeader">


[22/33] incubator-geode git commit: GEODE-899 LocatorDUnitTest.testLeadFailureAndCoordShutdown

Posted by ds...@apache.org.
GEODE-899 LocatorDUnitTest.testLeadFailureAndCoordShutdown

This test was getting two random tcp/ip ports in multiple calls to
AvailablePort.getRandomAvailablePort.


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

Branch: refs/heads/feature/GEODE-831
Commit: 71ba8e9995f485a4dd67805e04627b987dad32d6
Parents: bef0c1b
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Tue Feb 16 10:57:48 2016 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Tue Feb 16 10:57:48 2016 -0800

----------------------------------------------------------------------
 .../gemfire/distributed/LocatorDUnitTest.java   | 32 +++++++++++---------
 1 file changed, 17 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/71ba8e99/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 545a0ea..f74e0de 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -257,9 +257,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
     VM loc1 = host.getVM(1);
     VM loc2 = host.getVM(2);
     
-    final int port1 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
+    int ports[] = AvailablePortHelper.getRandomAvailableTCPPorts(2);
+    final int port1 = ports[0];
     this.port1 = port1;
-    final int port2 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
+    final int port2 = ports[1];
     this.port2 = port2; // for cleanup in tearDown2
     DistributedTestUtils.deleteLocatorStateFile(port1);
     DistributedTestUtils.deleteLocatorStateFile(port2);
@@ -490,10 +491,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
     VM locvm = host.getVM(3);
     Locator locator = null;
     
-    final int port1 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
+    int ports[] = AvailablePortHelper.getRandomAvailableTCPPorts(2);
+    final int port1 = ports[0];
     this.port1 = port1;
-    final int port2 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    this.port2 = port2; // for cleanup in tearDown2()
+    final int port2 = ports[1];
     DistributedTestUtils.deleteLocatorStateFile(port1, port2);
     final String host0 = NetworkUtils.getServerHostName(host); 
     final String locators = host0 + "[" + port1 + "]," +
@@ -625,9 +626,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
     VM locvm = host.getVM(3);
     Locator locator = null;
     
-    final int port1 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
+    final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
+    final int port1 = ports[0];
     this.port1 = port1;
-    final int port2 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
+    final int port2 = ports[1];
     this.port2 = port2;
     DistributedTestUtils.deleteLocatorStateFile(port1, port2);
     final String host0 = NetworkUtils.getServerHostName(host);
@@ -772,10 +774,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
     VM locvm = host.getVM(3);
     Locator locator = null;
     
-    final int port1 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
+    int ports[] = AvailablePortHelper.getRandomAvailableTCPPorts(2);
+    final int port1 = ports[0];
     this.port1 = port1;
-    final int port2 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    this.port2 = port2;
+    final int port2 = ports[1];
     DistributedTestUtils.deleteLocatorStateFile(port1, port2);
     final String host0 = NetworkUtils.getServerHostName(host);
     final String locators = host0 + "[" + port1 + "]," + host0 + "[" + port2 + "]";
@@ -911,10 +913,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
     VM locvm = host.getVM(3);
     Locator locator = null;
     
-    final int port1 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
+    int ports[] = AvailablePortHelper.getRandomAvailableTCPPorts(2);
+    final int port1 = ports[0];
     this.port1 = port1;
-    final int port2 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    this.port2 = port2;
+    final int port2 = ports[1];
     DistributedTestUtils.deleteLocatorStateFile(port1, port2);
     final String host0 = NetworkUtils.getServerHostName(host);
     final String locators = host0 + "[" + port1 + "],"
@@ -1149,11 +1151,11 @@ public class LocatorDUnitTest extends DistributedTestCase {
         return !coord.equals(MembershipManagerHelper.getCoordinator(system));
       }
       public String description() {
-        return "expected the coordinator to be " + coord + " but it is " +
+        return "expected the coordinator to not be " + coord + " but it is " +
           MembershipManagerHelper.getCoordinator(system);
       }
     };
-    Wait.waitForCriterion(ev, 15 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 15 * 1000, 200, false);
     DistributedMember newCoord = MembershipManagerHelper.getCoordinator(system); 
     com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("coordinator after shutdown of locator was " +
         newCoord);


[29/33] incubator-geode git commit: Fixing a suspect NPE string

Posted by ds...@apache.org.
Fixing a suspect NPE string

Once in a while a test fails with an NPE in method
Connection.scheduleAckTimeouts() using the variable ackConnectionGroup.
This variable is set to null in setInUse().


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

Branch: refs/heads/feature/GEODE-831
Commit: d632bfb73155673b2ee06be0e3657033901e114d
Parents: 23edf7e
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Wed Feb 17 07:51:56 2016 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Wed Feb 17 07:51:56 2016 -0800

----------------------------------------------------------------------
 .../main/java/com/gemstone/gemfire/internal/tcp/Connection.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d632bfb7/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
index 74660da..988ca33 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
@@ -2673,11 +2673,12 @@ public class Connection implements Runnable {
               }
             }
           }
-          if (sentAlert) {
+          List group = ackConnectionGroup;
+          if (sentAlert && group != null) {
             // since transmission and ack-receipt are performed serially, we don't
             // want to complain about all receivers out just because one was slow.  We therefore reset
             // the time stamps and give others more time
-            for (Iterator it=ackConnectionGroup.iterator(); it.hasNext(); ) {
+            for (Iterator it=group.iterator(); it.hasNext(); ) {
               Connection con = (Connection)it.next();
               if (con != Connection.this) {
                 con.transmissionStartTime += con.ackSATimeout;


[25/33] incubator-geode git commit: Added stat for udp message receiver thread.

Posted by ds...@apache.org.
Added stat for udp message receiver thread.

Description: The total amount of time spent deserializing and
dispatching UDP messages in the message-reader thread.


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

Branch: refs/heads/feature/GEODE-831
Commit: c2175bc6626d6132ba2cf986fa7f0acbc462fd37
Parents: 7627585
Author: Hitesh Khamesra <hk...@pivotal.io>
Authored: Tue Feb 16 13:53:09 2016 -0800
Committer: Hitesh Khamesra <hk...@pivotal.io>
Committed: Tue Feb 16 13:56:22 2016 -0800

----------------------------------------------------------------------
 .../gemfire/distributed/internal/DMStats.java   |   2 +
 .../distributed/internal/DistributionStats.java |  10 ++
 .../internal/LonerDistributionManager.java      |   2 +
 .../gms/messenger/JGroupsMessenger.java         | 105 ++++++++++---------
 4 files changed, 70 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c2175bc6/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DMStats.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DMStats.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DMStats.java
index 7bf5b80..c241bc7 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DMStats.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DMStats.java
@@ -171,6 +171,8 @@ public interface DMStats {
   public void incNumSerialThreads(int threads);
 
   public void incMessageChannelTime(long val);
+
+  public void incUDPDispachRequestTime(long val);
   
   public long getReplyMessageTime();
   public void incReplyMessageTime(long val);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c2175bc6/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionStats.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionStats.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionStats.java
index 28ca380..634929e 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionStats.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionStats.java
@@ -61,6 +61,7 @@ public class DistributionStats implements DMStats {
   private final static int processedMessagesTimeId;
   private final static int messageProcessingScheduleTimeId;
   private final static int messageChannelTimeId;
+  private final static int udpDispachRequestTimeId;
   private final static int replyMessageTimeId;
   private final static int distributeMessageTimeId;
   private final static int nodesId;
@@ -272,6 +273,7 @@ public class DistributionStats implements DMStats {
     final String functionExecutionThreadsDesc = "The number of threads currently processing function execution messages.";
     final String waitingThreadsDesc = "The number of threads currently processing messages that had to wait for a resource.";
     final String messageChannelTimeDesc = "The total amount of time received messages spent in the distribution channel";
+    final String udpDispachRequestTimeDesc = "The total amount of time spent deserializing and dispatching UDP messages in the message-reader thread.";
     final String replyMessageTimeDesc = "The amount of time spent processing reply messages. This includes both processedMessagesTime and messageProcessingScheduleTime.";
     final String distributeMessageTimeDesc = "The amount of time it takes to prepare a message and send it on the network.  This includes sentMessagesTime.";
     final String nodesDesc = "The current number of nodes in this distributed system.";
@@ -409,6 +411,7 @@ public class DistributionStats implements DMStats {
         f.createIntGauge("functionExecutionThreads", functionExecutionThreadsDesc, "threads"),
         f.createIntGauge("waitingThreads", waitingThreadsDesc, "threads"),
         f.createLongCounter("messageChannelTime", messageChannelTimeDesc, "nanoseconds", false),
+        f.createLongCounter("udpDispachRequestTime", udpDispachRequestTimeDesc, "nanoseconds", false),
         f.createLongCounter("replyMessageTime", replyMessageTimeDesc, "nanoseconds", false),
         f.createLongCounter("distributeMessageTime", distributeMessageTimeDesc, "nanoseconds", false),
         f.createIntGauge("nodes", nodesDesc, "nodes"),
@@ -572,6 +575,7 @@ public class DistributionStats implements DMStats {
     messageProcessingScheduleTimeId =
       type.nameToId("messageProcessingScheduleTime");
     messageChannelTimeId = type.nameToId("messageChannelTime");
+    udpDispachRequestTimeId = type.nameToId("udpDispachRequestTime");
     replyMessageTimeId = type.nameToId("replyMessageTime");
     distributeMessageTimeId = type.nameToId("distributeMessageTime");
     nodesId = type.nameToId("nodes");
@@ -1078,6 +1082,12 @@ public class DistributionStats implements DMStats {
       this.stats.incLong(messageChannelTimeId, delta);
     }
   }
+  
+  public void incUDPDispachRequestTime(long delta) {
+    if (enableClockStats) {
+      this.stats.incLong(udpDispachRequestTimeId, delta);
+    }
+  }
 
   public long getReplyMessageTime() {
     return this.stats.getLong(replyMessageTimeId);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c2175bc6/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
index 419c096..50c07de 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
@@ -363,6 +363,8 @@ public class LonerDistributionManager implements DM {
     @Override
     public void incMessageChannelTime(long val) {}
     @Override
+    public void incUDPDispachRequestTime(long val) {};
+    @Override
     public long getReplyMessageTime() {return 0;}
     @Override
     public void incReplyMessageTime(long val) {}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c2175bc6/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
index 3bd1e83..b9fcc38 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
@@ -70,6 +70,7 @@ import com.gemstone.gemfire.distributed.internal.DMStats;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionManager;
 import com.gemstone.gemfire.distributed.internal.DistributionMessage;
+import com.gemstone.gemfire.distributed.internal.DistributionStats;
 import com.gemstone.gemfire.distributed.internal.HighPriorityDistributionMessage;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.distributed.internal.membership.MemberAttributes;
@@ -1024,58 +1025,64 @@ public class JGroupsMessenger implements Messenger {
   
     @Override
     public void receive(Message jgmsg) {
-      if (services.getManager().shutdownInProgress()) {
-        return;
-      }
-
-      if (logger.isTraceEnabled()) {
-        logger.trace("JGroupsMessenger received {} headers: {}", jgmsg, jgmsg.getHeaders());
-      }
-      
-      //Respond to ping messages sent from other systems that are in a auto reconnect state
-      byte[] contents = jgmsg.getBuffer();
-      if (contents == null) {
-        return;
-      }
-      if (pingPonger.isPingMessage(contents)) {
+      long startTime = DistributionStats.getStatTime();
+      try {
+        if (services.getManager().shutdownInProgress()) {
+          return;
+        }
+  
+        if (logger.isTraceEnabled()) {
+          logger.trace("JGroupsMessenger received {} headers: {}", jgmsg, jgmsg.getHeaders());
+        }
+        
+        //Respond to ping messages sent from other systems that are in a auto reconnect state
+        byte[] contents = jgmsg.getBuffer();
+        if (contents == null) {
+          return;
+        }
+        if (pingPonger.isPingMessage(contents)) {
+          try {
+            pingPonger.sendPongMessage(myChannel, jgAddress, jgmsg.getSrc());
+          }
+          catch (Exception e) {
+            logger.info("Failed sending Pong response to " + jgmsg.getSrc());
+          }
+          return;
+        } else if (pingPonger.isPongMessage(contents)) {
+          pongsReceived.incrementAndGet();
+          return;
+        }
+        
+        Object o = readJGMessage(jgmsg);
+        if (o == null) {
+          return;
+        }
+  
+        DistributionMessage msg = (DistributionMessage)o;
+        assert msg.getSender() != null;
+        
+        // admin-only VMs don't have caches, so we ignore cache operations
+        // multicast to them, avoiding deserialization cost and classpath
+        // problems
+        if ( (services.getConfig().getTransport().getVmKind() == DistributionManager.ADMIN_ONLY_DM_TYPE)
+             && (msg instanceof DistributedCacheOperation.CacheOperationMessage)) {
+          return;
+        }
+  
+        msg.resetTimestamp();
+        msg.setBytesRead(jgmsg.getLength());
+              
         try {
-          pingPonger.sendPongMessage(myChannel, jgAddress, jgmsg.getSrc());
+          logger.trace("JGroupsMessenger dispatching {} from {}", msg, msg.getSender());
+          filterIncomingMessage(msg);
+          getMessageHandler(msg).processMessage(msg);
         }
-        catch (Exception e) {
-          logger.info("Failed sending Pong response to " + jgmsg.getSrc());
+        catch (MemberShunnedException e) {
+          // message from non-member - ignore
         }
-        return;
-      } else if (pingPonger.isPongMessage(contents)) {
-        pongsReceived.incrementAndGet();
-        return;
-      }
-      
-      Object o = readJGMessage(jgmsg);
-      if (o == null) {
-        return;
-      }
-
-      DistributionMessage msg = (DistributionMessage)o;
-      assert msg.getSender() != null;
-      
-      // admin-only VMs don't have caches, so we ignore cache operations
-      // multicast to them, avoiding deserialization cost and classpath
-      // problems
-      if ( (services.getConfig().getTransport().getVmKind() == DistributionManager.ADMIN_ONLY_DM_TYPE)
-           && (msg instanceof DistributedCacheOperation.CacheOperationMessage)) {
-        return;
-      }
-
-      msg.resetTimestamp();
-      msg.setBytesRead(jgmsg.getLength());
-            
-      try {
-        logger.trace("JGroupsMessenger dispatching {} from {}", msg, msg.getSender());
-        filterIncomingMessage(msg);
-        getMessageHandler(msg).processMessage(msg);
-      }
-      catch (MemberShunnedException e) {
-        // message from non-member - ignore
+      }finally {
+        long delta = DistributionStats.getStatTime() - startTime ;
+        JGroupsMessenger.this.services.getStatistics().incUDPDispachRequestTime(delta);
       }
     }
     


[08/33] incubator-geode git commit: GEODE-913: refactor AbstractDistributionConfig

Posted by ds...@apache.org.
GEODE-913: refactor AbstractDistributionConfig

* use annotations to annotate the config attributes and its setters/getters/checkers
* delete multiple huge if/else statements to use annoations
* delete unnecessary checks use annotated checkers.
* delete all isXXModifiers to use attribute lists to denote if the attribute is modifiable or not.


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

Branch: refs/heads/feature/GEODE-831
Commit: 700599052b74072115b4b17b25de23dcd78cd8c2
Parents: 3adb0b8
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Thu Feb 4 07:57:27 2016 -0800
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Thu Feb 11 18:36:22 2016 -0800

----------------------------------------------------------------------
 .../admin/jmx/internal/AgentConfigImpl.java     |   25 +-
 .../internal/AbstractDistributionConfig.java    | 2690 ++----------------
 .../distributed/internal/ConfigAttribute.java   |   36 +
 .../internal/ConfigAttributeChecker.java        |   31 +
 .../internal/ConfigAttributeDesc.java           |   31 +
 .../internal/ConfigAttributeGetter.java         |   31 +
 .../internal/ConfigAttributeSetter.java         |   31 +
 .../internal/DistributionConfig.java            | 1061 ++++---
 .../internal/DistributionConfigImpl.java        |  361 +--
 .../internal/RuntimeDistributionConfigImpl.java |   74 +-
 .../gemfire/internal/AbstractConfig.java        |   60 +-
 .../gemstone/gemfire/internal/ConfigSource.java |   64 +-
 .../gemfire/internal/logging/LogConfig.java     |   12 +-
 .../internal/DistributionConfigJUnitTest.java   |  313 ++
 .../gemfire/internal/ConfigSourceJUnitTest.java |   89 +
 15 files changed, 1621 insertions(+), 3288 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
index 9d602f6..985c8c0 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
@@ -16,21 +16,6 @@
  */
 package com.gemstone.gemfire.admin.jmx.internal;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.InetAddress;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
 import com.gemstone.gemfire.GemFireIOException;
 import com.gemstone.gemfire.admin.DistributedSystemConfig;
 import com.gemstone.gemfire.admin.DistributionLocatorConfig;
@@ -38,12 +23,18 @@ import com.gemstone.gemfire.admin.internal.DistributedSystemConfigImpl;
 import com.gemstone.gemfire.admin.internal.InetAddressUtil;
 import com.gemstone.gemfire.admin.jmx.Agent;
 import com.gemstone.gemfire.admin.jmx.AgentConfig;
-import com.gemstone.gemfire.distributed.internal.AbstractDistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.ClassPathLoader;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.util.IOUtils;
 
+import java.io.*;
+import java.net.InetAddress;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
 /**
  * Provides the JMX Agent configuration properties.
  * <p>