You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2017/03/15 17:51:02 UTC

[01/34] geode-native git commit: GEODE-2441: Remove leftover pdx auto serializer references [Forced Update!]

Repository: geode-native
Updated Branches:
  refs/heads/feature/GEODE-2602 cf68eff24 -> 57e915b28 (forced update)


GEODE-2441: Remove leftover pdx auto serializer references

This closes #42.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 7da9d90bdd28619193b044be9ab3a226c50ffd0c
Parents: 5d9e713
Author: David Kimura <dk...@pivotal.io>
Authored: Tue Feb 28 13:18:32 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Tue Mar 7 16:54:26 2017 -0800

----------------------------------------------------------------------
 LICENSE                                         |  10 -
 dist/LICENSE                                    |  11 -
 .../include/geode/PdxAutoSerializer.hpp         | 529 -------------------
 src/cppcache/integration-test/test.sh.in        |   1 -
 src/cppcache/integration-test/testHeaders.sh    |  62 ---
 src/pdxautoserializer/ASCLIBuiltins.hpp         | 462 ----------------
 src/quickstart/cpp/CMakeLists.txt               |  22 -
 src/quickstart/cpp/PdxAutoSerializer.cpp        | 149 ------
 src/quickstart/runcpp.bat.in                    |   6 +-
 src/quickstart/runcpp.sh.in                     |   6 +-
 src/tests/cpp/CMakeLists.txt                    |   1 -
 src/tests/cpp/fwklib/QueryHelper.hpp            |  62 +--
 .../cpp/pdxautoserializerclass/CMakeLists.txt   |  38 --
 .../cpp/pdxautoserializerclass/PortfolioPdx.cpp | 199 -------
 .../cpp/pdxautoserializerclass/PortfolioPdx.hpp | 116 ----
 .../cpp/pdxautoserializerclass/PositionPdx.cpp  | 176 ------
 .../cpp/pdxautoserializerclass/PositionPdx.hpp  | 112 ----
 src/tests/cpp/security/CMakeLists.txt           |   1 -
 src/tests/cpp/testobject/CMakeLists.txt         |   4 -
 19 files changed, 5 insertions(+), 1962 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 81d5672..2d176dc 100644
--- a/LICENSE
+++ b/LICENSE
@@ -245,13 +245,3 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
----------------------------------------------------------------------------
-Public Domain
----------------------------------------------------------------------------
-
-Apache Geode bundles the following files, which are available in the public
-domain:
-
-  - PUBLIC DOMAIN PCCTS-BASED C++ GRAMMAR (http://www.antlr2.org/)

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/dist/LICENSE
----------------------------------------------------------------------
diff --git a/dist/LICENSE b/dist/LICENSE
index 5048591..6772aa9 100644
--- a/dist/LICENSE
+++ b/dist/LICENSE
@@ -317,14 +317,3 @@ 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.
-
-
----------------------------------------------------------------------------
-Public Domain
----------------------------------------------------------------------------
-
-Apache Geode bundles the following files, which are available in the public
-domain:
-
-  - ANTLRv2 (http://www.antlr2.org/)
-  - PUBLIC DOMAIN PCCTS-BASED C++ GRAMMAR (http://www.antlr2.org/)

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/cppcache/include/geode/PdxAutoSerializer.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/PdxAutoSerializer.hpp b/src/cppcache/include/geode/PdxAutoSerializer.hpp
deleted file mode 100644
index e4b7af4..0000000
--- a/src/cppcache/include/geode/PdxAutoSerializer.hpp
+++ /dev/null
@@ -1,529 +0,0 @@
-#pragma once
-
-#ifndef GEODE_PDXAUTOSERIALIZER_H_
-#define GEODE_PDXAUTOSERIALIZER_H_
-
-/*
- * 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.
- */
-
-#include "geode_globals.hpp"
-#include "PdxWriter.hpp"
-#include "PdxReader.hpp"
-#include "VectorT.hpp"
-#include "HashMapT.hpp"
-#include "HashSetT.hpp"
-#include "GeodeTypeIds.hpp"
-#include "TypeHelper.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace PdxAutoSerializable {
-// Read and write methods for various types
-// uint8_t
-//------------------------------------------------------------------------------------------------
-#ifdef _SOLARIS
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, int8_t value) {
-  pw->writeByte(fieldName, value);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, int8_t& value) {
-  value = pr->readByte(fieldName);
-}
-#else
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, char value) {
-  pw->writeChar(fieldName, value);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, char& value) {
-  value = pr->readChar(fieldName);
-}
-#endif
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, wchar_t value) {
-  pw->writeWideChar(fieldName, value);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, wchar_t& value) {
-  value = pr->readWideChar(fieldName);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, bool value) {
-  pw->writeBoolean(fieldName, value);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, bool& value) {
-  value = pr->readBoolean(fieldName);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, signed char value) {
-  pw->writeByte(fieldName, value);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, signed char& value) {
-  value = pr->readByte(fieldName);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, int16_t value) {
-  pw->writeShort(fieldName, value);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, int16_t& value) {
-  value = pr->readShort(fieldName);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, int32_t value) {
-  pw->writeInt(fieldName, value);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, int32_t& value) {
-  value = pr->readInt(fieldName);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, int64_t value) {
-  pw->writeLong(fieldName, value);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, int64_t& value) {
-  value = pr->readLong(fieldName);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, float value) {
-  pw->writeFloat(fieldName, value);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, float& value) {
-  value = pr->readFloat(fieldName);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, double value) {
-  pw->writeDouble(fieldName, value);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, double& value) {
-  value = pr->readDouble(fieldName);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, CacheableDatePtr value) {
-  pw->writeDate(fieldName, value);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, CacheableDatePtr& value) {
-  value = pr->readDate(fieldName);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, const char* value) {
-  pw->writeString(fieldName, value);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, char*& value) {
-  value = pr->readString(fieldName);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, const wchar_t* value) {
-  pw->writeWideString(fieldName, value);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, wchar_t*& value) {
-  value = pr->readWideString(fieldName);
-}
-// ---- helper methods for bytearrayofarray -------
-#ifdef _SOLARIS
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, char** value,
-                           int32_t arraySize, int32_t* elemArraySize) {
-  pw->writeArrayOfByteArrays(fieldName, (char**)value, arraySize,
-                             elemArraySize);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, char**& value, int32_t& len,
-                          int32_t*& Lengtharr) {
-  GF_NEW(Lengtharr, int32_t[len]);
-  value = (char**)pr->readArrayOfByteArrays(fieldName, len, &Lengtharr);
-}
-#else
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, int8_t** value,
-                           int32_t arraySize, int32_t* elemArraySize) {
-  pw->writeArrayOfByteArrays(fieldName, value, arraySize, elemArraySize);
-}
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, int8_t**& value, int32_t& len,
-                          int32_t*& Lengtharr) {
-  GF_NEW(Lengtharr, int32_t[len]);
-  value = (signed char**)pr->readArrayOfByteArrays(fieldName, len, &Lengtharr);
-}
-#endif
-
-//------------------------------------------------------------------------------------------------
-// Base Serializable types
-template <typename TObj>
-inline void writePdxObject(
-    apache::geode::client::PdxWriterPtr& pw, const char* fieldName,
-    const apache::geode::client::SharedPtr<TObj>& value,
-    apache::geode::client::TypeHelper::yes_type isSerializable) {
-  pw->writeObject(fieldName, value);
-}
-
-template <typename TObj>
-inline void writePdxObject(
-    apache::geode::client::PdxWriterPtr& pw, const char* fieldName,
-    const apache::geode::client::SharedPtr<TObj>& value) {
-  writePdxObject(pw, fieldName, value, GF_TYPE_IS_SERIALIZABLE_TYPE(TObj));
-}
-
-template <typename TObj>
-inline void readPdxObject(
-    apache::geode::client::PdxReaderPtr& pr, const char* fieldName,
-    apache::geode::client::SharedPtr<TObj>& value,
-    apache::geode::client::TypeHelper::yes_type isSerializable) {
-  value = dynCast<apache::geode::client::SharedPtr<TObj> >(
-      pr->readObject(fieldName));
-}
-
-template <typename TObj>
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName,
-                          apache::geode::client::SharedPtr<TObj>& value) {
-  readPdxObject(pr, fieldName, value, GF_TYPE_IS_SERIALIZABLE_TYPE(TObj));
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, bool* value, int32_t len) {
-  pw->writeBooleanArray(fieldName, value, len);
-}
-
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, bool*& value, int32_t& len) {
-  value = pr->readBooleanArray(fieldName, len);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, wchar_t* value, int32_t len) {
-  pw->writeWideCharArray(fieldName, value, len);
-}
-
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, wchar_t*& value,
-                          int32_t& len) {
-  value = pr->readWideCharArray(fieldName, len);
-}
-//------------------------------------------------------------------------------------------------
-#ifdef _SOLARIS
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, int8_t* value, int32_t len) {
-  pw->writeByteArray(fieldName, value, len);
-}
-
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, int8_t*& value, int32_t& len) {
-  value = (int8_t*)pr->readByteArray(fieldName, len);
-}
-#else
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, char* value, int32_t len) {
-  pw->writeCharArray(fieldName, value, len);
-}
-
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, char*& value, int32_t& len) {
-  value = pr->readCharArray(fieldName, len);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, signed char* value,
-                           int32_t len) {
-  pw->writeByteArray(fieldName, value, len);
-}
-
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, signed char*& value,
-                          int32_t& len) {
-  value = (signed char*)pr->readByteArray(fieldName, len);
-}
-#endif
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, int16_t* value, int32_t len) {
-  pw->writeShortArray(fieldName, value, len);
-}
-
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, int16_t*& value,
-                          int32_t& len) {
-  value = pr->readShortArray(fieldName, len);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, int32_t* value, int32_t len) {
-  pw->writeIntArray(fieldName, value, len);
-}
-
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, int32_t*& value,
-                          int32_t& len) {
-  value = pr->readIntArray(fieldName, len);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, int64_t* value, int32_t len) {
-  pw->writeLongArray(fieldName, value, len);
-}
-
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, int64_t*& value,
-                          int32_t& len) {
-  value = pr->readLongArray(fieldName, len);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, float* value, int32_t len) {
-  pw->writeFloatArray(fieldName, value, len);
-}
-
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, float*& value, int32_t& len) {
-  value = pr->readFloatArray(fieldName, len);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, double* value, int32_t len) {
-  pw->writeDoubleArray(fieldName, value, len);
-}
-
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, double*& value, int32_t& len) {
-  value = pr->readDoubleArray(fieldName, len);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, char** value, int32_t len) {
-  pw->writeStringArray(fieldName, value, len);
-}
-
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, char**& value, int32_t& len) {
-  value = pr->readStringArray(fieldName, len);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName, wchar_t** value,
-                           int32_t len) {
-  pw->writeWideStringArray(fieldName, value, len);
-}
-
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName, wchar_t**& value,
-                          int32_t& len) {
-  value = pr->readWideStringArray(fieldName, len);
-}
-//------------------------------------------------------------------------------------------------
-inline void writePdxObject(apache::geode::client::PdxWriterPtr& pw,
-                           const char* fieldName,
-                           CacheableObjectArrayPtr value) {
-  pw->writeObjectArray(fieldName, value);
-}
-
-inline void readPdxObject(apache::geode::client::PdxReaderPtr& pr,
-                          const char* fieldName,
-                          CacheableObjectArrayPtr& value) {
-  value = pr->readObjectArray(fieldName);
-}
-//------------------------------------------------------------------------------------------------
-// For containers vector/hashmap/hashset
-// template <typename TObj>
-// inline void writePdxObject( apache::geode::client::PdxWriterPtr& pw,  const
-// char*
-// fieldName,
-//    const VectorT< TObj >& value )
-//{
-//  int32_t len = (int32_t)value.size();
-//  pw->writeArrayLen( len );
-//  for ( typename VectorT< TObj >::Iterator iter = value.begin( );
-//      iter != value.end( ); ++iter ) {
-//    writePdxObject( output, *iter );
-//  }
-//}
-
-// inline uint32_t objectSize( const _VectorOfCacheable& value )
-//{
-//  uint32_t objectSize = 0;
-//  for ( _VectorOfCacheable::Iterator iter = value.begin( );
-//      iter != value.end( ); ++iter ) {
-//    if (*iter != NULLPTR) {
-//      objectSize += (*iter)->objectSize( );
-//    }
-//  }
-//  objectSize += (sizeof(CacheablePtr) * (uint32_t)value.size());
-//  return objectSize;
-//}
-
-// template <typename TObj>
-// inline void readPdxObject( apache::geode::client::PdxReaderPtr& pr,  const
-// char* fieldName,
-//    VectorT< TObj >& value )
-//{
-//  int32_t len;
-//  pr->readArrayLen( &len );
-//  if ( len >= 0 ) {
-//    TObj obj;
-//    for ( int32_t index = 0; index < len; index++ ) {
-//      readPdxObject( input, obj );
-//      value.push_back( obj );
-//    }
-//  }
-//}
-
-// template <typename TKey, typename TValue>
-// inline void writePdxObject( apache::geode::client::PdxWriterPtr& pw,  const
-// char*
-// fieldName,
-//    const HashMapT< TKey, TValue >& value )
-//{
-//  int32_t len = (int32_t)value.size();
-//  pw->writeArrayLen( len );
-//  if ( len > 0 ) {
-//    for ( typename HashMapT< TKey, TValue >::Iterator iter = value.begin( );
-//        iter != value.end( ); ++iter ) {
-//      writePdxObject( output, iter.first( ) );
-//      writePdxObject( output, iter.second( ) );
-//    }
-//  }
-//}
-
-// inline uint32_t objectSize( const _HashMapOfCacheable& value )
-//{
-//  uint32_t objectSize = 0;
-//  for ( _HashMapOfCacheable::Iterator iter = value.begin( );
-//      iter != value.end( ); ++iter ) {
-//    objectSize += iter.first( )->objectSize( );
-//    if (iter.second( ) != NULLPTR) {
-//      objectSize += iter.second( )->objectSize( );
-//    }
-//  }
-//  objectSize += ( ( sizeof( CacheableKeyPtr ) + sizeof( CacheablePtr ) )
-//      * (uint32_t)value.size());
-//  return objectSize;
-//}
-
-// template <typename TKey, typename TValue>
-// inline void readPdxObject( apache::geode::client::PdxReaderPtr& pr,  const
-// char* fieldName,
-//    HashMapT< TKey, TValue >& value )
-//{
-//  int32_t len;
-//  pr->readArrayLen( &len );
-//  if ( len > 0 ) {
-//    TKey key;
-//    TValue val;
-//    for( int32_t index = 0; index < len; index++ ) {
-//      readPdxObject( input, key );
-//      readPdxObject( input, val );
-//      value.insert( key, val );
-//    }
-//  }
-//}
-
-// template <typename TKey>
-// inline void writePdxObject( apache::geode::client::PdxWriterPtr& pw,  const
-// char*
-// fieldName,
-//  const HashSetT< TKey >& value )
-//{
-//  int32_t len = (int32_t)value.size();
-//  pw->writeArrayLen( len );
-//  for ( typename HashSetT< TKey >::Iterator iter = value.begin( );
-//    iter != value.end( ); ++iter ) {
-//    writePdxObject( output, *iter );
-//  }
-//}
-
-// inline uint32_t objectSize( const _HashSetOfCacheableKey& value )
-//{
-//  uint32_t objectSize = 0;
-//  for ( _HashSetOfCacheableKey::Iterator iter = value.begin( );
-//    iter != value.end( ); ++iter ) {
-//    if (*iter != NULLPTR) {
-//      objectSize += (*iter)->objectSize( );
-//    }
-//  }
-//  objectSize += (sizeof(CacheableKeyPtr) * (uint32_t)value.size());
-//  return objectSize;
-//}
-
-// template <typename TKey>
-// inline void readPdxObject( apache::geode::client::PdxReaderPtr& pr,  const
-// char* fieldName,
-//    HashSetT< TKey >& value )
-//{
-//  int32_t len;
-//  pr->readArrayLen( &len );
-//  if ( len > 0 ) {
-//    TKey key;
-//    for( int32_t index = 0; index < len; index++ ) {
-//      readPdxObject( input, key );
-//      value.insert( key );
-//    }
-//  }
-//}
-
-//// Default value for builtin types
-
-// template <typename TObj>
-// inline TObj zeroObject( )
-//{
-//  return 0;
-//}
-
-// template <>
-// inline bool zeroObject<bool>( )
-//{
-//  return false;
-//}
-
-// template <>
-// inline double zeroObject<double>( )
-//{
-//  return 0.0;
-//}
-
-// template <>
-// inline float zeroObject<float>( )
-//{
-//  return 0.0F;
-//}
-
-}  // namespace PdxAutoSerializable
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_PDXAUTOSERIALIZER_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/cppcache/integration-test/test.sh.in
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/test.sh.in b/src/cppcache/integration-test/test.sh.in
index e941227..23d2aec 100644
--- a/src/cppcache/integration-test/test.sh.in
+++ b/src/cppcache/integration-test/test.sh.in
@@ -20,7 +20,6 @@ set -o pipefail
 
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:apache-geode>
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:fwk>
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:pdxobject>
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:testobject>
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:SqLiteImpl>
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:cryptoImpl>

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/cppcache/integration-test/testHeaders.sh
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/testHeaders.sh b/src/cppcache/integration-test/testHeaders.sh
deleted file mode 100755
index 0137094..0000000
--- a/src/cppcache/integration-test/testHeaders.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-
-#set -xv
-
-#echo $1
-GFCPP=`echo $1 | perl -p -e 's/\\\/\//g'`
-#echo $GFCPP
-INCDIR=$GFCPP/include
-if [ ! -f "${INCDIR}/geode/Region.hpp" ]; then
-  echo "ERROR: Header files are not packed in product."
-  exit 1
-fi
-
-HEADERS=`find $INCDIR -type d -name "impl" -prune -o -name "_*.hpp" \
-  -o -name "*.hpp" -print` | grep -v PdxAutoSerializer
-
-function compileHeaders {
-  echo "0" >status
-  if [ ! -z ${WINDIR:-} ]; then
-
-    PRAGMAFILE=testHeaders_pragmas.hpp
-
-    echo "#pragma warning (disable : 4514)   /* unreferenced inline */" \
-      >$PRAGMAFILE
-    echo "#pragma warning (disable : 4290)   /* throws ignored */" \
-      >>$PRAGMAFILE
-
-    COMPILE="cl /nologo /c /Zs /TP /EHsc /W3 /WX /FI$PRAGMAFILE -I$INCDIR -I. oneheader.cpp"
-  elif [ `uname` == "SunOS" ]; then
-    COMPILE="CC -c -I$INCDIR oneheader.cpp"
-  else 
-    COMPILE="g++ -c -I$INCDIR oneheader.cpp"
-  fi
-
-  for hpp in $HEADERS; do
-    echo "#include <$hpp>" >oneheader.cpp
-    $COMPILE || \
-      ( failed=`cat status`; failed=`expr $failed + 1`; echo "$failed" >status; echo "ERROR in header $hpp" )
-  done
-}
-
-compileHeaders 2>&1 | egrep -v "oneheader.cpp" | tee testHeaders.out
-failed=`cat status`
-outdir=`pwd`
-echo "Discovered $failed headers with errors. See ${outdir}/testHeaders.out for details"
-exit $failed

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/pdxautoserializer/ASCLIBuiltins.hpp
----------------------------------------------------------------------
diff --git a/src/pdxautoserializer/ASCLIBuiltins.hpp b/src/pdxautoserializer/ASCLIBuiltins.hpp
deleted file mode 100644
index 36ce787..0000000
--- a/src/pdxautoserializer/ASCLIBuiltins.hpp
+++ /dev/null
@@ -1,462 +0,0 @@
-#pragma once
-
-#ifndef GEODE_PDXAUTOSERIALIZER_ASCLIBUILTINS_H_
-#define GEODE_PDXAUTOSERIALIZER_ASCLIBUILTINS_H_
-
-/*
- * 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.
- */
-
-#ifdef GEMFIRE_CLR
-
-#include "ASBuiltins.hpp"
-#include <vcclr.h>
-
-using namespace System;
-using namespace System::Collections::Generic;
-
-namespace Apache {
-namespace Geode {
-namespace Client {
-namespace Serializer {
-
-/**
-* @brief Helper type traits and other structs/classes do determine type
-*        information at compile time using typename.
-*        Useful for templates in particular.
-*/
-namespace TypeHelper {
-typedef uint8_t yes_type;
-typedef uint32_t no_type;
-
-template <typename TBase, typename TDerived>
-struct BDHelper {
-  template <typename T>
-  static yes_type check_sig(TDerived const volatile ^, T);
-  static no_type check_sig(TBase const volatile ^, int);
-};
-
-/**
-* @brief This struct helps us determine whether or not a class is a
-*        subclass of another at compile time, so that it can be used
-*        in templates. Adapted and extended from
-*        {@link
-* http://groups.google.com/group/comp.lang.c++.moderated/msg/dd6c4e4d5160bd83}
-*/
-template <typename TBase, typename TDerived>
-struct SuperSubclass {
- private:
-  struct Host {
-    operator TBase const volatile ^() const;
-    operator TDerived const volatile ^();
-  };
-
- public:
-  static const bool result = sizeof(BDHelper<TBase, TDerived>::check_sig(
-                                 Host(), 0)) == sizeof(yes_type);
-};
-
-template <typename TBase>
-struct SuperSubclass<TBase, TBase> {
-  static const bool result = true;
-};
-
-template <bool getType = true>
-struct YesNoType {
-  static const yes_type value = 0;
-};
-
-template <>
-struct YesNoType<false> {
-  static const no_type value = 0;
-};
-}
-
-#define TYPE_IS_IGFSERIALIZABLE(T) \
-  TypeHelper::SuperSubclass<IGeodeSerializable, T>::result
-#define TYPE_IS_IGFSERIALIZABLE_TYPE(T) \
-  TypeHelper::YesNoType<TYPE_IS_SERIALIZABLE(T)>::value
-
-inline void WriteObject(apache::geode::client::DataOutput& output, Byte value) {
-  output.write((uint8_t)value);
-}
-
-inline void ReadObject(apache::geode::client::DataInput& input, Byte % value) {
-  uint8_t val;
-  input.read(&val);
-  value = val;
-}
-
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        SByte value) {
-  output.write((int8_t)value);
-}
-
-inline void ReadObject(apache::geode::client::DataInput& input, SByte % value) {
-  int8_t val;
-  input.read(&val);
-  value = val;
-}
-
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        array<Byte> ^ bytes) {
-  if (bytes != nullptr) {
-    // We can safely use the pinning technique here since the pointer
-    // is not required after the end of native 'writeBytes' function.
-    pin_ptr<Byte> pin_bytes = &bytes[0];
-    output.writeBytes((uint8_t*)pin_bytes, bytes->Length);
-  } else {
-    output.writeBytes((uint8_t*)NULL, 0);
-  }
-}
-
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       array<Byte> ^ % bytes) {
-  int32_t length;
-  input.readInt(&length);
-  if (length > 0) {
-    bytes = gcnew array<Byte>(length);
-    pin_ptr<Byte> pin_bytes = &bytes[0];
-    input.readBytes((uint8_t*)pin_bytes, length);
-  } else {
-    bytes = nullptr;
-  }
-}
-
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        array<SByte> ^ bytes) {
-  if (bytes != nullptr) {
-    pin_ptr<SByte> pin_bytes = &bytes[0];
-    output.writeBytes((int8_t*)pin_bytes, bytes->Length);
-  } else {
-    output.writeBytes((int8_t*)NULL, 0);
-  }
-}
-
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       array<SByte> ^ % bytes) {
-  int32_t length;
-  input.readInt(&length);
-  if (length > 0) {
-    bytes = gcnew array<SByte>(length);
-    pin_ptr<SByte> pin_bytes = &bytes[0];
-    input.readBytes((int8_t*)pin_bytes, length);
-  } else {
-    bytes = nullptr;
-  }
-}
-
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        Int16 value) {
-  output.writeInt((int16_t)value);
-}
-
-inline void ReadObject(apache::geode::client::DataInput& input, Int16 % value) {
-  int16_t val;
-  input.readInt(&val);
-  value = val;
-}
-
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        Int32 value) {
-  output.writeInt(value);
-}
-
-inline void ReadObject(apache::geode::client::DataInput& input, Int32 % value) {
-  int32_t val;
-  input.readInt(&val);
-  value = val;
-}
-
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        Int64 value) {
-  output.writeInt(value);
-}
-
-inline void ReadObject(apache::geode::client::DataInput& input, Int64 % value) {
-  int64_t val;
-  input.readInt(&val);
-  value = val;
-}
-
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        UInt16 value) {
-  output.writeInt(value);
-}
-
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       UInt16 % value) {
-  uint16_t val;
-  input.readInt(&val);
-  value = val;
-}
-
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        UInt32 value) {
-  output.writeInt(value);
-}
-
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       UInt32 % value) {
-  uint32_t val;
-  input.readInt(&val);
-  value = val;
-}
-
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        UInt64 value) {
-  output.writeInt(value);
-}
-
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       UInt64 % value) {
-  uint64_t val;
-  input.readInt(&val);
-  value = val;
-}
-
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        Boolean value) {
-  output.write((uint8_t)(value ? 1 : 0));
-}
-
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       Boolean % value) {
-  uint8_t byte;
-  input.read(&byte);
-  value = (byte == 1 ? true : false);
-}
-
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        Double value) {
-  output.writeDouble(value);
-}
-
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       Double % value) {
-  double val;
-  input.readDouble(&val);
-  value = val;
-}
-
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        Single value) {
-  output.writeFloat(value);
-}
-
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       Single % value) {
-  float val;
-  input.readFloat(&val);
-  value = val;
-}
-
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        String ^ str) {
-  if (str != nullptr) {
-    pin_ptr<const wchar_t> pin_str = PtrToStringChars(str);
-    output.writeUTF((wchar_t*)pin_str, str->Length);
-  } else {
-    output.writeUTF((wchar_t*)NULL, 0);
-  }
-}
-
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       String ^ % str) {
-  wchar_t* n_buffer = nullptr;
-  uint16_t len;
-  input.readUTF(&n_buffer, &len);
-  if (len > 0) {
-    str = gcnew String(n_buffer, 0, len);
-    input.freeUTFMemory(n_buffer);
-  } else {
-    str = nullptr;
-  }
-}
-
-template <typename TObj>
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        DataOutput ^ mg_output, TObj ^ value,
-                        TypeHelper::yes_type isSerializable) {
-  mg_output->WriteObject(value);
-}
-
-template <typename TObj>
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        DataOutput ^ mg_output, TObj ^ value,
-                        TypeHelper::no_type isNotSerializable) {
-  WriteObject(output, value);
-}
-
-template <typename TObj>
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        DataOutput ^ mg_output, TObj ^ value) {
-  WriteObject(output, mg_output, value, TYPE_IS_IGFSERIALIZABLE_TYPE(TObj));
-}
-
-template <typename TObj>
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        DataOutput ^ mg_output, TObj value) {
-  WriteObject(output, value);
-}
-
-template <typename TObj>
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       DataInput ^ mg_input, TObj ^ % value,
-                       TypeHelper::yes_type isSerializable) {
-  value = static_cast<TObj ^>(mg_input->ReadObject());
-}
-
-template <typename TObj>
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       DataInput ^ mg_input, TObj ^ % value,
-                       TypeHelper::no_type isNotSerializable) {
-  ReadObject(input, value);
-}
-
-template <typename TObj>
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       DataInput ^ mg_input, TObj ^ % value) {
-  ReadObject(input, mg_input, value, TYPE_IS_IGFSERIALIZABLE_TYPE(TObj));
-}
-
-template <typename TObj>
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       DataInput ^ mg_input, TObj % value) {
-  ReadObject(input, value);
-}
-
-template <typename TObj>
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        array<TObj> ^ arr) {
-  if (arr != nullptr) {
-    pin_ptr<TObj> pin_arr = &arr[0];
-    apache::geode::client::serializer::writeObject(output, (TObj*)pin_arr,
-                                                   arr->Length);
-  } else {
-    output.writeInt(0);
-  }
-}
-
-template <typename TObj>
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       array<TObj> ^ % arr) {
-  int32_t size;
-  input.readInt(&size);
-  if (size > 0) {
-    arr = gcnew array<TObj>(size);
-    pin_ptr<TObj> pin_arr = &arr[0];
-    apache::geode::client::serializer::readArray(input, (TObj*)pin_arr, size);
-  } else {
-    arr = nullptr;
-  }
-}
-
-template <typename TObj>
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        DataOutput ^ mg_output, array<TObj ^> ^ arr) {
-  if (arr != nullptr) {
-    output.writeInt(arr->Length);
-            for
-              each(TObj ^ obj in arr) { WriteObject(output, mg_output, obj); }
-  } else {
-    output.writeInt(-1);
-  }
-}
-
-template <typename TObj>
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       DataInput ^ mg_input, array<TObj ^> ^ % arr) {
-  int32_t size;
-  input.readInt(&size);
-  if (size > 0) {
-    arr = gcnew array<TObj ^>(size);
-            for
-              each(TObj ^ obj in arr) { ReadObject(input, mg_input, obj); }
-  } else {
-    arr = nullptr;
-  }
-}
-
-template <typename TObj>
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        DataOutput ^ mg_output, List<TObj> ^ value) {
-  if (value != nullptr) {
-    output.writeInt(value->Count);
-            for
-              each(TObj obj in value) { WriteObject(output, mg_output, obj); }
-  } else {
-    output.writeInt(-1);
-  }
-}
-
-template <typename TObj>
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       DataInput ^ mg_input, List<TObj> ^ % value) {
-  int32_t len;
-  input.readInt(&len);
-  if (len > 0) {
-    value = gcnew List<TObj>(len);
-    for (int32_t listIndex = 0; listIndex < len; listIndex++) {
-      ReadObject(input, mg_input, value[listIndex]);
-    }
-  } else {
-    value = nullptr;
-  }
-}
-
-template <typename TKey, typename TVal>
-inline void WriteObject(apache::geode::client::DataOutput& output,
-                        DataOutput ^ mg_output,
-                        Dictionary<TKey, TVal> ^ value) {
-  if (value != nullptr) {
-    output.writeInt(value->Count);
-            for
-              each(KeyValuePair<TKey, TVal> ^ pair in value) {
-                WriteObject(output, mg_output, pair->Key);
-                WriteObject(output, mg_output, pair->Value);
-              }
-  } else {
-    output.writeInt(-1);
-  }
-}
-
-template <typename TKey, typename TVal>
-inline void ReadObject(apache::geode::client::DataInput& input,
-                       DataInput ^ mg_input, Dictionary<TKey, TVal> ^ % value) {
-  int32_t len;
-  input.readInt(&len);
-  if (len > 0) {
-    TKey ^ key;
-    TVal ^ val;
-    value = gcnew Dictionary<TKey, TVal>(len);
-    for (int32_t listIndex = 0; listIndex < len; listIndex++) {
-      ReadObject(input, mg_input, key);
-      ReadObject(input, mg_input, val);
-      value[key] = val;
-    }
-  } else {
-    value = nullptr;
-  }
-}
-}
-}
-}
-}
-
-#endif  // GEMFIRE_CLR
-
-#endif  // GEODE_PDXAUTOSERIALIZER_ASCLIBUILTINS_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/quickstart/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/CMakeLists.txt b/src/quickstart/cpp/CMakeLists.txt
index d6f8a59..9c6d60c 100644
--- a/src/quickstart/cpp/CMakeLists.txt
+++ b/src/quickstart/cpp/CMakeLists.txt
@@ -26,16 +26,6 @@ elseif(UNIX)
     set(DYNAMIC_LIBRARY_PATH LD_LIBRARY_PATH=${NATIVECLIENT_DIR}/lib)
 endif()
 
-macro(add_pdxautoserializer NAMESPACE CLASS HEADER SUFFIX CLASSNAMESTR)
-    set(_OUTPUT ${CMAKE_SOURCE_DIR}/queryobjects/${NAMESPACE}_${CLASS}${SUFFIX}.cpp)
-    set(_INPUT ${HEADER})
-
-    add_custom_command(OUTPUT ${_OUTPUT}
-        COMMAND ${DYNAMIC_LIBRARY_PATH} ${NATIVECLIENT_BINARIES_DIR}/pdxautoserializer --outDir=${CMAKE_SOURCE_DIR}/queryobjects ${CMAKE_SOURCE_DIR}/queryobjects/${HEADER}
-        DEPENDS ${CMAKE_SOURCE_DIR}/queryobjects/${_INPUT}
-    )
-endmacro()
-
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 
@@ -62,9 +52,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -std=c++11 -lstdc++ -lgcc_s -lCrunG3 -lc")
 endif()
 
-add_pdxautoserializer(testobject PortfolioPdxAuto PortfolioPdxAuto.hpp Serializable "")
-add_pdxautoserializer(testobject PositionPdxAuto PositionPdxAuto.hpp Serializable "")
-
 set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}")
 set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}")
 
@@ -178,14 +165,5 @@ add_executable(PdxRemoteQuery
   queryobjects/PositionPdx.cpp)
 target_link_libraries(PdxRemoteQuery PUBLIC ${GFCPPCACHE})
 
-add_executable(PdxAutoSerializer
-  PdxAutoSerializer.cpp
-  queryobjects/PortfolioPdxAuto.cpp
-  queryobjects/PositionPdxAuto.cpp
-  queryobjects/testobject_PortfolioPdxAutoSerializable.cpp
-  queryobjects/testobject_PositionPdxAutoSerializable.cpp
-  )
-target_link_libraries(PdxAutoSerializer PUBLIC ${GFCPPCACHE})
-
 file(COPY ../XMLs DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 file(COPY ../keystore DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/quickstart/cpp/PdxAutoSerializer.cpp
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/PdxAutoSerializer.cpp b/src/quickstart/cpp/PdxAutoSerializer.cpp
deleted file mode 100644
index 962e072..0000000
--- a/src/quickstart/cpp/PdxAutoSerializer.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * 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.
- */
-
-/*
- * The PoolRemoteQuery QuickStart Example.
- * This examples creates pool using locator.
- * This example takes the following steps:
- *
- * 1. Create a Geode Cache.
- * 2. Get the example Region from the Pool.
- * 3. Populate some Pdx Type query objects on the Region.
- * 4. Get the pool, get the Query Service from Cache. Pool is define in
- * clientPdxRemoteQuery.xml. Pool has locator to get the server. Apart from that
- * pool is bind to server group "ServerGroup1".
- * 5. Execute a query that returns a Result Set.
- * 6. Execute a query that returns a Struct Set.
- * 7. Execute the region shortcut/convenience query methods.
- * 8. Close the Cache.
- *
- */
-
-// Include the Geode library.
-#include <geode/GeodeCppCache.hpp>
-
-// Include our Query objects, viz. PortfolioPdx and PositionPdx.
-#include "queryobjects/PortfolioPdxAuto.hpp"
-#include "queryobjects/PositionPdxAuto.hpp"
-
-// Use the "geode" namespace.
-using namespace apache::geode::client;
-
-// Use the "testobject" namespace for the query objects.
-using namespace testobject;
-
-// The PdxRemoteQuery QuickStart example.
-int main(int argc, char** argv) {
-  try {
-    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory();
-
-    // Create a Geode Cache with the "clientPdxRemoteQuery.xml" Cache XML
-    // file.
-    // CachePtr cachePtr = cacheFactory->set("cache-xml-file",
-    // "XMLs/clientPdxAutoSerializer.xml")->create();
-    CachePtr cachePtr =
-        cacheFactory->set("cache-xml-file", "XMLs/clientPdxAutoSerializer.xml")
-            ->create();
-
-    LOGINFO("Created the Geode Cache");
-
-    // Get the example Region from the Cache which is declared in the Cache XML
-    // file.
-    RegionPtr regionPtr = cachePtr->getRegion("Portfolios");
-
-    LOGINFO("Obtained the Region from the Cache");
-
-    // Register our Serializable/Cacheable Query objects, viz. PortfolioPdx and
-    // PositionPdx.
-    Serializable::registerPdxType(PortfolioPdxAuto::createDeserializable);
-    Serializable::registerPdxType(PositionPdxAuto::createDeserializable);
-
-    LOGINFO("Registered PDX Type Query Objects");
-
-    // Populate the Region with some Pdx Type objects, i.e PortfolioPdx objects.
-    PortfolioPdxPtr port1Ptr(new PortfolioPdxAuto(1 /*ID*/, 10 /*size*/));
-    PortfolioPdxPtr port2Ptr(new PortfolioPdxAuto(2 /*ID*/, 20 /*size*/));
-    PortfolioPdxPtr port3Ptr(new PortfolioPdxAuto(3 /*ID*/, 30 /*size*/));
-    regionPtr->put("Key1", port1Ptr);
-    regionPtr->put("Key2", port2Ptr);
-    regionPtr->put("Key3", port3Ptr);
-
-    LOGINFO("Populated some PortfolioPdx Objects");
-
-    // Get the QueryService from the Cache.
-    QueryServicePtr qrySvcPtr = cachePtr->getQueryService("examplePool");
-
-    LOGINFO("Got the QueryService from the Cache");
-
-    PortfolioPdxPtr port4Ptr = regionPtr->get("Key1");
-
-    // Execute a Query which returns a ResultSet.
-    QueryPtr qryPtr = qrySvcPtr->newQuery("SELECT DISTINCT * FROM /Portfolios");
-    SelectResultsPtr resultsPtr = qryPtr->execute();
-
-    LOGINFO("ResultSet Query returned %d rows", resultsPtr->size());
-
-    // Execute a Query which returns a StructSet.
-    qryPtr = qrySvcPtr->newQuery(
-        "SELECT DISTINCT id, status FROM /Portfolios WHERE id > 1");
-    resultsPtr = qryPtr->execute();
-
-    LOGINFO("StructSet Query returned %d rows", resultsPtr->size());
-
-    // Iterate through the rows of the query result.
-    int rowCount = 0;
-    SelectResultsIterator iter = resultsPtr->getIterator();
-    while (iter.hasNext()) {
-      rowCount++;
-      Struct* psi = dynamic_cast<Struct*>(iter.next().ptr());
-      LOGINFO("Row %d Column 1 is named %s, value is %s", rowCount,
-              psi->getFieldName(0), (*psi)[0]->toString()->asChar());
-      LOGINFO("Row %d Column 2 is named %s, value is %S", rowCount,
-              psi->getFieldName(1), (*psi)[1]->toString()->asWChar());
-    }
-
-    // Execute a Region Shortcut Query (convenience method).
-    resultsPtr = regionPtr->query("id = 2");
-
-    LOGINFO("Region Query returned %d rows", resultsPtr->size());
-
-    // Execute the Region selectValue() API.
-    SerializablePtr resultPtr = regionPtr->selectValue("id = 3");
-    PortfolioPdxPtr portPtr = dynCast<PortfolioPdxPtr>(resultPtr);
-
-    LOGINFO("Region selectValue() returned an item:\n %s",
-            portPtr->toString()->asChar());
-
-    // Execute the Region existsValue() API.
-    bool existsValue = regionPtr->existsValue("id = 4");
-
-    LOGINFO("Region existsValue() returned %s", existsValue ? "true" : "false");
-
-    // Close the Geode Cache.
-    cachePtr->close();
-
-    LOGINFO("Closed the Geode Cache");
-
-    return 0;
-  }
-  // An exception should not occur
-  catch (const Exception& geodeExcp) {
-    LOGERROR("PdxAutoSerializer Geode Exception: %s", geodeExcp.getMessage());
-
-    return 1;
-  }
-}

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/quickstart/runcpp.bat.in
----------------------------------------------------------------------
diff --git a/src/quickstart/runcpp.bat.in b/src/quickstart/runcpp.bat.in
index dce7118..1b088a4 100755
--- a/src/quickstart/runcpp.bat.in
+++ b/src/quickstart/runcpp.bat.in
@@ -239,8 +239,7 @@ echo 21.TransactionsXA
 echo 22.PdxRemoteQuery
 echo 23.PdxSerializer
 echo 24.PdxInstance
-echo 25.PdxAutoSerializer
-echo 26.Quit
+echo 25.Quit
 echo.
 
 :getoption
@@ -275,8 +274,7 @@ if '%option%' equ '21' set exname=TransactionsXA
 if '%option%' equ '22' set exname=PdxRemoteQuery
 if '%option%' equ '23' set exname=PdxSerializer
 if '%option%' equ '24' set exname=PdxInstance
-if '%option%' equ '25' set exname=PdxAutoSerializer
-if '%option%' equ '26' goto finished
+if '%option%' equ '25' goto finished
 
 if '%exname%' equ 'invalidoption' goto invalidoption
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/quickstart/runcpp.sh.in
----------------------------------------------------------------------
diff --git a/src/quickstart/runcpp.sh.in b/src/quickstart/runcpp.sh.in
index e12d76d..ba1a1c8 100755
--- a/src/quickstart/runcpp.sh.in
+++ b/src/quickstart/runcpp.sh.in
@@ -69,8 +69,7 @@ else
     echo 22.PdxRemoteQuery
     echo 23.PdxSerializer
     echo 24.PdxInstance
-    echo 25.PdxAutoSerializer
-    echo 26.Quit
+    echo 25.Quit
     echo
   fi
 
@@ -151,9 +150,6 @@ else
         exname='PdxInstance'
       ;;
       "25")
-        exname='PdxAutoSerializer'
-      ;;
-      "26")
         exname='Quit'
     exit
       ;;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/tests/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/cpp/CMakeLists.txt b/src/tests/cpp/CMakeLists.txt
index 971f711..71c6442 100644
--- a/src/tests/cpp/CMakeLists.txt
+++ b/src/tests/cpp/CMakeLists.txt
@@ -17,6 +17,5 @@ project(nativeclient.tests.cpp)
 
 add_subdirectory(fwklib)
 add_subdirectory(fwk)
-add_subdirectory(pdxautoserializerclass)
 add_subdirectory(testobject)
 add_subdirectory(security)

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/tests/cpp/fwklib/QueryHelper.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/QueryHelper.hpp b/src/tests/cpp/fwklib/QueryHelper.hpp
index 2e08263..329b36b 100644
--- a/src/tests/cpp/fwklib/QueryHelper.hpp
+++ b/src/tests/cpp/fwklib/QueryHelper.hpp
@@ -32,8 +32,6 @@
 #include "../testobject/PdxType.hpp"
 #include "../testobject/PortfolioPdx.hpp"
 #include "../testobject/PositionPdx.hpp"
-#include "../pdxautoserializerclass/PortfolioPdx.hpp"
-#include "../pdxautoserializerclass/PositionPdx.hpp"
 #include "fwklib/FwkLog.hpp"
 
 #include <geode/ResultSet.hpp>
@@ -45,7 +43,6 @@
 
 using namespace apache::geode::client;
 using namespace PdxTests;
-using namespace AutoPdxTests;
 
 namespace testData {
 
@@ -683,11 +680,6 @@ class QueryHelper {
                                         char** nm = NULL);
   virtual void populatePositionPdxData(RegionPtr& pregion, int setSize,
                                        int numSets);
-  virtual void populateAutoPortfolioPdxData(RegionPtr& pregion, int setSize,
-                                            int numSets, int32_t objSize = 1,
-                                            char** nm = NULL);
-  virtual void populateAutoPositionPdxData(RegionPtr& pregion, int setSize,
-                                           int numSets);
   virtual void destroyPortfolioOrPositionData(RegionPtr& pregion, int setSize,
                                               int numSets,
                                               const char* dataType);
@@ -908,12 +900,10 @@ void QueryHelper::destroyPortfolioOrPositionData(RegionPtr& rptr, int setSize,
       for (int current = 1; current <= setSize; current++) {
         char portname[100] = {0};
         if (strcmp(dataType, "Portfolio") == 0 ||
-            strcmp(dataType, "PortfolioPdx") == 0 ||
-            strcmp(dataType, "AutoPortfolioPdx") == 0) {
+            strcmp(dataType, "PortfolioPdx") == 0) {
           ACE_OS::sprintf(portname, "port%d-%d", set, current);
         } else if (strcmp(dataType, "Position") == 0 ||
-                   strcmp(dataType, "PositionPdx") == 0 ||
-                   strcmp(dataType, "AutoPositionPdx") == 0) {
+                   strcmp(dataType, "PositionPdx") == 0) {
           ACE_OS::sprintf(portname, "pos%d-%d", set, current);
         } else {
           throw apache::geode::client::IllegalArgumentException(
@@ -1023,54 +1013,6 @@ void QueryHelper::populatePositionPdxData(RegionPtr& rptr, int setSize,
   }
   // positionSetSize = setSize; positionNumSets = numSets;
 }
-void QueryHelper::populateAutoPortfolioPdxData(RegionPtr& rptr, int setSize,
-                                               int numSets, int32_t objSize,
-                                               char** nm) {
-  // lets reset the counter for uniform population of position objects
-  AutoPdxTests::PositionPdx::resetCounter();
-
-  for (int set = 1; set <= numSets; set++) {
-    for (int current = 1; current <= setSize; current++) {
-      CacheablePtr port(new AutoPdxTests::PortfolioPdx(current, objSize));
-
-      char portname[100] = {0};
-      ACE_OS::sprintf(portname, "port%d-%d", set, current);
-
-      CacheableKeyPtr keyport = CacheableKey::create(portname);
-
-      rptr->put(keyport, port);
-      LOGINFO(
-          "populateAutoPortfolioPdxData:: Put for iteration current = %d done",
-          current);
-    }
-  }
-  // portfolioSetSize = setSize; portfolioNumSets = numSets; objectSize =
-  // objSize;
-
-  printf("all puts done \n");
-}
-
-void QueryHelper::populateAutoPositionPdxData(RegionPtr& rptr, int setSize,
-                                              int numSets) {
-  int numSecIds = sizeof(secIds) / sizeof(char*);
-
-  for (int set = 1; set <= numSets; set++) {
-    for (int current = 1; current <= setSize; current++) {
-      CacheablePtr pos(new AutoPdxTests::PositionPdx(
-          secIds[current % numSecIds], current * 100));
-
-      char posname[100] = {0};
-      ACE_OS::sprintf(posname, "pos%d-%d", set, current);
-
-      CacheableKeyPtr keypos = CacheableKey::create(posname);
-      rptr->put(keypos, pos);
-      LOGINFO(
-          "populateAutoPositionPdxData:: Put for iteration current = %d done",
-          current);
-    }
-  }
-  // positionSetSize = setSize; positionNumSets = numSets;
-}
 bool QueryHelper::verifyRS(SelectResultsPtr& resultSet, int expectedRows) {
   if (!instanceOf<ResultSetPtr>(resultSet)) {
     return false;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/tests/cpp/pdxautoserializerclass/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/cpp/pdxautoserializerclass/CMakeLists.txt b/src/tests/cpp/pdxautoserializerclass/CMakeLists.txt
deleted file mode 100644
index cf1c6f3..0000000
--- a/src/tests/cpp/pdxautoserializerclass/CMakeLists.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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.
-cmake_minimum_required(VERSION 3.4)
-project(nativeclient.tests.pdxautoserializerclass)
-
-file(GLOB_RECURSE SOURCES "*.cpp")
-
-if (APPLE)
-    set(DYNAMIC_LIBRARY_PATH DYLD_LIBRARY_PATH=$<TARGET_LINKER_FILE_DIR:apache-geode>)
-elseif(UNIX)
-    set(DYNAMIC_LIBRARY_PATH LD_LIBRARY_PATH=$<TARGET_LINKER_FILE_DIR:apache-geode>)
-endif()
-
-add_library(pdxobject SHARED ${SOURCES})
-set_target_properties(pdxobject PROPERTIES FOLDER test)
-
-add_definitions(-DBUILD_TESTOBJECT)
-
-target_link_libraries(pdxobject
-  PUBLIC 
-    apache-geode
-    c++11
-)
-
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/tests/cpp/pdxautoserializerclass/PortfolioPdx.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/pdxautoserializerclass/PortfolioPdx.cpp b/src/tests/cpp/pdxautoserializerclass/PortfolioPdx.cpp
deleted file mode 100644
index d6cb464..0000000
--- a/src/tests/cpp/pdxautoserializerclass/PortfolioPdx.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * 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.
- */
-#include "PortfolioPdx.hpp"
-
-using namespace apache::geode::client;
-using namespace AutoPdxTests;
-
-char *PortfolioPdx::secIds[] = {(char *)"SUN",  (char *)"IBM",  (char *)"YHOO",
-                                (char *)"GOOG", (char *)"MSFT", (char *)"AOL",
-                                (char *)"APPL", (char *)"ORCL", (char *)"SAP",
-                                (char *)"DELL"};
-
-PortfolioPdx::PortfolioPdx(int32_t i, int32_t size, char **nm) : names(nm) {
-  ID = i;
-
-  char pkidbuf[256];
-  sprintf(pkidbuf, "%d", i);
-  size_t strSize = strlen(pkidbuf) + 1;
-  pkid = new char[strSize];
-  memcpy(pkid, pkidbuf, strSize);
-
-  const char *statusStr = (i % 2 == 0) ? "active" : "inactive";
-  int32_t statusSize = static_cast<int32_t>(strlen(statusStr)) + 1;
-  status = new char[statusSize];
-  memcpy(status, statusStr, statusSize);
-
-  char buf[100];
-  sprintf(buf, "type%d", (i % 3));
-  size_t strSize2 = strlen(buf) + 1;
-  type = new char[strSize2];
-  memcpy(type, buf, strSize2);
-
-  int numSecIds = sizeof(secIds) / sizeof(char *);
-  position1 = new PositionPdx(secIds[PositionPdx::cnt % numSecIds],
-                              PositionPdx::cnt * 1000);
-  if (i % 2 != 0) {
-    position2 = new PositionPdx(secIds[PositionPdx::cnt % numSecIds],
-                                PositionPdx::cnt * 1000);
-  } else {
-    position2 = NULLPTR;
-  }
-  positions = CacheableHashMap::create();
-  positions->insert(
-      CacheableString::create(secIds[PositionPdx::cnt % numSecIds]), position1);
-
-  if (size > 0) {
-    newVal = new int8_t[size];
-    for (int index = 0; index < size; index++) {
-      newVal[index] = static_cast<int8_t>('B');
-    }
-  }
-  newValSize = size;
-
-  time_t timeVal = 1310447869;
-  creationDate = CacheableDate::create(timeVal);
-  arrayNull = NULL;
-  arrayZeroSize = new int8_t[0];
-  arrayNullLen = 0;
-  arrayZeroSizeLen = 0;
-}
-
-PortfolioPdx::~PortfolioPdx() {
-  if (newVal != NULL) {
-    delete[] newVal;
-    newVal = NULL;
-  }
-  if (status != NULL) {
-    delete[] status;
-    status = NULL;
-  }
-  if (pkid != NULL) {
-    delete[] pkid;
-    pkid = NULL;
-  }
-
-  if (type != NULL) {
-    delete[] type;
-    type = NULL;
-  }
-
-  if (newVal != NULL) {
-    delete[] newVal;
-    newVal = NULL;
-  }
-}
-
-void PortfolioPdx::toData( PdxWriterPtr pw  )  {
-  pw->writeInt("ID", ID);
-  pw->markIdentityField("ID");
-
-  pw->writeString("pkid", pkid);
-  pw->markIdentityField("pkid");
-
-  pw->writeObject("position1", position1);
-  pw->markIdentityField("position1");
-
-  pw->writeObject("position2", position2);
-  pw->markIdentityField("position2");
-
-  pw->writeObject("positions", positions);
-  pw->markIdentityField("positions");
-
-  pw->writeString("type", type);
-  pw->markIdentityField("type");
-
-  pw->writeString("status", status);
-  pw->markIdentityField("status");
-
-  pw->writeStringArray("names", names, 0);
-  pw->markIdentityField("names");
-
-  pw->writeByteArray("newVal", newVal, newValSize);
-  pw->markIdentityField("newVal");
-
-  pw->writeDate("creationDate", creationDate);
-  pw->markIdentityField("creationDate");
-
-  pw->writeByteArray("arrayNull", arrayNull,0);
-  pw->writeByteArray("arrayZeroSize", arrayZeroSize,0);
-
-}
-
-void PortfolioPdx::fromData( PdxReaderPtr pr )
-{
-  ID = pr->readInt("ID");
-  pkid = pr->readString("pkid");
-
-  position1 = dynCast<PositionPdxPtr>(pr->readObject("position1"));
-  position2 = dynCast<PositionPdxPtr>(pr->readObject("position2"));
-  positions = dynCast<CacheableHashMapPtr>(pr->readObject("positions"));
-  type = pr->readString("type");
-  status = pr->readString("status");
-
-  int32_t strLenArray=0;
-  names = pr->readStringArray("names", strLenArray);
-  int32_t byteArrayLen=0;
-  newVal = pr->readByteArray("newVal", byteArrayLen);
-  creationDate = pr->readDate("creationDate");
-  int32_t arrayNullLen = 0;
-  arrayNull = pr->readByteArray("arrayNull", arrayNullLen);
-  int32_t arrayZeroSizeLen=0;
-  arrayZeroSize = pr->readByteArray("arrayZeroSize", arrayZeroSizeLen);
-
-}
-
-CacheableStringPtr PortfolioPdx::toString() const {
-  LOGINFO("PortfolioPdx::toString() Start");
-  char idbuf[1024];
-  sprintf(idbuf, "PortfolioPdxObject: [ ID=%d ]", ID);
-
-  char pkidbuf[1024];
-  if (pkid != NULL) {
-    sprintf(pkidbuf, " status=%s type=%s pkid=%s\n", this->status, this->type,
-            this->pkid);
-  } else {
-    sprintf(pkidbuf, " status=%s type=%s pkid=%s\n", this->status, this->type,
-            this->pkid);
-  }
-  char position1buf[2048];
-  if (position1 != NULLPTR) {
-    sprintf(position1buf, "\t\t\t  P1: %s", position1->toString()->asChar());
-  } else {
-    sprintf(position1buf, "\t\t\t  P1: %s", "NULL");
-  }
-  char position2buf[2048];
-  if (position2 != NULLPTR) {
-    sprintf(position2buf, " P2: %s", position2->toString()->asChar());
-  } else {
-    sprintf(position2buf, " P2: %s ]", "NULL");
-  }
-  char creationdatebuf[2048];
-  if (creationDate != NULLPTR) {
-    sprintf(creationdatebuf, "creation Date %s",
-            creationDate->toString()->asChar());
-  } else {
-    sprintf(creationdatebuf, "creation Date %s", "NULL");
-  }
-
-  char stringBuf[7000];
-  sprintf(stringBuf, "%s%s%s%s%s", idbuf, pkidbuf, creationdatebuf,
-          position1buf, position2buf);
-  return CacheableString::create(stringBuf);
-
-  return CacheableString::create(idbuf);
-}

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/tests/cpp/pdxautoserializerclass/PortfolioPdx.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/pdxautoserializerclass/PortfolioPdx.hpp b/src/tests/cpp/pdxautoserializerclass/PortfolioPdx.hpp
deleted file mode 100644
index e2d2202..0000000
--- a/src/tests/cpp/pdxautoserializerclass/PortfolioPdx.hpp
+++ /dev/null
@@ -1,116 +0,0 @@
-#pragma once
-
-#ifndef GEODE_PDXAUTOSERIALIZERCLASS_PORTFOLIOPDX_H_
-#define GEODE_PDXAUTOSERIALIZERCLASS_PORTFOLIOPDX_H_
-
-/*
- * 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.
- */
-
-/*
- * @brief User class for testing the put functionality for object.
- */
-
-#include "PositionPdx.hpp"
-#define GFIGNORE(X) X
-#define GFEXCLUDE
-#define GFID
-#define GFARRAYSIZE(X)
-#define GFARRAYELEMSIZE(X)
-using namespace apache::geode::client;
-
-namespace AutoPdxTests {
-
-class GFIGNORE(TESTOBJECT_EXPORT) PortfolioPdx : public PdxSerializable {
- private:
-  GFID int32_t ID;
-
-  GFID char* pkid;
-
-  GFID PositionPdxPtr position1;
-  GFID PositionPdxPtr position2;
-  GFID CacheableHashMapPtr positions;
-  GFID char *type, *status;
-  GFID char** names;
-  GFARRAYSIZE(names) int32_t nameStrArrayLen;
-  // GFEXCLUDE static  const char* secIds[]; // bug #914
-  GFEXCLUDE static char* secIds[];
-  GFID int8_t* newVal;
-  GFARRAYSIZE(newVal) int32_t newValSize;
-  GFID CacheableDatePtr creationDate;
-  GFID int8_t *arrayNull, *arrayZeroSize;
-  GFARRAYSIZE(arrayNull) int32_t arrayNullLen;
-  GFARRAYSIZE(arrayZeroSize) int32_t arrayZeroSizeLen;
-
- public:
-  PortfolioPdx()
-      : ID(0),
-        pkid(NULL),
-        type(NULL),
-        status(NULL),
-        newVal(NULL),
-        creationDate(NULLPTR),
-        arrayNull(NULL),
-        arrayZeroSize(NULL) {}
-
-  PortfolioPdx(int32_t id, int32_t size = 0, char** nm = NULL);
-
-  virtual ~PortfolioPdx();
-
-  int32_t getID() { return ID; }
-
-  char* getPkid() { return pkid; }
-
-  PositionPdxPtr getP1() { return position1; }
-
-  PositionPdxPtr getP2() { return position2; }
-
-  CacheableHashMapPtr getPositions() { return positions; }
-
-  bool testMethod(bool booleanArg) { return true; }
-
-  char* getStatus() { return status; }
-
-  bool isActive() { return (strcmp(status, "active") == 0) ? true : false; }
-
-  int8_t* getNewVal() { return newVal; }
-
-  int32_t getNewValSize() { return newValSize; }
-
-  const char* getClassName() { return this->type; }
-
-  CacheableDatePtr getCreationDate() { return creationDate; }
-
-  int8_t* getArrayNull() { return arrayNull; }
-
-  int8_t* getArrayZeroSize() { return arrayZeroSize; }
-
-  static PdxSerializable* createDeserializable();
-
-  const char* getClassName() const { return this->type; }
-
-  using PdxSerializable::toData;
-  using PdxSerializable::fromData;
-  virtual void toData(PdxWriterPtr pw);
-  virtual void fromData(PdxReaderPtr pr);
-
-  CacheableStringPtr toString() const;
-};
-
-typedef SharedPtr<PortfolioPdx> PortfolioPdxPtr;
-}  // namespace AutoPdxTests
-
-#endif  // GEODE_PDXAUTOSERIALIZERCLASS_PORTFOLIOPDX_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/tests/cpp/pdxautoserializerclass/PositionPdx.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/pdxautoserializerclass/PositionPdx.cpp b/src/tests/cpp/pdxautoserializerclass/PositionPdx.cpp
deleted file mode 100644
index 3508fbd..0000000
--- a/src/tests/cpp/pdxautoserializerclass/PositionPdx.cpp
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * 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.
- */
-#include "PositionPdx.hpp"
-#include <cwchar>
-#include <wchar.h>
-
-using namespace apache::geode::client;
-using namespace AutoPdxTests;
-
-int32_t PositionPdx::cnt = 0;
-
-PositionPdx::PositionPdx() { init(); }
-
-PositionPdx::PositionPdx(const char* id, int32_t out) {
-  init();
-
-  size_t strSize = strlen(id) + 1;
-  secId = new char[strSize];
-  memcpy(secId, id, strSize);
-
-  qty = out * (cnt % 2 == 0 ? 10.0 : 100.0);
-  mktValue = qty * 1.2345998;
-  sharesOutstanding = out;
-  // secType = ( wchar_t * )malloc( ( wcslen( L"a" ) + 1 ) * sizeof( wchar_t )
-  // );
-  secType = new char[(strlen("a") + 1)];
-  strcpy(secType, "a");
-
-  pid = cnt++;
-}
-
-// This constructor is just for some internal data validation test
-PositionPdx::PositionPdx(int32_t iForExactVal) {
-  init();
-
-  char* id = new char[iForExactVal + 2];
-  for (int i = 0; i <= iForExactVal; i++) {
-    id[i] = 'a';
-  }
-  id[iForExactVal + 1] = '\0';
-  size_t strSize = strlen(id) + 1;
-  secId = new char[strSize];
-  memcpy(secId, id, strSize);
-
-  delete[] id;
-  qty = (iForExactVal % 2 == 0 ? 1000 : 100);
-  mktValue = qty * 2;
-  sharesOutstanding = iForExactVal;
-  // secType = ( wchar_t * )malloc( ( wcslen( L"a" ) + 1 ) * sizeof( wchar_t )
-  // );
-  secType = new char[(strlen("a") + 1)];
-  strcpy(secType, "a");
-  pid = iForExactVal;
-}
-
-PositionPdx::~PositionPdx() {
-  if (secType != NULL) {
-    // free(secType);
-    delete[] secType;
-    secType = NULL;
-  }
-
-  if (secId != NULL) {
-    // free(secId);
-    delete[] secId;
-    secId = NULL;
-  }
-}
-
-void PositionPdx::init() {
-  avg20DaysVol = 0;
-  bondRating = NULL;
-  convRatio = 0.0;
-  country = NULL;
-  delta = 0.0;
-  industry = 0;
-  issuer = 0;
-  mktValue = 0.0;
-  qty = 0.0;
-  secId = NULL;
-  secLinks = NULL;
-  secType = NULL;
-  sharesOutstanding = 0;
-  underlyer = NULL;
-  volatility = 0;
-  pid = 0;
-}
-
-void PositionPdx::toData( PdxWriterPtr pw)  {
-  pw->writeLong("avg20DaysVol", avg20DaysVol);
-  pw->markIdentityField("avg20DaysVol");
-
-  pw->writeString("bondRating", bondRating);
-  pw->markIdentityField("bondRating");
-
-  pw->writeDouble("convRatio", convRatio);
-  pw->markIdentityField("convRatio");
-
-  pw->writeString("country", country);
-  pw->markIdentityField("country");
-
-  pw->writeDouble("delta", delta);
-  pw->markIdentityField("delta");
-
-  pw->writeLong("industry", industry);
-  pw->markIdentityField("industry");
-
-  pw->writeLong("issuer", issuer);
-  pw->markIdentityField("issuer");
-
-  pw->writeDouble("mktValue", mktValue);
-  pw->markIdentityField("mktValue");
-
-  pw->writeDouble("qty", qty);
-  pw->markIdentityField("qty");
-
-  pw->writeString("secId", secId);
-  pw->markIdentityField("secId");
-
-  pw->writeString("secLinks", secLinks);
-  pw->markIdentityField("secLinks");
-
-  pw->writeString("secType", secType);
-  pw->markIdentityField("secType");
-
-  pw->writeInt("sharesOutstanding", sharesOutstanding);
-  pw->markIdentityField("sharesOutstanding");
-
-  pw->writeString("underlyer", underlyer);
-  pw->markIdentityField("underlyer");
-
-  pw->writeLong("volatility", volatility);
-  pw->markIdentityField("volatility");
-
-  pw->writeInt("pid", pid);
-  pw->markIdentityField("pid");
-}
-
-void PositionPdx::fromData( PdxReaderPtr pr ){
-
-  avg20DaysVol = pr->readLong("avg20DaysVol");
-  bondRating = pr->readString("bondRating");
-  convRatio = pr->readDouble("convRatio");
-  country = pr->readString("country");
-  delta = pr->readDouble("delta");
-  industry = pr->readLong("industry");
-  issuer = pr->readLong("issuer");
-  mktValue = pr->readDouble("mktValue");
-  qty = pr->readDouble("qty");
-  secId = pr->readString("secId");
-  secLinks = pr->readString("secLinks");
-  secType = pr->readString("secType");
-  sharesOutstanding = pr->readInt("sharesOutstanding");
-  underlyer = pr->readString("underlyer");
-  volatility = pr->readLong("volatility");
-  pid = pr->readInt("pid");
-}
-CacheableStringPtr PositionPdx::toString() const {
-  char buf[1024];
-  sprintf(buf, "PositionPdx Object:[ id=%d ]", this->pid);
-  return CacheableString::create(buf);
-}

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/tests/cpp/pdxautoserializerclass/PositionPdx.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/pdxautoserializerclass/PositionPdx.hpp b/src/tests/cpp/pdxautoserializerclass/PositionPdx.hpp
deleted file mode 100644
index d2ce1c0..0000000
--- a/src/tests/cpp/pdxautoserializerclass/PositionPdx.hpp
+++ /dev/null
@@ -1,112 +0,0 @@
-#pragma once
-
-#ifndef GEODE_PDXAUTOSERIALIZERCLASS_POSITIONPDX_H_
-#define GEODE_PDXAUTOSERIALIZERCLASS_POSITIONPDX_H_
-
-/*
- * 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.
- */
-
-/*
- * @brief User class for testing the put functionality for object.
- */
-
-#include <geode/GeodeCppCache.hpp>
-#include <geode/PdxSerializable.hpp>
-#include <geode/PdxWriter.hpp>
-#include <geode/PdxReader.hpp>
-#include <string>
-
-#ifdef _WIN32
-#ifdef BUILD_TESTOBJECT
-#define TESTOBJECT_EXPORT LIBEXP
-#else
-#define TESTOBJECT_EXPORT LIBIMP
-#endif
-#else
-#define TESTOBJECT_EXPORT
-#endif
-#define GFIGNORE(X) X
-#define GFEXCLUDE
-#define GFID
-#define GFARRAYSIZE(X)
-#define GFARRAYELEMSIZE(X)
-
-using namespace apache::geode::client;
-
-namespace AutoPdxTests {
-
-class GFIGNORE(TESTOBJECT_EXPORT) PositionPdx
-    : public apache::geode::client::PdxSerializable {
- private:
-  GFID int64_t avg20DaysVol;
-  GFID char* bondRating;
-  GFID double convRatio;
-  GFID char* country;
-  GFID double delta;
-  GFID int64_t industry;
-  GFID int64_t issuer;
-  GFID double mktValue;
-  GFID double qty;
-  GFID char *secId, *secLinks, *secType;
-  GFID int32_t sharesOutstanding;
-  GFID char* underlyer;
-  GFID int64_t volatility;
-
-  GFID int32_t pid;
-
- public:
-  GFEXCLUDE static int32_t cnt;
-
-  PositionPdx();
-  PositionPdx(const char* id, int32_t out);
-  // This constructor is just for some internal data validation test
-  PositionPdx(int32_t iForExactVal);
-  virtual ~PositionPdx();
-  using PdxSerializable::toData;
-  using PdxSerializable::fromData;
-  virtual void toData(PdxWriterPtr pw);
-  virtual void fromData(PdxReaderPtr pr);
-
-  CacheableStringPtr toString() const;
-
-  virtual uint32_t objectSize() const {
-    uint32_t objectSize = sizeof(PositionPdx);
-    return objectSize;
-  }
-
-  static void resetCounter() { cnt = 0; }
-
-  char* getSecId() { return secId; }
-
-  int32_t getId() { return pid; }
-
-  int32_t getSharesOutstanding() { return sharesOutstanding; }
-
-  static PdxSerializable* createDeserializable();
-
-  const char* getClassName() { return "PositionPdxType"; }
-
-  const char* getClassName() const { return "PositionPdxType"; }
-
- private:
-  void init();
-};
-
-typedef apache::geode::client::SharedPtr<PositionPdx> PositionPdxPtr;
-}  // namespace AutoPdxTests
-
-#endif  // GEODE_PDXAUTOSERIALIZERCLASS_POSITIONPDX_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/tests/cpp/security/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/cpp/security/CMakeLists.txt b/src/tests/cpp/security/CMakeLists.txt
index 45ebdfe..56828ec 100644
--- a/src/tests/cpp/security/CMakeLists.txt
+++ b/src/tests/cpp/security/CMakeLists.txt
@@ -24,7 +24,6 @@ target_link_libraries(security
     ACE
   PUBLIC
     fwk
-    pdxobject
     testobject
     crypto
     ssl

http://git-wip-us.apache.org/repos/asf/geode-native/blob/7da9d90b/src/tests/cpp/testobject/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/cpp/testobject/CMakeLists.txt b/src/tests/cpp/testobject/CMakeLists.txt
index bd78b86..5122fd6 100644
--- a/src/tests/cpp/testobject/CMakeLists.txt
+++ b/src/tests/cpp/testobject/CMakeLists.txt
@@ -25,9 +25,6 @@ elseif(UNIX)
     set(DYNAMIC_LIBRARY_PATH LD_LIBRARY_PATH=$<TARGET_LINKER_FILE_DIR:apache-geode>)
 endif()
 
-macro(add_pdxautoserializer SOURCES_VAR NAMESPACE CLASS HEADER SUFFIX CLASSNAMESTR)
-    set(${SOURCES_VAR} ${${SOURCES_VAR}} ${CMAKE_CURRENT_SOURCE_DIR}/${NAMESPACE}_${CLASS}${SUFFIX}.cpp)
-endmacro()
 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
 
 add_library(testobject SHARED ${SOURCES})
@@ -37,7 +34,6 @@ target_link_libraries(testobject
   PUBLIC 
     apache-geode
     fwk
-    pdxobject
     c++11
   PRIVATE
     ACE


[06/34] geode-native git commit: GEODE-2513 Unbrand docs section on Preserving Data

Posted by jb...@apache.org.
GEODE-2513 Unbrand docs section on Preserving Data

- Remove references to GemFire
- Fix typos
- Clarify links that leave the native-manual


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

Branch: refs/heads/feature/GEODE-2602
Commit: 8ddafe94ee758750206b1083d7a01f722cf93dea
Parents: 7836549
Author: Karen Miller <km...@pivotal.io>
Authored: Wed Mar 8 12:11:02 2017 -0800
Committer: Karen Miller <km...@pivotal.io>
Committed: Mon Mar 13 08:53:46 2017 -0700

----------------------------------------------------------------------
 .../master_middleman/source/subnavs/geode-nc-nav.erb    |  4 ++--
 .../about_native_client_users_guide.html.md.erb         |  2 +-
 .../preserving-data/client-side-config.html.md.erb      |  6 +++---
 .../config-durable-reconnect.html.md.erb                |  4 ++--
 .../preserving-data/configuring-durable-nc.html.md.erb  | 12 ++++++------
 .../preserving-data/configuring-nc-ha.html.md.erb       |  7 +++----
 .../disconnecting-from-server.html.md.erb               |  2 --
 .../preserving-data/disconnection.html.md.erb           |  2 +-
 .../durable-client-messaging-req.html.md.erb            |  4 ++--
 .../high-availability-client-server.html.md.erb         | 11 ++++-------
 .../preserving-data/preserving-data.html.md.erb         | 10 +++++-----
 .../sending-cache-ready-message.html.md.erb             |  4 ++--
 .../preserving-data/using-queue-conflation.html.md.erb  |  6 +++---
 13 files changed, 34 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/8ddafe94/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb b/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb
index 495dc2a..ef131ca 100644
--- a/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb
+++ b/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb
@@ -503,7 +503,7 @@ limitations under the License.
                                 <a href="/docs/guide-native/11/preserving-data/high-availability-client-server.html">High Availability for Client-Server Communication</a>
                                 <ul>
                                     <li>
-                                        <a href="/docs/guide-native/11/preserving-data/configuring-nc-ha.html">Configuring Native Clients for High Availability</a>
+                                        <a href="/docs/guide-native/11/preserving-data/configuring-nc-ha.html">Configuring Clients for High Availability</a>
                                     </li>
                                     <li>
                                         <a href="/docs/guide-native/11/preserving-data/sending-periodic-ack.html">Sending Periodic Acknowledgment</a>
@@ -523,7 +523,7 @@ limitations under the License.
                                         <a href="/docs/guide-native/11/preserving-data/client-side-config.html">Client-Side Configuration</a>
                                         <ul>
                                             <li>
-                                                <a href="/docs/guide-native/11/preserving-data/configuring-durable-nc.html">Configuring a Durable Native Client</a>
+                                                <a href="/docs/guide-native/11/preserving-data/configuring-durable-nc.html">Configuring a Durable Client</a>
                                             </li>
                                             <li>
                                                 <a href="/docs/guide-native/11/preserving-data/config-durable-interest-keys.html">Configuring Durable Interest in Keys</a>

http://git-wip-us.apache.org/repos/asf/geode-native/blob/8ddafe94/docs/geode-native-docs/about_native_client_users_guide.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/about_native_client_users_guide.html.md.erb b/docs/geode-native-docs/about_native_client_users_guide.html.md.erb
index 4526a9f..b83ee7a 100644
--- a/docs/geode-native-docs/about_native_client_users_guide.html.md.erb
+++ b/docs/geode-native-docs/about_native_client_users_guide.html.md.erb
@@ -51,7 +51,7 @@ This documentation provides step-by-step procedures for installation, configurat
 
 -   **[Preserving Data](preserving-data/preserving-data.html)**
 
-    A server may preserve the data queued and intended to be sent to a native client, such that the data is not discarded if communication between the server and native client is disrupted. Preservation prevents message loss, which can cause a native client to have inconsistent data. Redundant queues and a high availability server implementation may further ensure that queued data is not lost.
+    A server may preserve the data queued and intended to be sent to a client, such that the data is not discarded if communication between the server and client is disrupted. Preservation prevents message loss, which can cause a client to have inconsistent data. Redundant queues and a high availability server implementation may further ensure that queued data is not lost.
 
 -   **[Security](security/overviewsecurity.html)**
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/8ddafe94/docs/geode-native-docs/preserving-data/client-side-config.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/client-side-config.html.md.erb b/docs/geode-native-docs/preserving-data/client-side-config.html.md.erb
index cbde881..8617efd 100644
--- a/docs/geode-native-docs/preserving-data/client-side-config.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/client-side-config.html.md.erb
@@ -21,9 +21,9 @@ limitations under the License.
 
 All durable messaging configurations are performed on the client.
 
--   **[Configuring a Durable Native Client](configuring-durable-nc.html)**
+-   **[Configuring a Durable Client](configuring-durable-nc.html)**
 
-    The durable native client can be configured in the `gfcpp.properties` file, or in the `CacheFactory::set(name,             value)` call.
+    The durable client can be configured in the `gfcpp.properties` file, or in the `CacheFactory::set(name,             value)` call.
 
 -   **[Configuring Durable Interest in Keys](config-durable-interest-keys.html)**
 
@@ -31,6 +31,6 @@ All durable messaging configurations are performed on the client.
 
 -   **[Configuring Durable Client Reconnection](config-durable-reconnect.html)**
 
-    You can configure the durable native client to obtain an approximate count of pending events upon durable client reconnection. Based on the returned number, you can determine whether to proceed and receive the pending events or to close the cache.
+    You can configure the durable client to obtain an approximate count of pending events upon durable client reconnection. Based on the returned number, you can determine whether to proceed and receive the pending events or to close the cache.
 
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/8ddafe94/docs/geode-native-docs/preserving-data/config-durable-reconnect.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/config-durable-reconnect.html.md.erb b/docs/geode-native-docs/preserving-data/config-durable-reconnect.html.md.erb
index b179c44..2f6815e 100644
--- a/docs/geode-native-docs/preserving-data/config-durable-reconnect.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/config-durable-reconnect.html.md.erb
@@ -19,9 +19,9 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-You can configure the durable native client to obtain an approximate count of pending events upon durable client reconnection. Based on the returned number, you can determine whether to proceed and receive the pending events or to close the cache.
+You can configure a durable client to obtain an approximate count of pending events upon durable client reconnection. Based on the returned number, you can determine whether to proceed and receive the pending events or to close the cache.
 
-Use the `getPendingEventCount` (C++ API) and the `PendingEventCount` (C\# .NET API) property to detect whether the previously registered subscription queue is available upon durable client reconnection and the count of pending events in the queue. Based on the returned results, you can then decide whether to receive the remaining events or close the cache if the number is too large.
+Use the `getPendingEventCount` (C++ API) and the `PendingEventCount` (.NET API) property to detect whether the previously registered subscription queue is available upon durable client reconnection and the count of pending events in the queue. Based on the returned results, you can then decide whether to receive the remaining events or close the cache if the number is too large.
 
 For example, consider this code fragment for a client with only the default pool created:
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/8ddafe94/docs/geode-native-docs/preserving-data/configuring-durable-nc.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/configuring-durable-nc.html.md.erb b/docs/geode-native-docs/preserving-data/configuring-durable-nc.html.md.erb
index 3f42c36..a39897c 100644
--- a/docs/geode-native-docs/preserving-data/configuring-durable-nc.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/configuring-durable-nc.html.md.erb
@@ -1,5 +1,5 @@
 ---
-title:  Configuring a Durable Native Client
+title:  Configuring a Durable Client
 ---
 
 <!--
@@ -19,19 +19,19 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-The durable native client can be configured in the `gfcpp.properties` file, or in the `CacheFactory::set(name,             value)` call.
+The durable client can be configured in the `gfcpp.properties` file, or in the `CacheFactory::set(name,             value)` call.
 
--   **Durable client ID**\u2014You indicate that the client is durable by giving it a `durable-client-ID`. The servers use this ID to identify the client. For a non-durable client, the `durable-client-ID` is an empty string. The ID can be any number that is unique among the clients attached to servers in the same distributed system.
+-   **Durable client ID**\u2014Indicate that the client is durable by giving it a `durable-client-ID`. The servers use this ID to identify the client. For a non-durable client, the `durable-client-ID` is an empty string. The ID can be any number that is unique among the clients attached to servers in the same distributed system.
 
 -   **Durable timeout**\u2014The `durable-timeout` setting specifies how long this client\u2019s servers should wait after the client disconnects before terminating its message queue. During that time, the servers consider the client alive and continue to accumulate messages for it. The default is 300 seconds.
 
 The `durable-timeout` setting is a tuning parameter. When setting the timeout, take into account the normal activity of your application, the average size of your messages, and the level of risk you can handle. Assuming that no messages are being removed from the queue, how long can the application run before the queue reaches the maximum message count? In addition, how long can it run before the queued messages consume all the memory on the client host? How serious is each of those failures to your operation?
 
-To assist with tuning, Geode provides statistics that track message queues for durable clients through the disconnect and reconnect cycles. For statistics documentation, see [Statistics](geodeman/managing/statistics/chapter_overview.html).
+To assist with tuning, Geode statistics track message queues for durable clients through the disconnect and reconnect cycles.
 
-When the queue is full, it blocks further operations that add messages until the queue size drops to an acceptable level. The action to take is specified on the server. For details on configuring the queue, see [Implementing Durable Client/Server Messaging](geodeman/developing/events/implementing_durable_client_server_messaging.html).
+When the queue is full, it blocks further operations that add messages until the queue size drops to an acceptable level. Server configuration sets the action to take. See details on server configuration of the queue in the server documentation section [Implementing Durable Client/Server Messaging](geodeman/developing/events/implementing_durable_client_server_messaging.html).
 
-## Configuring a Durable Native Client Using gfcpp.properties
+## Configuring a Durable Client Using gfcpp.properties
 
 The following example shows `gfcpp.properties` settings to make the client durable and set the durable timeout to 200seconds.
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/8ddafe94/docs/geode-native-docs/preserving-data/configuring-nc-ha.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/configuring-nc-ha.html.md.erb b/docs/geode-native-docs/preserving-data/configuring-nc-ha.html.md.erb
index c6ee0eb..4eceeba 100644
--- a/docs/geode-native-docs/preserving-data/configuring-nc-ha.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/configuring-nc-ha.html.md.erb
@@ -1,5 +1,5 @@
 ---
-title:  Configuring Native Clients for High Availability
+title:  Configuring Clients for High Availability
 ---
 
 <!--
@@ -19,12 +19,11 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-Configure high availability by setting the pool attribute `subscription-redundancy` to the number of copies you want maintained.
+Configure high availability by setting the pool attribute `subscription-redundancy` to the number of copies to be maintained.
 
 A client maintains its queue redundancy level at the time of a primary server failure by connecting to additional secondary servers.
 
-<a id="concept_7CEFF513CED14397A385ED88F3287AF1__section_BC1693F33FA1448296C00220962EDDEE"></a>
-Native clients can specify the number of secondary servers where the client registers interest and maintains subscription channels, in addition to the subscription channel with the primary server. The secondary servers maintain redundant update queues for the client. If the primary server fails, a secondary becomes a primary to provide uninterrupted messaging to the client. If possible, another secondary is then initialized so the total number of secondaries is not reduced by the failover.
+Clients can specify the number of secondary servers where the client registers interest and maintains subscription channels, in addition to the subscription channel with the primary server. The secondary servers maintain redundant update queues for the client. If the primary server fails, a secondary becomes a primary to provide uninterrupted messaging to the client. If possible, another secondary is then initialized so the total number of secondaries is not reduced by the failover.
 
 ## Setting the Server Redundancy Level in cache.xml
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/8ddafe94/docs/geode-native-docs/preserving-data/disconnecting-from-server.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/disconnecting-from-server.html.md.erb b/docs/geode-native-docs/preserving-data/disconnecting-from-server.html.md.erb
index 676b656..a480ca8 100644
--- a/docs/geode-native-docs/preserving-data/disconnecting-from-server.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/disconnecting-from-server.html.md.erb
@@ -25,8 +25,6 @@ For this purpose, use the version of `Cache::close` with the boolean `keepalive`
 
 Only the resources and data related to the session are removed, such as port numbers and non-durable subscriptions. If the setting is false, the servers do the same cleanup that they would do for a nondurable client.
 
-## Durable Client Disconnect With Queues Maintained
-
 ``` pre
 // Close the Cache and disconnect with keepalive=true.
 // Server will queue events for durable registrations and CQs

http://git-wip-us.apache.org/repos/asf/geode-native/blob/8ddafe94/docs/geode-native-docs/preserving-data/disconnection.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/disconnection.html.md.erb b/docs/geode-native-docs/preserving-data/disconnection.html.md.erb
index 37d6b7d..be85e5a 100644
--- a/docs/geode-native-docs/preserving-data/disconnection.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/disconnection.html.md.erb
@@ -23,7 +23,7 @@ While the client and servers are disconnected, their operation varies depending
 
 ## <a id="concept_915EAD135DD942F28A38513097ACB1F1__section_6AB8F4B8993F4EF9B32A93A100F07BEC" class="no-quick-link"></a>Normal disconnect
 
-When a durable client disconnects normally, the `Cache.close` request states whether to maintain the client's message queue and durable subscriptions. The servers stop sending messages to the client and release its connection. See[Disconnecting From the Server](disconnecting-from-server.html#concept_3A9AC62F96FA44DBBB5CCBFD3EA19B56) for more information.
+When a durable client disconnects normally, the `Cache.close` request states whether to maintain the client's message queue and durable subscriptions. The servers stop sending messages to the client and release its connection. See [Disconnecting From the Server](disconnecting-from-server.html#concept_3A9AC62F96FA44DBBB5CCBFD3EA19B56) for more information.
 
 If requested, the servers maintain the queues and durable interest list until the client reconnects or times out. The non-durable interest list is discarded. The servers continue to queue up incoming messages for entries on the durable interest list. All messages that were in the queue when the client disconnected remain in the queue, including messages for entries on the non-durable list.
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/8ddafe94/docs/geode-native-docs/preserving-data/durable-client-messaging-req.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/durable-client-messaging-req.html.md.erb b/docs/geode-native-docs/preserving-data/durable-client-messaging-req.html.md.erb
index 4ce7165..a03e054 100644
--- a/docs/geode-native-docs/preserving-data/durable-client-messaging-req.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/durable-client-messaging-req.html.md.erb
@@ -21,7 +21,7 @@ limitations under the License.
 
 The messaging queues used for durable messaging are the same regular messaging queues used for basic server-to-client messaging, with additional requirements.
 
-See [Implementing Durable Client/Server Messaging](geodeman/developing/events/implementing_durable_client_server_messaging.html) for requirements, options, and functionality of messaging queues. If you are using highly available servers, see [High Availability for Client-Server Communication](high-availability-client-server.html#concept_F7A143F51EEA46B28AC612DEB7849D99)for additional requirements.
+See the server documentation at [Implementing Durable Client/Server Messaging](geodeman/developing/events/implementing_durable_client_server_messaging.html) for requirements, options, and functionality of messaging queues. If you are using highly available servers, see [High Availability for Client-Server Communication](high-availability-client-server.html#concept_F7A143F51EEA46B28AC612DEB7849D99) for additional requirements.
 
 For durable client messaging, you also need the following:
 
@@ -32,5 +32,5 @@ For durable client messaging, you also need the following:
 -   **Durable interest registration**. A durable client\u2019s interest registrations specify whether its interest in a key is durable. If it is, the servers continue queuing messages for that key while the client is disconnected.
 -   **Reconnection conditions.** You can program the durable client to detect whether the previously registered subscription queue is available upon reconnection and determine an approximate count of pending events in the queue. Based on the results, you can then decide whether to receive the remaining events (`Cache.readyForEvents`) or close the cache if the number is too large.
 -   **Cache ready message**. When it is ready to receive the stored messages, a durable client must call `Cache.readyForEvents` to send a cache ready message to the server.
--   **Disconnect keepalive specification**. When a durable client disconnects normally it must tell the server whether to maintain the message queue or delete it.
+-   **Disconnect keepalive specification**. When a durable client disconnects normally, the client must tell the server whether to maintain the message queue or delete it.
 -   **Durable client callback method**. If you use cache listeners on the durable clients, you have the option to implement the `afterRegionLive` callback method. This callback is invoked after the durable client connects to its servers, when it has received all of its stored messages and replayed the events.

http://git-wip-us.apache.org/repos/asf/geode-native/blob/8ddafe94/docs/geode-native-docs/preserving-data/high-availability-client-server.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/high-availability-client-server.html.md.erb b/docs/geode-native-docs/preserving-data/high-availability-client-server.html.md.erb
index cfc44f8..4995022 100644
--- a/docs/geode-native-docs/preserving-data/high-availability-client-server.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/high-availability-client-server.html.md.erb
@@ -19,16 +19,13 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-The Geode native client provides reliable event messaging from cache server to client to prevent data loss during server failover operations. High availability is implemented in the cache server and is configured in the native client.
+The client provides reliable event messaging from cache server to client to prevent data loss during server failover operations. High availability is implemented in the cache server and is configured in the client.
 
-See [Configuring Highly Available Servers](geodeman/developing/events/configuring_highly_available_servers.html) for details about configuring a Java cache server for high availability.
+See server documentation at [Configuring Highly Available Servers](geodeman/developing/events/configuring_highly_available_servers.html) for details about configuring a server for high availability.
 
-**Note:**
-High availability functions the same whether the region is partitioned or not. See [Partitioned Regions](geodeman/developing/partitioned_regions/chapter_overview.html) for information about partitioned regions.
+-   **[Configuring Clients for High Availability](configuring-nc-ha.html)**
 
--   **[Configuring Native Clients for High Availability](configuring-nc-ha.html)**
-
-    Configure high availability by setting the pool attribute `subscription-redundancy` to the number of copies you want maintained.
+    Configure high availability by setting the pool attribute `subscription-redundancy` to the number of copies maintained.
 
 -   **[Sending Periodic Acknowledgment](sending-periodic-ack.html)**
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/8ddafe94/docs/geode-native-docs/preserving-data/preserving-data.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/preserving-data.html.md.erb b/docs/geode-native-docs/preserving-data/preserving-data.html.md.erb
index a45b5d2..3792eab 100644
--- a/docs/geode-native-docs/preserving-data/preserving-data.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/preserving-data.html.md.erb
@@ -19,20 +19,20 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-A server may preserve the data queued and intended to be sent to a native client, such that the data is not discarded if communication between the server and native client is disrupted. Preservation prevents message loss, which can cause a native client to have inconsistent data. Redundant queues and a high availability server implementation may further ensure that queued data is not lost.
+A server may preserve the data queued and intended to be sent to a client, such that the data is not discarded if communication between the server and client is disrupted. Preservation prevents message loss, which can cause a client to have inconsistent data. Redundant queues and a high availability server implementation may further ensure that queued data is not lost.
 
-There is a tradeoff between the quantity of data that a server must queue and the amount of time that the server maintains and continues to queue data intended for a native client that is not communicating with the distributed system. Client configuration specifies the amount of time that the server is to continue queueing messages. High availability permits a secondary server to assume the role of a primary server with respect to queued data in the event that the primary server no longer functions. Designation of primary and secondary servers, as well as the number of redundant copies of the queue are configurable.
+There is a tradeoff between the quantity of data that a server must queue and the amount of time that the server maintains and continues to queue data intended for a client that is not communicating with the distributed system. Client configuration specifies the amount of time that the server is to continue queueing messages. High availability permits a secondary server to assume the role of a primary server with respect to queued data in the event that the primary server no longer functions. Designation of primary and secondary servers, as well as the number of redundant copies of the queue are configurable.
 
 -   **[High Availability for Client-Server Communication](high-availability-client-server.html)**
 
-    The Geode native client provides reliable event messaging from cache server to client to prevent data loss during server failover operations. High availability is implemented in the cache server and is configured in the native client.
+    The client provides reliable event messaging from cache server to client to prevent data loss during server failover operations. High availability is implemented in the cache server and is configured in the client.
 
 -   **[Enabling Queue Conflation to Improve Update Performance](using-queue-conflation.html)**
 
-    Conflation of entry update messages can reduce the number of update messages a native client receives, thereby increasing performance. The native client receives only the most recent update for a particular entry key.
+    Conflation of entry update messages can reduce the number of update messages a client receives, thereby increasing performance. The client receives only the most recent update for a particular entry key.
 
 -   **[Durable Client Messaging](durable-client-messaging.html)**
 
-    You can configure the redundancy level for client queues that are stored on cache servers. This ensures that the client will not lose messages if it loses the connection to its primary server.
+    Configure the redundancy level for client queues that are stored on cache servers. This ensures that the client will not lose messages if it loses the connection to its primary server.
 
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/8ddafe94/docs/geode-native-docs/preserving-data/sending-cache-ready-message.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/sending-cache-ready-message.html.md.erb b/docs/geode-native-docs/preserving-data/sending-cache-ready-message.html.md.erb
index dae32d8..14b6e94 100644
--- a/docs/geode-native-docs/preserving-data/sending-cache-ready-message.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/sending-cache-ready-message.html.md.erb
@@ -26,8 +26,8 @@ After a durable client connects and initializes its cache, regions, cache listen
 The following example shows how to call `readyForEvents`.
 
 ``` pre
-//Send ready for event message to server(only for durable clients).
-//Server will send queued events to client after receiving this.
+// Send ready for event message to server (only for durable clients).
+// Server will send queued events to client after receiving this.
 cachePtr->readyForEvents();
 ```
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/8ddafe94/docs/geode-native-docs/preserving-data/using-queue-conflation.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/using-queue-conflation.html.md.erb b/docs/geode-native-docs/preserving-data/using-queue-conflation.html.md.erb
index df678c5..a8a42cc 100644
--- a/docs/geode-native-docs/preserving-data/using-queue-conflation.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/using-queue-conflation.html.md.erb
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-Conflation of entry update messages can reduce the number of update messages a native client receives, thereby increasing performance. The native client receives only the most recent update for a particular entry key.
+Conflation of entry update messages can reduce the number of update messages a client receives, thereby increasing performance. The client receives only the most recent update for a particular entry key.
 
 Conflation is enabled for a cache server region, so all clients receiving updates for a particular region benefit from the conflation. To enable conflation, set the cache server\u2019s `enable-subscription-conflation` region attribute to `true`. This region attribute is `false` by default.
 
@@ -27,11 +27,11 @@ The queue managment code conflates entry updates as part of the enqueue operatio
 
 Only entry `update` messages in a cache server region with `distributed-no-ack` scope are conflated. Region operations and entry operations other than updates are not conflated.
 
-For more information, see [Conflate the Server Subscription Queue](geodeman/developing/events/conflate_server_subscription_queue.html).
+For more information, see the server documentation at [Conflate the Server Subscription Queue](geodeman/developing/events/conflate_server_subscription_queue.html).
 
 ## <a id="concept_AEFA04AF9ABD42C0A37ED31806596D24__section_BE506A32A8E44073B197B03AC5232C01" class="no-quick-link"></a>Overriding Queue Conflation Per-Client
 
-Override conflation on a per-client basis by setting the conflate-events property in the native client\u2019s `gfcpp.properties` file.
+Override conflation on a per-client basis by setting the conflate-events property in the client\u2019s `gfcpp.properties` file.
 
 Valid settings are:
 


[26/34] geode-native git commit: GEODE-2494: Replace global statics with class scoped statics.

Posted by jb...@apache.org.
GEODE-2494: Replace global statics with class scoped statics.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 3dd36d608a27696bba28f7b1dde6d8453f6217e2
Parents: 4dd2335
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Mon Feb 27 18:09:46 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:23 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/CqQueryVsdStats.cpp   | 5 +----
 src/cppcache/src/CqQueryVsdStats.hpp   | 2 ++
 src/cppcache/src/CqServiceVsdStats.cpp | 6 +-----
 src/cppcache/src/CqServiceVsdStats.hpp | 2 ++
 src/cppcache/src/LRUList.hpp           | 9 ++++-----
 src/cppcache/src/RegionStats.cpp       | 3 ---
 src/cppcache/src/RegionStats.hpp       | 2 ++
 7 files changed, 12 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/3dd36d60/src/cppcache/src/CqQueryVsdStats.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CqQueryVsdStats.cpp b/src/cppcache/src/CqQueryVsdStats.cpp
index ceb40a6..f24208a 100644
--- a/src/cppcache/src/CqQueryVsdStats.cpp
+++ b/src/cppcache/src/CqQueryVsdStats.cpp
@@ -26,9 +26,6 @@
 
 #include "util/concurrent/spinlock_mutex.hpp"
 
-const char* cqStatsName = "CqQueryStatistics";
-const char* cqStatsDesc = "Statistics for this cq query";
-
 ////////////////////////////////////////////////////////////////////////////////
 
 namespace apache {
@@ -65,7 +62,7 @@ StatisticsType* CqQueryStatType::getStatType() {
         "events", "The total number of events for this cq query", "entries",
         largerIsBetter);
 
-    statsType = factory->createType(cqStatsName, cqStatsDesc, m_stats, 4);
+    statsType = factory->createType(statsName, statsDesc, m_stats, 4);
 
     m_numInsertsId = statsType->nameToId("inserts");
     m_numUpdatesId = statsType->nameToId("updates");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/3dd36d60/src/cppcache/src/CqQueryVsdStats.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CqQueryVsdStats.hpp b/src/cppcache/src/CqQueryVsdStats.hpp
index 3cc5672..fdfae5a 100644
--- a/src/cppcache/src/CqQueryVsdStats.hpp
+++ b/src/cppcache/src/CqQueryVsdStats.hpp
@@ -79,6 +79,8 @@ class CPPCACHE_EXPORT CqQueryVsdStats : public CqStatistics {
 class CqQueryStatType {
  private:
   static spinlock_mutex m_statTypeLock;
+  static constexpr const char* statsName = "CqQueryStatistics";
+  static constexpr const char* statsDesc = "Statistics for this cq query";
 
  public:
   static CqQueryStatType& getInstance();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/3dd36d60/src/cppcache/src/CqServiceVsdStats.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CqServiceVsdStats.cpp b/src/cppcache/src/CqServiceVsdStats.cpp
index 08f331b..562224f 100644
--- a/src/cppcache/src/CqServiceVsdStats.cpp
+++ b/src/cppcache/src/CqServiceVsdStats.cpp
@@ -26,9 +26,6 @@
 
 #include "util/concurrent/spinlock_mutex.hpp"
 
-const char* cqServiceStatsName = "CqServiceStatistics";
-const char* cqServiceStatsDesc = "Statistics for this cq Service";
-
 ////////////////////////////////////////////////////////////////////////////////
 
 namespace apache {
@@ -69,8 +66,7 @@ StatisticsType* CqServiceStatType::getStatType() {
         "The total number of Cqs on the client for this cq Service", "entries",
         largerIsBetter);
 
-    statsType =
-        factory->createType(cqServiceStatsName, cqServiceStatsDesc, m_stats, 5);
+    statsType = factory->createType(statsName, statsDesc, m_stats, 5);
 
     m_numCqsActiveId = statsType->nameToId("CqsActive");
     m_numCqsCreatedId = statsType->nameToId("CqsCreated");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/3dd36d60/src/cppcache/src/CqServiceVsdStats.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CqServiceVsdStats.hpp b/src/cppcache/src/CqServiceVsdStats.hpp
index 710dfdb..9946e2b 100644
--- a/src/cppcache/src/CqServiceVsdStats.hpp
+++ b/src/cppcache/src/CqServiceVsdStats.hpp
@@ -113,6 +113,8 @@ class CPPCACHE_EXPORT CqServiceVsdStats : public CqServiceStatistics {
 class CqServiceStatType {
  private:
   static spinlock_mutex m_statTypeLock;
+  static constexpr const char* statsName = "CqServiceStatistics";
+  static constexpr const char* statsDesc = "Statistics for this cq Service";
 
  public:
   static CqServiceStatType& getInstance();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/3dd36d60/src/cppcache/src/LRUList.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUList.hpp b/src/cppcache/src/LRUList.hpp
index fc18fcd..0364ac6 100644
--- a/src/cppcache/src/LRUList.hpp
+++ b/src/cppcache/src/LRUList.hpp
@@ -31,11 +31,6 @@ namespace apache {
 namespace geode {
 namespace client {
 
-// Bit mask for recently used
-#define RECENTLY_USED_BITS 1u
-// Bit mask for evicted
-#define EVICTED_BITS 2u
-
 /**
  * @brief This class encapsulates LRU specific properties for a LRUList node.
  */
@@ -72,6 +67,10 @@ class CPPCACHE_EXPORT LRUEntryProperties {
  private:
   std::atomic<uint32_t> m_bits;
   void* m_persistenceInfo;
+  // Bit mask for recently used
+  static constexpr uint32_t RECENTLY_USED_BITS = 1u;
+  // Bit mask for evicted
+  static constexpr uint32_t EVICTED_BITS = 2u;
 };
 
 using util::concurrent::spinlock_mutex;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/3dd36d60/src/cppcache/src/RegionStats.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/RegionStats.cpp b/src/cppcache/src/RegionStats.cpp
index 285cf76..677ec7c 100644
--- a/src/cppcache/src/RegionStats.cpp
+++ b/src/cppcache/src/RegionStats.cpp
@@ -27,9 +27,6 @@
 
 #include "util/concurrent/spinlock_mutex.hpp"
 
-const char* statsName = "RegionStatistics";
-const char* statsDesc = "Statistics for this region";
-
 ////////////////////////////////////////////////////////////////////////////////
 
 namespace apache {

http://git-wip-us.apache.org/repos/asf/geode-native/blob/3dd36d60/src/cppcache/src/RegionStats.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/RegionStats.hpp b/src/cppcache/src/RegionStats.hpp
index 1f72d77..30ad7df 100644
--- a/src/cppcache/src/RegionStats.hpp
+++ b/src/cppcache/src/RegionStats.hpp
@@ -132,6 +132,8 @@ class RegionStatType {
   static RegionStatType* single;
   static spinlock_mutex m_singletonLock;
   static spinlock_mutex m_statTypeLock;
+  static constexpr const char* statsName = "RegionStatistics";
+  static constexpr const char* statsDesc = "Statistics for this region";
 
  public:
   static RegionStatType* getInstance();


[07/34] geode-native git commit: GEODE-2513 Rename gfcpp.properties file to geode.properties - updated references, moved and renamed files This closes #52

Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/setting-properties/propfile_attributes.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/setting-properties/propfile_attributes.html.md.erb b/docs/geode-native-docs/setting-properties/propfile_attributes.html.md.erb
new file mode 100644
index 0000000..6e2d5d3
--- /dev/null
+++ b/docs/geode-native-docs/setting-properties/propfile_attributes.html.md.erb
@@ -0,0 +1,278 @@
+---
+title:  Attributes in the Properties File
+---
+
+<!--
+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.
+-->
+
+A variety of `geode.properties` settings can be used when a client connects to a distributed system.
+
+The following settings can be configured:
+
+-   **[General Properties](#attributes-gfcpp__table_21004C9E93294F03BE3469C13EA33262)** Basic information for the process, such as cache creation parameters.
+-   **[Logging Properties](#attributes-gfcpp__table_D42627049FD6432494BDE5170AF1BCCF)** How and where to log system messages.
+-   **[Statistics Archiving Properties](#attributes-gfcpp__table_E1A0EDBA67CD41319E1E5FD0A0BB2723)** How to collect and archive statistics information.
+-   **[Durable Client Properties](#attributes-gfcpp__table_BA6DAF27947B4A9488787E6BDCFC15B9)** Information about the durable clients connected to the system.
+-   **[Security Properties](#attributes-gfcpp__table_B3A8E9EB44A94557A97BB700E2BA1EF1)** Information about various security parameters.
+
+## <a id="attributes-gfcpp__section_655789BCC46642789F91CDA8AE03CD9B" class="no-quick-link"></a>Attribute Definitions
+
+The following tables list attributes that can be stored in the `geode.properties` file to be read by a client.
+
+For the system properties that relate to high availability, see [Sending Periodic Acknowledgement](../preserving-data/sending-periodic-ack.html#concept_868B8082463846DE9F35BBEA56105C82). For a list of security-related system properties and their descriptions, see the table [System Properties for Client Authentication and Authorization](../security/security-systemprops.html#security__table_92A6A66523764199A19BCD66BA189921).
+
+<a id="attributes-gfcpp__table_21004C9E93294F03BE3469C13EA33262" class="no-quick-link"></a>
+
+<table>
+<caption><span class="tablecap">Table 1. Attributes in geode.properties\u2014General Properties</span></caption>
+<colgroup>
+<col width="33%" />
+<col width="33%" />
+<col width="34%" />
+</colgroup>
+<thead>
+<tr class="header">
+<th>geode.properties Attribute</th>
+<th>Description</th>
+<th>Default</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td>appdomain-enabled</td>
+<td>If <code class="ph codeph">true</code>, allows client to work when multiple .NET appdomains are in use.</td>
+<td>false</td>
+</tr>
+<tr class="even">
+<td>cache-xml-file</td>
+<td>Name and path of the file whose contents are used by default to initialize a cache if one is created. If not specified, the client starts with an empty cache, which is populated at run time.
+<p>See <a href="../cache-init-file/chapter-overview.html#chapter-overview">Cache Initialization File</a> for more information on the cache initialization file.</p></td>
+<td>no default</td>
+</tr>
+<tr class="odd">
+<td>heap-lru-delta</td>
+<td>When heap LRU is triggered, this is the amount that gets added to the percentage that is above the <code class="ph codeph">heap-lru-limit</code> amount. LRU continues until the memory usage is below <code class="ph codeph">heap-lru-limit</code> minus this percentage. This property is only used if <code class="ph codeph">heap-lru-limit</code> is greater than 0 .</td>
+<td>10</td>
+</tr>
+<tr class="even">
+<td>heap-lru-limit</td>
+<td>Maximum amount of memory, in megabytes, used by the cache for all regions. If this limit is exceeded by <code class="ph codeph">heap-lru-delta</code> percent, LRU reduces the memory footprint as necessary. If not specified, or set to 0, memory usage is governed by each region's LRU entries limit, if any.</td>
+<td>0</td>
+</tr>
+<tr class="odd">
+<td>conflate-events</td>
+<td>Client side conflation setting, which is sent to the server.</td>
+<td>server</td>
+</tr>
+<tr class="even">
+<td>connect-timeout</td>
+<td>Amount of time (in seconds) to wait for a response after a socket connection attempt.</td>
+<td>59</td>
+</tr>
+<tr class="odd">
+<td>connection-pool-size</td>
+<td>Number of connections per endpoint</td>
+<td>5</td>
+</tr>
+<tr class="even">
+<td>crash-dump-enabled</td>
+<td>Whether crash dump generation for unhandled fatal errors is enabled. True is enabled, false otherwise.</td>
+<td>true</td>
+</tr>
+<tr class="odd">
+<td>disable-chunk-handler-thread</td>
+<td>When set to false, each application thread processes its own response. If set to true, the chunk-handler-thread processes the response for each application thread.</td>
+<td>false</td>
+</tr>
+<tr class="even">
+<td>disable-shuffling-of-endpoints</td>
+<td>If true, prevents server endpoints that are configured in pools from being shuffled before use.</td>
+<td>false</td>
+</tr>
+<tr class="odd">
+<td>grid-client</td>
+<td>If true, the client does not start various internal threads, so that startup and shutdown time is reduced.</td>
+<td>false</td>
+</tr>
+<tr class="even">
+<td>max-fe-threads</td>
+<td>Thread pool size for parallel function execution. An example of this is the GetAll operations.</td>
+<td>2 * number of CPU cores</td>
+</tr>
+<tr class="odd">
+<td>max-socket-buffer-size</td>
+<td>Maximum size of the socket buffers, in bytes, that the client will try to set for client-server connections.</td>
+<td>65 * 1024</td>
+</tr>
+<tr class="even">
+<td>notify-ack-interval</td>
+<td>Interval, in seconds, in which client sends acknowledgments for subscription notifications.</td>
+<td>1</td>
+</tr>
+<tr class="odd">
+<td>notify-dupcheck-life</td>
+<td>Amount of time, in seconds, the client tracks subscription notifications before dropping the duplicates.</td>
+<td>300</td>
+</tr>
+<tr class="even">
+<td>ping-interval</td>
+<td>Interval, in seconds, between communication attempts with the server to show the client is alive. Pings are only sent when the <code class="ph codeph">ping-interval</code> elapses between normal client messages. This must be set lower than the server's <code class="ph codeph">maximum-time-between-pings</code>.</td>
+<td>10</td>
+</tr>
+<tr class="odd">
+<td>redundancy-monitor-interval</td>
+<td>Interval, in seconds, at which the subscription HA maintenance thread checks for the configured redundancy of subscription servers.</td>
+<td>10</td>
+</tr>
+<tr class="even">
+<td>stacktrace-enabled</td>
+<td>If <code class="ph codeph">true</code>, the exception classes capture a stack trace that can be printed with their <code class="ph codeph">printStackTrace</code> function. If false, the function prints a message that the trace is unavailable.</td>
+<td>false</td>
+</tr>
+<tr class="odd">
+<td>tombstone-timeout</td>
+<td>Time in milliseconds used to timeout tombstone entries when region consistency checking is enabled.
+</td>
+<td>480000</td>
+</tr>
+</tbody>
+</table>
+
+
+<a id="attributes-gfcpp__table_D42627049FD6432494BDE5170AF1BCCF" class="no-quick-link"></a>
+
+<table>
+<caption><span class="tablecap">Table 2. Attributes in geode.properties\u2014Logging Properties</span></caption>
+<colgroup>
+<col width="34%" />
+<col width="33%" />
+<col width="33%" />
+</colgroup>
+<thead>
+<tr class="header">
+<th>geode.properties Attribute</th>
+<th>Description</th>
+<th>Default</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td>log-disk-space-limit</td>
+<td>Maximum amount of disk space, in megabytes, allowed for all log files, current, and rolled. If set to 0, the space is unlimited.</td>
+<td>0</td>
+</tr>
+<tr class="even">
+<td>log-file</td>
+<td>Name and full path of the file where a running client writes log messages. If not specified, logging goes to <code class="ph codeph">stdout</code>.</td>
+<td>no default file</td>
+</tr>
+<tr class="odd">
+<td>log-file-size-limit</td>
+<td>Maximum size, in megabytes, of a single log file. Once this limit is exceeded, a new log file is created and the current log file becomes inactive. If set to 0, the file size is unlimited.</td>
+<td>0</td>
+</tr>
+<tr class="even">
+<td>log-level</td>
+<td>Controls the types of messages that are written to the application's log. These are the levels, in descending order of severity and the types of message they provide:
+<ul>
+<li><strong>Error</strong> (highest severity) is a serious failure that will probably prevent program execution.</li>
+<li><strong>Warning</strong> is a potential problem in the system.</li>
+<li><strong>Info</strong> is an informational message of interest to the end user and system administrator.</li>
+<li><strong>Config</strong> is a static configuration message, often used to debug problems with particular configurations.</li>
+<li><strong>Fine, Finer, Finest, and Debug</strong> provide tracing information. Only use these with guidance from technical support.</li>
+</ul>
+<p>Enabling logging at any level enables logging for all higher levels.</p></td>
+<td>config</td>
+</tr>
+</tbody>
+</table>
+
+
+<a id="attributes-gfcpp__table_E1A0EDBA67CD41319E1E5FD0A0BB2723" class="no-quick-link"></a>
+
+<table>
+<caption><span class="tablecap">Table 3. Attributes in geode.properties\u2014Statistics Archiving Properties</span></caption>
+<colgroup>
+<col width="33%" />
+<col width="33%" />
+<col width="34%" />
+</colgroup>
+<thead>
+<tr class="header">
+<th>geode.properties Attribute</th>
+<th>Description</th>
+<th>Default</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td>statistic-sampling-enabled</td>
+<td>Controls whether the process creates a statistic archive file.</td>
+<td>true</td>
+</tr>
+<tr class="even">
+<td>statistic-archive-file</td>
+<td>Name and full path of the file where a running system member writes archives statistics. If <code class="ph codeph">archive-disk-space-limit</code> is not set, the client appends the process ID to the configured file name, like <code class="ph codeph">statArchive-PID.gfs</code>. If the space limit is set, the process ID is not appended but each rolled file name is renamed to statArchive-ID.gfs, where ID is the rolled number of the file.</td>
+<td>./statArchive.gfs</td>
+</tr>
+<tr class="odd">
+<td>archive-disk-space-limit</td>
+<td>Maximum amount of disk space, in megabytes, allowed for all archive files, current, and rolled. If set to 0, the space is unlimited.</td>
+<td>0</td>
+</tr>
+<tr class="even">
+<td>archive-file-size-limit</td>
+<td>Maximum size, in bytes, of a single statistic archive file. Once this limit is exceeded, a new statistic archive file is created and the current archive file becomes inactive. If set to 0, the file size is unlimited.</td>
+<td>0</td>
+</tr>
+<tr class="odd">
+<td>statistic-sample-rate</td>
+<td>Rate, in seconds, that statistics are sampled. Operating system statistics are updated only when a sample is taken. If statistic archival is enabled, then these samples are written to the archive.
+<p>Lowering the sample rate for statistics reduces system resource use while still providing some statistics for system tuning and failure analysis.</p>
+</td>
+<td>1</td>
+</tr>
+<tr class="even">
+<td>enable-time-statistics</td>
+<td>Enables time-based statistics for the distributed system and caching. For performance reasons, time-based statistics are disabled by default. See <a href="../system-statistics/chapter_overview.html#concept_3BE5237AF2D34371883453E6A9474A79">System Statistics</a>. </td>
+<td>false</td>
+</tr>
+</tbody>
+</table>
+
+
+### <a id="attributes-gfcpp__table_BA6DAF27947B4A9488787E6BDCFC15B9" class="no-quick-link"></a>Table 4. Attributes in geode.properties\u2014Durable Client Properties
+
+| geode.properties Attribute | Description                                                                                                                                                                                                                                                                    | Default |
+|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
+| auto-ready-for-events      | Whether client subscriptions automatically receive events when declaratively configured via XML. If set to `false`, event startup is not automatic and you need to call the `Cache.ReadyForEvents()` method API after subscriptions for the server to start delivering events. | true    |
+| durable-client-id          | Identifier to specify if you want the client to be durable.                                                                                                                                                                                                                    | empty   |
+| durable-timeout            | Time, in seconds, a durable client's subscription is maintained when it is not connected to the server before being dropped.                                                                                                                                                   | 300     |
+
+
+### <a id="attributes-gfcpp__table_B3A8E9EB44A94557A97BB700E2BA1EF1" class="no-quick-link"></a>Table 5. Attributes in geode.properties\u2014Security Properties
+
+| geode.properties Attribute   | Description                                                          | Default |
+|------------------------------|----------------------------------------------------------------------|---------|
+| security-client-dhalgo       | Diffie-Hellman secret key algorithm.                                 | null    |
+| security-client-kspath       | keystore (.pem file ) path.                                          | null    |
+| security-client-auth-factory | Factory method for the security `AuthInitialize` module.             | empty   |
+| security-client-auth-library | Path to the client security library for the `AuthInitialize` module. | empty   |
+| ssl-keystore-password        | Keystore password.                                                   | null    |
+
+
+

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/setting-properties/propfile_overriding.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/setting-properties/propfile_overriding.html.md.erb b/docs/geode-native-docs/setting-properties/propfile_overriding.html.md.erb
new file mode 100644
index 0000000..63a9eff
--- /dev/null
+++ b/docs/geode-native-docs/setting-properties/propfile_overriding.html.md.erb
@@ -0,0 +1,26 @@
+---
+title:  Overriding Properties File Settings
+---
+
+<!--
+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.
+-->
+
+Application developers have the option of configuring system attributes programmatically, rather than using the `geode.properties` file.
+
+Attributes set programmatically override any matching attribute settings in the `geode.properties` file, but additional attributes not set programmatically will be configured using the settings in `geode.properties`.
+
+

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/setting-properties/propfile_overview.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/setting-properties/propfile_overview.html.md.erb b/docs/geode-native-docs/setting-properties/propfile_overview.html.md.erb
new file mode 100644
index 0000000..dfbb8d2
--- /dev/null
+++ b/docs/geode-native-docs/setting-properties/propfile_overview.html.md.erb
@@ -0,0 +1,34 @@
+---
+title:  Properties File Example
+---
+
+<!--
+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.
+-->
+
+Use the `geode.properties` file to configure distributed system connections for the client.
+
+The following example shows the format of a geode.properties file. The first two attributes in this example should be set by programmers during application development, while other attributes are set on-site during system integration. The properties and their default settings that can be set in this file are described in detail in [Attributes in the Properites File](../setting-properties/propfile_attributes.html#attributes-gfcpp).
+
+## geode.properties File Format
+
+``` pre
+#Tue Feb 14 17:24:02 PDT 2006
+log-level=info
+cache-xml-file=./cache.xml
+stacktrace-enabled=true
+```
+

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/setting-properties/propfile_sample.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/setting-properties/propfile_sample.html.md.erb b/docs/geode-native-docs/setting-properties/propfile_sample.html.md.erb
new file mode 100644
index 0000000..9e39420
--- /dev/null
+++ b/docs/geode-native-docs/setting-properties/propfile_sample.html.md.erb
@@ -0,0 +1,121 @@
+---
+title:  Using the Default Sample File
+---
+
+<!--
+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.
+-->
+
+A sample `geode.properties` file is included with the Apache Geode native client installation in the <code>_product-dir_/defaultSystem</code> directory.
+
+To use this file:
+
+1.  Copy the file to the directory where you start the application.
+2.  Uncomment the lines you need and edit the settings as shown in this example:
+
+    ``` pre
+    cache-xml-file=test.xml
+    ```
+
+3.  Start the application.
+
+## Default geode.properties File
+
+``` pre
+# Default C++ distributed system properties
+# Copy to current directory and uncomment to override defaults.
+#
+## Debugging support, enables stacktraces in gemfire::Exception.
+#
+# The default is false, uncomment to enable stacktraces in exceptions.
+#stacktrace-enabled=true
+#crash-dump-enabled=true
+#
+#
+## Cache region configurtion
+#
+#cache-xml-file=cache.xml
+#
+## Log file config
+#
+#log-file=gemfire_cpp.log
+#log-level=config
+# zero indicates use no limit.
+#log-file-size-limit=0
+# zero indicates use no limit. 
+#log-disk-space-limit=0 
+#
+## Statistics values
+#
+# the rate is in seconds.
+#statistic-sample-rate=1
+#statistic-sampling-enabled=true
+#statistic-archive-file=statArchive.gfs
+# zero indicates use no limit.
+#archive-file-size-limit=0
+# zero indicates use no limit.
+#archive-disk-space-limit=0
+#enable-time-statistics=false 
+#
+## Heap based eviction configuration
+#
+# maximum amount of memory used by the cache for all regions, 0 disables this feature
+#heap-lru-limit=0
+# percentage over heap-lru-limit when LRU will be called. 
+#heap-lru-delta=10
+#
+## Durable client support
+#
+#durable-client-id=
+#durable-timeout=300
+#
+## SSL socket support
+#
+#ssl-enabled=false
+#ssl-keystore=
+#ssl-truststore=
+#
+## .NET AppDomain support
+#
+#appdomain-enabled=false
+#
+## Misc
+#
+#conflate-events=server
+#disable-shuffling-of-endpoints=false
+#grid-client=false
+#max-fe-threads=
+#max-socket-buffer-size=66560
+# the units are in seconds.
+#connect-timeout=59
+#notify-ack-interval=10
+#notify-dupcheck-life=300
+#ping-interval=10 
+#redundancy-monitor-interval=10
+#auto-ready-for-events=true
+#
+## module name of the initializer pointing to sample
+## implementation from templates/security
+#security-client-auth-library=securityImpl
+## static method name of the library mentioned above
+#security-client-auth-factory=createUserPasswordAuthInitInstance
+## credential for Dummy Authenticator configured in server.
+## note: security-password property will be inserted by the initializer
+## mentioned in the above property.
+#security-username=root
+```
+
+

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/setting-properties/propfile_search_path.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/setting-properties/propfile_search_path.html.md.erb b/docs/geode-native-docs/setting-properties/propfile_search_path.html.md.erb
new file mode 100644
index 0000000..cf1f60f
--- /dev/null
+++ b/docs/geode-native-docs/setting-properties/propfile_search_path.html.md.erb
@@ -0,0 +1,28 @@
+---
+title:  Search Path for Multiple Properties Files
+---
+
+<!--
+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.
+-->
+
+The client and cache server processes first look for their properties file in the <code>_product-dir_/defaultSystem</code> directory, then in the working directory.
+
+Any properties set in the working directory override settings in the `defaultSystem/geode.properties` file.
+
+If you are running multiple processes on one machine, you can configure the `geode.properties` file in the `defaultSystem` directory as a shared file that all processes can find. If a few processes need a slightly different configuration, you can put individual `geode.properties` files in their home directories to override specific properties.
+
+

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/system-statistics/chapter_overview.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/system-statistics/chapter_overview.html.md.erb b/docs/geode-native-docs/system-statistics/chapter_overview.html.md.erb
index 7b7737b..1e0de45 100644
--- a/docs/geode-native-docs/system-statistics/chapter_overview.html.md.erb
+++ b/docs/geode-native-docs/system-statistics/chapter_overview.html.md.erb
@@ -24,7 +24,7 @@ Statistics that end with "time" are time-based statistics.
 For performance reasons, the system does not collect these by default.
 To enable time-based statistics gathering,
 set the system property `enable-time-statistics` 
-as described in [Attributes in gfcpp.properties\u2014Statistics Archiving Properties](../setting-properties/attributes-gfcpp.html#attributes-gfcpp__table_E1A0EDBA67CD41319E1E5FD0A0BB2723).
+as described in [Attributes in geode.properties\u2014Statistics Archiving Properties](../setting-properties/propfile_attributes.html#attributes-gfcpp__table_E1A0EDBA67CD41319E1E5FD0A0BB2723).
 
 -   **[Sampling Statistics](sampling_statistics.html)**
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/system-statistics/sampling_statistics.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/system-statistics/sampling_statistics.html.md.erb b/docs/geode-native-docs/system-statistics/sampling_statistics.html.md.erb
index 1762d82..63c0409 100644
--- a/docs/geode-native-docs/system-statistics/sampling_statistics.html.md.erb
+++ b/docs/geode-native-docs/system-statistics/sampling_statistics.html.md.erb
@@ -29,6 +29,6 @@ The following statistics are related to the statistic sampler.
 | `sampleTime`  | Total amount of time spent taking samples.     |
 | `StatSampler` | Statistics on the statistic sampler.           |
 
-For more information about configuring statistics, see [Attributes in gfcpp.properties](../setting-properties/attributes-gfcpp.html#attributes-gfcpp).
+For more information about configuring statistics, see [Attributes in geode.properties](../setting-properties/propfile_attributes.html#attributes-gfcpp).
 
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/transactions/suspend-resume-xacts.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/transactions/suspend-resume-xacts.html.md.erb b/docs/geode-native-docs/transactions/suspend-resume-xacts.html.md.erb
index d7c6cae..bae2194 100644
--- a/docs/geode-native-docs/transactions/suspend-resume-xacts.html.md.erb
+++ b/docs/geode-native-docs/transactions/suspend-resume-xacts.html.md.erb
@@ -27,7 +27,7 @@ When a transaction is resumed, the resuming thread assumes the transactional vie
 
 If the member with the primary copy of the data crashes, the transactional view that applied to that data is lost. The secondary member for the data cannot resume transactions suspended on the crashed member. You need to take remedial steps to retry the transaction on a new primary copy of the data.
 
-If a suspended transaction is not touched for a period of time, Geode cleans it up automatically. By default, the timeout for a suspended transaction is 30 minutes and can be configured by using the `suspended-tx-timeout` property of the `gfcpp.properties` file. The suspended transaction timeout value is specified in milliseconds.
+If a suspended transaction is not touched for a period of time, Geode cleans it up automatically. By default, the timeout for a suspended transaction is 30 minutes and can be configured by using the `suspended-tx-timeout` property of the `geode.properties` file. The suspended transaction timeout value is specified in milliseconds.
 
 See [Running a Native Client Transaction](running-native-client-xact.html) for code examples of how to suspend and resume a transaction.
 


[23/34] geode-native git commit: GEODE-2494: Replace SpinLock with spinlock_mutex.

Posted by jb...@apache.org.
GEODE-2494: Replace SpinLock with spinlock_mutex.

- Cleanup C++ standards.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 3dca9db4fa336878d2e8f328faf9296bf0f642f3
Parents: 60179e5
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Wed Feb 22 19:04:10 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:23 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/CqQueryVsdStats.cpp   |  1 -
 src/cppcache/src/CqServiceVsdStats.cpp |  1 -
 src/cppcache/src/PoolStatistics.cpp    | 19 ++++++-----
 src/cppcache/src/PoolStatistics.hpp    | 29 ++++++++++++++---
 src/cppcache/src/RegionStats.cpp       | 49 +++++++++++++++++++++++------
 src/cppcache/src/RegionStats.hpp       | 24 +++++++-------
 6 files changed, 88 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/3dca9db4/src/cppcache/src/CqQueryVsdStats.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CqQueryVsdStats.cpp b/src/cppcache/src/CqQueryVsdStats.cpp
index 3076e2e..ceb40a6 100644
--- a/src/cppcache/src/CqQueryVsdStats.cpp
+++ b/src/cppcache/src/CqQueryVsdStats.cpp
@@ -20,7 +20,6 @@
 #include "CqQueryVsdStats.hpp"
 //#include "StatisticsFactory.hpp"
 
-#include <ace/Thread_Mutex.h>
 #include <ace/Singleton.h>
 
 #include <mutex>

http://git-wip-us.apache.org/repos/asf/geode-native/blob/3dca9db4/src/cppcache/src/CqServiceVsdStats.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CqServiceVsdStats.cpp b/src/cppcache/src/CqServiceVsdStats.cpp
index b78c056..08f331b 100644
--- a/src/cppcache/src/CqServiceVsdStats.cpp
+++ b/src/cppcache/src/CqServiceVsdStats.cpp
@@ -20,7 +20,6 @@
 #include "CqServiceVsdStats.hpp"
 //#include "StatisticsFactory.hpp"
 
-#include <ace/Thread_Mutex.h>
 #include <ace/Singleton.h>
 
 #include <mutex>

http://git-wip-us.apache.org/repos/asf/geode-native/blob/3dca9db4/src/cppcache/src/PoolStatistics.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/PoolStatistics.cpp b/src/cppcache/src/PoolStatistics.cpp
index 6c296aa..d33fb91 100644
--- a/src/cppcache/src/PoolStatistics.cpp
+++ b/src/cppcache/src/PoolStatistics.cpp
@@ -20,25 +20,30 @@
 #include "PoolStatistics.hpp"
 //#include "StatisticsFactory.hpp"
 
-#include <ace/Thread_Mutex.h>
 #include <ace/Singleton.h>
 
+#include <mutex>
+
+#include "util/concurrent/spinlock_mutex.hpp"
+
 ////////////////////////////////////////////////////////////////////////////////
 
 namespace apache {
 namespace geode {
 namespace client {
 
-using namespace apache::geode::statistics;
+using statistics::StatisticsFactory;
+using statistics::StatisticsManager;
+using util::concurrent::spinlock_mutex;
 
 ////////////////////////////////////////////////////////////////////////////////
 
 PoolStatType* PoolStatType::single = NULL;
-SpinLock PoolStatType::m_singletonLock;
-SpinLock PoolStatType::m_statTypeLock;
+spinlock_mutex PoolStatType::m_singletonLock;
+spinlock_mutex PoolStatType::m_statTypeLock;
 
 void PoolStatType::clean() {
-  SpinLockGuard guard(m_singletonLock);
+  std::lock_guard<spinlock_mutex> guard(m_singletonLock);
   if (single != NULL) {
     delete single;
     single = NULL;
@@ -46,7 +51,7 @@ void PoolStatType::clean() {
 }
 
 StatisticsType* PoolStatType::getStatType() {
-  SpinLockGuard guard(m_statTypeLock);
+  std::lock_guard<spinlock_mutex> guard(m_statTypeLock);
   StatisticsFactory* factory = StatisticsFactory::getExistingInstance();
   GF_D_ASSERT(!!factory);
 
@@ -179,7 +184,7 @@ StatisticsType* PoolStatType::getStatType() {
 }
 
 PoolStatType* PoolStatType::getInstance() {
-  SpinLockGuard guard(m_singletonLock);
+  std::lock_guard<spinlock_mutex> guard(m_singletonLock);
   if (single == NULL) {
     single = new PoolStatType();
   }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/3dca9db4/src/cppcache/src/PoolStatistics.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/PoolStatistics.hpp b/src/cppcache/src/PoolStatistics.hpp
index e107b44..c882cfc 100644
--- a/src/cppcache/src/PoolStatistics.hpp
+++ b/src/cppcache/src/PoolStatistics.hpp
@@ -1,10 +1,26 @@
+/*
+ * 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.
+ */
+
 #pragma once
 
 #ifndef GEODE_POOLSTATISTICS_H_
 #define GEODE_POOLSTATISTICS_H_
 
 /*
- * 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
@@ -24,13 +40,16 @@
 #include <geode/statistics/Statistics.hpp>
 #include <geode/statistics/StatisticsFactory.hpp>
 #include <statistics/StatisticsManager.hpp>
-#include "SpinLock.hpp"
+#include "util/concurrent/spinlock_mutex.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
 
-using namespace apache::geode::statistics;
+using statistics::StatisticDescriptor;
+using statistics::StatisticsType;
+using statistics::Statistics;
+using util::concurrent::spinlock_mutex;
 
 class PoolStats {
  public:
@@ -165,8 +184,8 @@ class PoolStats {
 class PoolStatType {
  private:
   static PoolStatType* single;
-  static SpinLock m_singletonLock;
-  static SpinLock m_statTypeLock;
+  static spinlock_mutex m_singletonLock;
+  static spinlock_mutex m_statTypeLock;
 
  public:
   static PoolStatType* getInstance();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/3dca9db4/src/cppcache/src/RegionStats.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/RegionStats.cpp b/src/cppcache/src/RegionStats.cpp
index 930fe92..285cf76 100644
--- a/src/cppcache/src/RegionStats.cpp
+++ b/src/cppcache/src/RegionStats.cpp
@@ -23,8 +23,12 @@
 #include <ace/Thread_Mutex.h>
 #include <ace/Singleton.h>
 
-const char* statsName = (const char*)"RegionStatistics";
-const char* statsDesc = (const char*)"Statistics for this region";
+#include <mutex>
+
+#include "util/concurrent/spinlock_mutex.hpp"
+
+const char* statsName = "RegionStatistics";
+const char* statsDesc = "Statistics for this region";
 
 ////////////////////////////////////////////////////////////////////////////////
 
@@ -32,16 +36,17 @@ namespace apache {
 namespace geode {
 namespace client {
 
-using namespace apache::geode::statistics;
+using statistics::StatisticsFactory;
+using util::concurrent::spinlock_mutex;
 
 ////////////////////////////////////////////////////////////////////////////////
 
 RegionStatType* RegionStatType::single = NULL;
-SpinLock RegionStatType::m_singletonLock;
-SpinLock RegionStatType::m_statTypeLock;
+spinlock_mutex RegionStatType::m_singletonLock;
+spinlock_mutex RegionStatType::m_statTypeLock;
 
 void RegionStatType::clean() {
-  SpinLockGuard guard(m_singletonLock);
+  std::lock_guard<spinlock_mutex> guard(m_singletonLock);
   if (single != NULL) {
     delete single;
     single = NULL;
@@ -50,7 +55,7 @@ void RegionStatType::clean() {
 
 StatisticsType* RegionStatType::getStatType() {
   const bool largerIsBetter = true;
-  SpinLockGuard guard(m_statTypeLock);
+  std::lock_guard<spinlock_mutex> guard(m_statTypeLock);
   StatisticsFactory* factory = StatisticsFactory::getExistingInstance();
   GF_D_ASSERT(!!factory);
 
@@ -191,14 +196,40 @@ StatisticsType* RegionStatType::getStatType() {
 }
 
 RegionStatType* RegionStatType::getInstance() {
-  SpinLockGuard guard(m_singletonLock);
+  std::lock_guard<spinlock_mutex> guard(m_singletonLock);
   if (single == NULL) {
     single = new RegionStatType();
   }
   return single;
 }
 
-RegionStatType::RegionStatType() {}
+RegionStatType::RegionStatType()
+    : m_destroysId(0),
+      m_createsId(0),
+      m_putsId(0),
+      m_putTimeId(0),
+      m_putAllId(0),
+      m_putAllTimeId(0),
+      m_removeAllId(0),
+      m_removeAllTimeId(0),
+      m_getsId(0),
+      m_getTimeId(0),
+      m_getAllId(0),
+      m_getAllTimeId(0),
+      m_hitsId(0),
+      m_missesId(0),
+      m_entriesId(0),
+      m_overflowsId(0),
+      m_retrievesId(0),
+      m_nonSingleHopId(0),
+      m_metaDataRefreshId(0),
+      m_LoaderCallsCompletedId(0),
+      m_LoaderCallTimeId(0),
+      m_WriterCallsCompletedId(0),
+      m_WriterCallTimeId(0),
+      m_ListenerCallsCompletedId(0),
+      m_ListenerCallTimeId(0),
+      m_clearsId(0) {}
 
 ////////////////////////////////////////////////////////////////////////////////
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/3dca9db4/src/cppcache/src/RegionStats.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/RegionStats.hpp b/src/cppcache/src/RegionStats.hpp
index c077b5f..1f72d77 100644
--- a/src/cppcache/src/RegionStats.hpp
+++ b/src/cppcache/src/RegionStats.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_REGIONSTATS_H_
-#define GEODE_REGIONSTATS_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,19 +15,24 @@
  * limitations under the License.
  */
 
+#pragma once
+
+#ifndef GEODE_REGIONSTATS_H_
+#define GEODE_REGIONSTATS_H_
+
 #include <geode/geode_globals.hpp>
 #include <geode/statistics/Statistics.hpp>
 #include <geode/statistics/StatisticsFactory.hpp>
-#include "SpinLock.hpp"
-//#include "NanoTimer.hpp"
-//#include <SystemProperties.hpp>
-//#include <../DistributedSystem.hpp>
+#include "util/concurrent/spinlock_mutex.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
 
-using namespace apache::geode::statistics;
+using statistics::StatisticDescriptor;
+using statistics::StatisticsType;
+using statistics::Statistics;
+using util::concurrent::spinlock_mutex;
 
 class CPPCACHE_EXPORT RegionStats {
  public:
@@ -130,8 +130,8 @@ class CPPCACHE_EXPORT RegionStats {
 class RegionStatType {
  private:
   static RegionStatType* single;
-  static SpinLock m_singletonLock;
-  static SpinLock m_statTypeLock;
+  static spinlock_mutex m_singletonLock;
+  static spinlock_mutex m_statTypeLock;
 
  public:
   static RegionStatType* getInstance();


[19/34] geode-native git commit: GEODE-2494: Replace SpinLock with spinlock_mutex.

Posted by jb...@apache.org.
GEODE-2494: Replace SpinLock with spinlock_mutex.

- Cleanup C++ standards.


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

Branch: refs/heads/feature/GEODE-2602
Commit: eee5d172b56332d08a157b02ff0e3dd8d30b798c
Parents: e1d9d0c
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Tue Feb 21 21:46:27 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:22 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/MapSegment.cpp | 91 ++++++++++++++++++------------------
 src/cppcache/src/MapSegment.hpp | 32 +++++++------
 2 files changed, 63 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/eee5d172/src/cppcache/src/MapSegment.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/MapSegment.cpp b/src/cppcache/src/MapSegment.cpp
index 0eb333a..6396062 100644
--- a/src/cppcache/src/MapSegment.cpp
+++ b/src/cppcache/src/MapSegment.cpp
@@ -19,18 +19,22 @@
 #include "TrackedMapEntry.hpp"
 #include "RegionInternal.hpp"
 #include "TableOfPrimes.hpp"
-#include "SpinLock.hpp"
 #include "Utils.hpp"
 #include "ThinClientPoolDM.hpp"
 #include "ThinClientRegion.hpp"
 #include "TombstoneExpiryHandler.hpp"
 #include <ace/OS.h>
 #include "ace/Time_Value.h"
-using namespace apache::geode::client;
 
-#define _GF_GUARD_SEGMENT SpinLockGuard mapGuard(m_spinlock)
+#include <mutex>
+#include "util/concurrent/spinlock_mutex.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
 #define _VERSION_TAG_NULL_CHK \
-  (versionTag != NULLPTR && versionTag.ptr() != NULL)
+  (versionTag != NULLPTR && versionTag.ptr() != nullptr)
 bool MapSegment::boolVal = false;
 MapSegment::~MapSegment() {
   delete m_map;
@@ -54,7 +58,7 @@ void MapSegment::open(RegionInternal* region, const EntryFactory* entryFactory,
 void MapSegment::close() { m_map->close(); }
 
 void MapSegment::clear() {
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   m_map->unbind_all();
 }
 
@@ -66,11 +70,11 @@ GfErrType MapSegment::create(const CacheableKeyPtr& key,
                              const CacheablePtr& newValue, MapEntryImplPtr& me,
                              CacheablePtr& oldValue, int updateCount,
                              int destroyTracker, VersionTagPtr versionTag) {
-  long taskid = -1;
-  TombstoneExpiryHandler* handler = NULL;
+  int64_t taskid = -1;
+  TombstoneExpiryHandler* handler = nullptr;
   GfErrType err = GF_NOERR;
   {
-    _GF_GUARD_SEGMENT;
+    std::lock_guard<spinlock_mutex> lk(m_spinlock);
     // if size is greater than 75 percent of prime, rehash
     uint32_t mapSize = TableOfPrimes::getPrime(m_primeIndex);
     if (((m_map->current_size() * 75) / 100) > mapSize) {
@@ -120,7 +124,7 @@ GfErrType MapSegment::create(const CacheableKeyPtr& key,
   }
   if (taskid != -1) {
     CacheImpl::expiryTaskManager->cancelTask(taskid);
-    if (handler != NULL) delete handler;
+    if (handler != nullptr) delete handler;
   }
   return err;
 }
@@ -133,11 +137,11 @@ GfErrType MapSegment::put(const CacheableKeyPtr& key,
                           CacheablePtr& oldValue, int updateCount,
                           int destroyTracker, bool& isUpdate,
                           VersionTagPtr versionTag, DataInput* delta) {
-  long taskid = -1;
-  TombstoneExpiryHandler* handler = NULL;
+  int64_t taskid = -1;
+  TombstoneExpiryHandler* handler = nullptr;
   GfErrType err = GF_NOERR;
   {
-    _GF_GUARD_SEGMENT;
+    std::lock_guard<spinlock_mutex> lk(m_spinlock);
     // if size is greater than 75 percent of prime, rehash
     uint32_t mapSize = TableOfPrimes::getPrime(m_primeIndex);
     if (((m_map->current_size() * 75) / 100) > mapSize) {
@@ -146,7 +150,7 @@ GfErrType MapSegment::put(const CacheableKeyPtr& key,
     MapEntryPtr entry;
     int status;
     if ((status = m_map->find(key, entry)) == -1) {
-      if (delta != NULL) {
+      if (delta != nullptr) {
         return GF_INVALID_DELTA;  // You can not apply delta when there is no
       }
       // entry hence ask for full object
@@ -162,7 +166,7 @@ GfErrType MapSegment::put(const CacheableKeyPtr& key,
       if (m_concurrencyChecksEnabled) {
         versionStamp = entry->getVersionStamp();
         if (_VERSION_TAG_NULL_CHK) {
-          if (delta == NULL) {
+          if (delta == nullptr) {
             err = versionStamp.processVersionTag(m_region, key, versionTag,
                                                  false);
           } else {
@@ -191,7 +195,7 @@ GfErrType MapSegment::put(const CacheableKeyPtr& key,
   }
   if (taskid != -1) {
     CacheImpl::expiryTaskManager->cancelTask(taskid);
-    if (handler != NULL) delete handler;
+    if (handler != nullptr) delete handler;
   }
   return err;
 }
@@ -199,7 +203,7 @@ GfErrType MapSegment::put(const CacheableKeyPtr& key,
 GfErrType MapSegment::invalidate(const CacheableKeyPtr& key,
                                  MapEntryImplPtr& me, CacheablePtr& oldValue,
                                  VersionTagPtr versionTag, bool& isTokenAdded) {
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   int status;
   isTokenAdded = false;
   GfErrType err = GF_NOERR;
@@ -245,7 +249,7 @@ GfErrType MapSegment::invalidate(const CacheableKeyPtr& key,
 GfErrType MapSegment::removeWhenConcurrencyEnabled(
     const CacheableKeyPtr& key, CacheablePtr& oldValue, MapEntryImplPtr& me,
     int updateCount, VersionTagPtr versionTag, bool afterRemote,
-    bool& isEntryFound, long expiryTaskID, TombstoneExpiryHandler* handler,
+    bool& isEntryFound, int64_t expiryTaskID, TombstoneExpiryHandler* handler,
     bool& expTaskSet) {
   GfErrType err = GF_NOERR;
   int status;
@@ -316,16 +320,16 @@ GfErrType MapSegment::remove(const CacheableKeyPtr& key, CacheablePtr& oldValue,
                              MapEntryImplPtr& me, int updateCount,
                              VersionTagPtr versionTag, bool afterRemote,
                              bool& isEntryFound) {
-  //  _GF_GUARD_SEGMENT;
+  //  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   int status;
   MapEntryPtr entry;
   if (m_concurrencyChecksEnabled) {
     TombstoneExpiryHandler* handler;
-    long id = m_tombstoneList->getExpiryTask(&handler);
+    int64_t id = m_tombstoneList->getExpiryTask(&handler);
     bool expTaskSet = false;
     GfErrType err;
     {
-      _GF_GUARD_SEGMENT;
+      std::lock_guard<spinlock_mutex> lk(m_spinlock);
       // if (m_concurrencyChecksEnabled)
       err = removeWhenConcurrencyEnabled(key, oldValue, me, updateCount,
                                          versionTag, afterRemote, isEntryFound,
@@ -340,7 +344,7 @@ GfErrType MapSegment::remove(const CacheableKeyPtr& key, CacheablePtr& oldValue,
     return err;
   }
 
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   CacheablePtr value;
   if ((status = m_map->unbind(key, entry)) == -1) {
     // didn't unbind, probably no entry...
@@ -377,7 +381,7 @@ bool MapSegment::unguardedRemoveActualEntry(const CacheableKeyPtr& key,
 
 bool MapSegment::unguardedRemoveActualEntryWithoutCancelTask(
     const CacheableKeyPtr& key, TombstoneExpiryHandler*& handler,
-    long& taskid) {
+    int64_t& taskid) {
   MapEntryPtr entry;
   taskid = m_tombstoneList->eraseEntryFromTombstoneListWithoutCancelTask(
       key, m_region, handler);
@@ -389,7 +393,7 @@ bool MapSegment::unguardedRemoveActualEntryWithoutCancelTask(
 
 bool MapSegment::removeActualEntry(const CacheableKeyPtr& key,
                                    bool cancelTask) {
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   return unguardedRemoveActualEntry(key, cancelTask);
 }
 /**
@@ -397,7 +401,7 @@ bool MapSegment::removeActualEntry(const CacheableKeyPtr& key,
  */
 bool MapSegment::getEntry(const CacheableKeyPtr& key, MapEntryImplPtr& result,
                           CacheablePtr& value) {
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   int status;
   MapEntryPtr entry;
   if ((status = m_map->find(key, entry)) == -1) {
@@ -422,7 +426,7 @@ bool MapSegment::getEntry(const CacheableKeyPtr& key, MapEntryImplPtr& result,
  * @brief return true if there exists an entry for the key.
  */
 bool MapSegment::containsKey(const CacheableKeyPtr& key) {
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   MapEntryPtr mePtr;
   int status;
   if ((status = m_map->find(key, mePtr)) == -1) {
@@ -441,7 +445,7 @@ bool MapSegment::containsKey(const CacheableKeyPtr& key) {
  * @brief return the all the keys in the provided list.
  */
 void MapSegment::keys(VectorOfCacheableKey& result) {
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   for (CacheableKeyHashMap::iterator iter = m_map->begin();
        iter != m_map->end(); iter++) {
     CacheablePtr valuePtr;
@@ -456,7 +460,7 @@ void MapSegment::keys(VectorOfCacheableKey& result) {
  * @brief return all the entries in the provided list.
  */
 void MapSegment::entries(VectorOfRegionEntry& result) {
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   // printf("total_size)=%u, current_size=%u\n",
   //  m_map->total_size(), m_map->current_size());
   for (CacheableKeyHashMap::iterator iter = m_map->begin();
@@ -480,7 +484,7 @@ void MapSegment::entries(VectorOfRegionEntry& result) {
  * @brief return all values in the provided list.
  */
 void MapSegment::values(VectorOfCacheable& result) {
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   for (CacheableKeyHashMap::iterator iter = m_map->begin();
        iter != m_map->end(); iter++) {
     CacheablePtr valuePtr;
@@ -514,7 +518,7 @@ int MapSegment::addTrackerForEntry(const CacheableKeyPtr& key,
                                    CacheablePtr& oldValue, bool addIfAbsent,
                                    bool failIfPresent, bool incUpdateCount) {
   if (m_concurrencyChecksEnabled) return -1;
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   MapEntryPtr entry;
   MapEntryPtr newEntry;
   int status;
@@ -561,11 +565,11 @@ int MapSegment::addTrackerForEntry(const CacheableKeyPtr& key,
 // changes takes care of the version and no need for tracking the entry
 void MapSegment::removeTrackerForEntry(const CacheableKeyPtr& key) {
   if (m_concurrencyChecksEnabled) return;
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   MapEntryPtr entry;
   int status;
   if ((status = m_map->find(key, entry)) != -1) {
-    removeTrackerForEntry(key, entry, NULL);
+    removeTrackerForEntry(key, entry, nullptr);
   }
 }
 
@@ -575,7 +579,7 @@ void MapSegment::removeTrackerForEntry(const CacheableKeyPtr& key) {
 void MapSegment::addTrackerForAllEntries(
     MapOfUpdateCounters& updateCounterMap) {
   if (m_concurrencyChecksEnabled) return;
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   MapEntryPtr newEntry;
   CacheableKeyPtr key;
   for (CacheableKeyHashMap::iterator iter = m_map->begin();
@@ -594,7 +598,7 @@ void MapSegment::addTrackerForAllEntries(
 // changes takes care of the version and no need for tracking the entry
 void MapSegment::removeDestroyTracking() {
   if (m_concurrencyChecksEnabled) return;
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   m_destroyedKeys.clear();
 }
 
@@ -638,11 +642,11 @@ GfErrType MapSegment::putForTrackedEntry(
     // for a non-tracked put (e.g. from notification) go ahead with the
     // create/update and increment the update counter
     ThinClientRegion* tcRegion = dynamic_cast<ThinClientRegion*>(m_region);
-    ThinClientPoolDM* m_poolDM = NULL;
+    ThinClientPoolDM* m_poolDM = nullptr;
     if (tcRegion) {
       m_poolDM = dynamic_cast<ThinClientPoolDM*>(tcRegion->getDistMgr());
     }
-    if (delta != NULL) {
+    if (delta != nullptr) {
       CacheablePtr oldValue;
       entryImpl->getValueI(oldValue);
       if (oldValue == NULLPTR || CacheableToken::isDestroyed(oldValue) ||
@@ -709,11 +713,11 @@ GfErrType MapSegment::putForTrackedEntry(
   }
 }
 void MapSegment::reapTombstones(std::map<uint16_t, int64_t>& gcVersions) {
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   m_tombstoneList->reapTombstones(gcVersions);
 }
 void MapSegment::reapTombstones(CacheableHashSetPtr removedKeys) {
-  _GF_GUARD_SEGMENT;
+  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   m_tombstoneList->reapTombstones(removedKeys);
 }
 
@@ -728,13 +732,7 @@ GfErrType MapSegment::isTombstone(CacheableKeyPtr key, MapEntryImplPtr& me,
   }
   mePtr = entry->getImplPtr();
 
-  /* adongre  - Coverity II
-   * CID 29204: Dereference before null check (REVERSE_INULL)
-   * Dereferencing pointer "mePtr". [show details]
-   * Fix : Aded a check for null ptr
-   */
-
-  if (mePtr == (MapEntryImpl*)0) {
+  if (mePtr == nullptr) {
     result = false;
     return GF_NOERR;
   }
@@ -742,7 +740,7 @@ GfErrType MapSegment::isTombstone(CacheableKeyPtr key, MapEntryImplPtr& me,
   mePtr->getValueI(value);
   result = mePtr;
 
-  if (value == NULLPTR || value.ptr() == NULL) {
+  if (value == NULLPTR || value.ptr() == nullptr) {
     result = false;
     return GF_NOERR;
   }
@@ -773,3 +771,6 @@ GfErrType MapSegment::isTombstone(CacheableKeyPtr key, MapEntryImplPtr& me,
     }
   }
 }
+}  // namespace client
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/eee5d172/src/cppcache/src/MapSegment.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/MapSegment.hpp b/src/cppcache/src/MapSegment.hpp
index 6b91c93..97dbe77 100644
--- a/src/cppcache/src/MapSegment.hpp
+++ b/src/cppcache/src/MapSegment.hpp
@@ -26,7 +26,6 @@
 #include "MapEntry.hpp"
 #include <geode/RegionEntry.hpp>
 #include <geode/VectorT.hpp>
-#include "SpinLock.hpp"
 #include "MapWithLock.hpp"
 #include "CacheableToken.hpp"
 #include <geode/Delta.hpp>
@@ -41,6 +40,9 @@
 #include <ace/Versioned_Namespace.h>
 #include "TombstoneList.hpp"
 #include <unordered_map>
+
+#include "util/concurrent/spinlock_mutex.hpp"
+
 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
 
 template <>
@@ -83,7 +85,7 @@ class CPPCACHE_EXPORT MapSegment {
 
   // index of the current prime in the primes table
   uint32_t m_primeIndex;
-  SpinLock m_spinlock;
+  spinlock_mutex m_spinlock;
   ACE_Recursive_Thread_Mutex m_segmentMutex;
 
   bool m_concurrencyChecksEnabled;
@@ -126,7 +128,7 @@ class CPPCACHE_EXPORT MapSegment {
     std::pair<bool, int> trackerPair = entry->removeTracker();
     if (trackerPair.second <= 0) {
       CacheablePtr value;
-      if (entryImpl == NULL) {
+      if (entryImpl == nullptr) {
         entryImpl = entry->getImplPtr();
       }
       entryImpl->getValueI(value);
@@ -137,7 +139,7 @@ class CPPCACHE_EXPORT MapSegment {
       }
     }
     if (trackerPair.first) {
-      entry = (entryImpl != NULL ? entryImpl : entry->getImplPtr());
+      entry = (entryImpl != nullptr ? entryImpl : entry->getImplPtr());
       m_map->rebind(key, entry);
     }
   }
@@ -146,7 +148,7 @@ class CPPCACHE_EXPORT MapSegment {
                               const CacheablePtr& newValue,
                               MapEntryImplPtr& newEntry, int updateCount,
                               int destroyTracker, VersionTagPtr versionTag,
-                              VersionStamp* versionStamp = NULL) {
+                              VersionStamp* versionStamp = nullptr) {
     if (!m_concurrencyChecksEnabled) {
       if (updateCount >= 0) {
         // entry was removed while being tracked
@@ -164,9 +166,9 @@ class CPPCACHE_EXPORT MapSegment {
     m_entryFactory->newMapEntry(key, newEntry);
     newEntry->setValueI(newValue);
     if (m_concurrencyChecksEnabled) {
-      if (versionTag != NULLPTR && versionTag.ptr() != NULL) {
+      if (versionTag != NULLPTR && versionTag.ptr() != nullptr) {
         newEntry->getVersionStamp().setVersions(versionTag);
-      } else if (versionStamp != NULL) {
+      } else if (versionStamp != nullptr) {
         newEntry->getVersionStamp().setVersions(*versionStamp);
       }
     }
@@ -178,26 +180,26 @@ class CPPCACHE_EXPORT MapSegment {
                                const CacheablePtr& newValue, MapEntryPtr& entry,
                                MapEntryImpl* entryImpl, int updateCount,
                                VersionStamp& versionStamp,
-                               DataInput* delta = NULL);
+                               DataInput* delta = nullptr);
 
   CacheablePtr getFromDisc(CacheableKeyPtr key, MapEntryImpl* entryImpl);
 
   GfErrType removeWhenConcurrencyEnabled(
       const CacheableKeyPtr& key, CacheablePtr& oldValue, MapEntryImplPtr& me,
       int updateCount, VersionTagPtr versionTag, bool afterRemote,
-      bool& isEntryFound, long expiryTaskID, TombstoneExpiryHandler* handler,
+      bool& isEntryFound, int64_t expiryTaskID, TombstoneExpiryHandler* handler,
       bool& expTaskSet);
 
  public:
   MapSegment()
-      : m_map(NULL),
-        m_entryFactory(NULL),
-        m_region(NULL),
+      : m_map(nullptr),
+        m_entryFactory(nullptr),
+        m_region(nullptr),
         m_primeIndex(0),
         m_spinlock(),
         m_segmentMutex(),
         m_concurrencyChecksEnabled(false),
-        m_numDestroyTrackers(NULL),
+        m_numDestroyTrackers(nullptr),
         m_rehashCount(0)  // COVERITY  --> 30303 Uninitialized scalar field
   {
     m_tombstoneList = new TombstoneList(this);
@@ -236,7 +238,7 @@ class CPPCACHE_EXPORT MapSegment {
   GfErrType put(const CacheableKeyPtr& key, const CacheablePtr& newValue,
                 MapEntryImplPtr& me, CacheablePtr& oldValue, int updateCount,
                 int destroyTracker, bool& isUpdate, VersionTagPtr versionTag,
-                DataInput* delta = NULL);
+                DataInput* delta = nullptr);
 
   GfErrType invalidate(const CacheableKeyPtr& key, MapEntryImplPtr& me,
                        CacheablePtr& oldValue, VersionTagPtr versionTag,
@@ -297,7 +299,7 @@ class CPPCACHE_EXPORT MapSegment {
 
   bool unguardedRemoveActualEntryWithoutCancelTask(
       const CacheableKeyPtr& key, TombstoneExpiryHandler*& handler,
-      long& taskid);
+      int64_t& taskid);
 
   bool unguardedRemoveActualEntry(const CacheableKeyPtr& key,
                                   bool cancelTask = true);


[15/34] geode-native git commit: GEODE-2494: Adds spinlock_mutex.

Posted by jb...@apache.org.
GEODE-2494: Adds spinlock_mutex.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 5670afbf0f56b78c36414554813de2d25a98ae56
Parents: 4c18359
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Wed Feb 15 22:29:09 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:22 2017 -0700

----------------------------------------------------------------------
 .../src/util/concurrent/spinlock_mutex.hpp      | 51 ++++++++++++++++++++
 1 file changed, 51 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/5670afbf/src/cppcache/src/util/concurrent/spinlock_mutex.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/util/concurrent/spinlock_mutex.hpp b/src/cppcache/src/util/concurrent/spinlock_mutex.hpp
new file mode 100644
index 0000000..ab59159
--- /dev/null
+++ b/src/cppcache/src/util/concurrent/spinlock_mutex.hpp
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#ifndef GEODE_UTIL_CONCURRENT_SPINLOCK_MUTEX_H_
+#define GEODE_UTIL_CONCURRENT_SPINLOCK_MUTEX_H_
+
+#include <atomic>
+
+namespace apache {
+namespace geode {
+namespace util {
+namespace concurrent {
+
+class spinlock_mutex final {
+ private:
+  std::atomic_flag flag = ATOMIC_FLAG_INIT;
+
+ public:
+  void lock() {
+    while (flag.test_and_set(std::memory_order_acquire)) continue;
+  }
+
+  void unlock() { flag.clear(std::memory_order_release); }
+
+  spinlock_mutex() = default;
+  spinlock_mutex(const spinlock_mutex &) = delete;
+  spinlock_mutex &operator=(const spinlock_mutex &) = delete;
+};
+
+} /* namespace concurrent */
+} /* namespace util */
+} /* namespace geode */
+} /* namespace apache */
+
+#endif /* GEODE_UTIL_CONCURRENT_SPINLOCK_MUTEX_H_ */


[21/34] geode-native git commit: GEODE-2494: Replace SpinLock with spinlock_mutex.

Posted by jb...@apache.org.
GEODE-2494: Replace SpinLock with spinlock_mutex.

- Cleanup C++ standards.


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

Branch: refs/heads/feature/GEODE-2602
Commit: eda4f62266de045d59514327ba239f4b76f2fcda
Parents: bee1455
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Tue Feb 21 22:52:50 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:23 2017 -0700

----------------------------------------------------------------------
 src/tests/cpp/fwk/UdpIpc.cpp           | 17 +++++++--
 src/tests/cpp/fwklib/FrameworkTest.cpp | 28 ++++++++++-----
 src/tests/cpp/fwklib/FrameworkTest.hpp |  6 +++-
 src/tests/cpp/security/Security.cpp    | 54 +++++++++++++++++------------
 src/tests/cpp/security/Security.hpp    |  2 +-
 5 files changed, 72 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/eda4f622/src/tests/cpp/fwk/UdpIpc.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwk/UdpIpc.cpp b/src/tests/cpp/fwk/UdpIpc.cpp
index d7efbd4..2b15fa6 100644
--- a/src/tests/cpp/fwk/UdpIpc.cpp
+++ b/src/tests/cpp/fwk/UdpIpc.cpp
@@ -35,8 +35,15 @@
 
 #include "fwklib/FwkExport.hpp"
 
-using namespace apache::geode::client;
-using namespace apache::geode::client::testframework;
+#include <mutex>
+#include <util/concurrent/spinlock_mutex.hpp>
+
+namespace apache {
+namespace geode {
+namespace client {
+namespace testframework {
+
+using util::concurrent::spinlock_mutex;
 
 static UdpIpc *g_test = NULL;
 
@@ -72,7 +79,7 @@ TESTTASK finalize() {
 // ----------------------------------------------------------------------------
 
 void UdpIpc::checkTest(const char *taskId) {
-  SpinLockGuard guard(m_lck);
+  std::lock_guard<spinlock_mutex> guard(m_lck);
   setTask(taskId);
   if (m_cache == NULLPTR) {
     PropertiesPtr pp = Properties::create();
@@ -258,3 +265,7 @@ void UdpIpc::doClient() {
   FWKINFO("Stop");
   FWKINFO("Client sent " << msgCnt << " messages");
 }
+}
+}
+}
+}

http://git-wip-us.apache.org/repos/asf/geode-native/blob/eda4f622/src/tests/cpp/fwklib/FrameworkTest.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/FrameworkTest.cpp b/src/tests/cpp/fwklib/FrameworkTest.cpp
index 9c3e642..c73383b 100644
--- a/src/tests/cpp/fwklib/FrameworkTest.cpp
+++ b/src/tests/cpp/fwklib/FrameworkTest.cpp
@@ -23,12 +23,18 @@
 #include <geode/PoolFactory.hpp>
 #include "PoolAttributes.hpp"
 
-using namespace apache::geode::client;
-using namespace apache::geode::client::testframework;
+#include <util/concurrent/spinlock_mutex.hpp>
+
+namespace apache {
+namespace geode {
+namespace client {
+namespace testframework {
+
+using util::concurrent::spinlock_mutex;
 
 // ========================================================================
 
-SpinLock FrameworkTest::m_lck;
+spinlock_mutex FrameworkTest::m_lck;
 
 // ----------------------------------------------------------------------------
 
@@ -47,7 +53,9 @@ FrameworkTest::FrameworkTest(const char* initArgs) {
   }
   m_bbc = new FwkBBClient(addr);
   m_deltaMicros = 0;
-  m_timeSync = new TimeSync(port, (int32_t*)&m_deltaMicros);
+  m_timeSync = new TimeSync(
+      port, const_cast<int32_t*>(
+                reinterpret_cast<volatile int32_t*>(&m_deltaMicros)));
   m_coll = new TestDriver(xml);
   TestClient::createTestClient(50, m_id);
   incClientCount();
@@ -253,7 +261,7 @@ void FrameworkTest::cacheInitialize(PropertiesPtr& props,
     if (isPdxSerialized) {
       cacheFactory->setPdxReadSerialized(isPdxSerialized);
     }
-  } catch (Exception e) {
+  } catch (Exception& e) {
     FWKEXCEPTION(
         "DistributedSystem::connect encountered Exception: " << e.getMessage());
   }
@@ -264,9 +272,9 @@ void FrameworkTest::cacheInitialize(PropertiesPtr& props,
     if (m_istransaction) {
       txManager = m_cache->getCacheTransactionManager();
     }
-  } catch (CacheExistsException ignore) {
+  } catch (CacheExistsException& ignore) {
     m_cache = NULLPTR;
-  } catch (Exception e) {
+  } catch (Exception& e) {
     FWKEXCEPTION(
         "CacheFactory::create encountered Exception: " << e.getMessage());
   }
@@ -283,7 +291,7 @@ void FrameworkTest::cacheFinalize() {
     try {
       destroyAllRegions();
       m_cache->close();
-    } catch (CacheClosedException ignore) {
+    } catch (CacheClosedException& ignore) {
     } catch (Exception& e) {
       FWKSEVERE("Caught an unexpected Exception during cache close: "
                 << e.getMessage());
@@ -544,3 +552,7 @@ std::string FrameworkTest::poolAttributesToString(PoolPtr& pool) {
   sString += "\n";
   return sString;
 }
+}  // namespace testframework
+}  // namespace client
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/eda4f622/src/tests/cpp/fwklib/FrameworkTest.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/FrameworkTest.hpp b/src/tests/cpp/fwklib/FrameworkTest.hpp
index cf5d2d7..2c422a9 100644
--- a/src/tests/cpp/fwklib/FrameworkTest.hpp
+++ b/src/tests/cpp/fwklib/FrameworkTest.hpp
@@ -26,11 +26,15 @@
 
 #include <string>
 
+#include <util/concurrent/spinlock_mutex.hpp>
+
 namespace apache {
 namespace geode {
 namespace client {
 namespace testframework {
 
+using util::concurrent::spinlock_mutex;
+
 class FrameworkTest  // Base class all test classes written for xml testing
                      // should derive from.
 {
@@ -46,7 +50,7 @@ class FrameworkTest  // Base class all test classes written for xml testing
   CachePtr m_cache;
   // bool m_istransaction;
   CacheTransactionManagerPtr txManager;
-  static SpinLock m_lck;
+  static spinlock_mutex m_lck;
 
 #ifdef _WIN32
   bool m_doneSetNewAndDelete;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/eda4f622/src/tests/cpp/security/Security.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/security/Security.cpp b/src/tests/cpp/security/Security.cpp
index 0f4d850..fe9280d 100644
--- a/src/tests/cpp/security/Security.cpp
+++ b/src/tests/cpp/security/Security.cpp
@@ -41,16 +41,18 @@
 
 #include "security/CredentialGenerator.hpp"
 
-namespace FwkSecurity {
+#include <mutex>
+#include <util/concurrent/spinlock_mutex.hpp>
+
+namespace apache {
+namespace geode {
+namespace client {
+namespace testframework {
+namespace security {
+
 std::string REGIONSBB("Regions");
 std::string CLIENTSBB("ClientsBb");
 std::string READYCLIENTS("ReadyClients");
-}  // namespace FwkSecurity
-
-using namespace FwkSecurity;
-using namespace apache::geode::client;
-using namespace apache::geode::client::testframework;
-using namespace apache::geode::client::testframework::security;
 
 Security *g_test = NULL;
 
@@ -156,7 +158,7 @@ void Security::getClientSecurityParams(PropertiesPtr prop,
 // ----------------------------------------------------------------------------
 
 void Security::checkTest(const char *taskId) {
-  SpinLockGuard guard(m_lck);
+  std::lock_guard<spinlock_mutex> guard(m_lck);
   setTask(taskId);
   if (m_cache == NULLPTR || m_cache->isClosed()) {
     PropertiesPtr pp = Properties::create();
@@ -180,7 +182,7 @@ TESTTASK doCreateRegion(const char *taskId) {
   try {
     g_test->checkTest(taskId);
     result = g_test->createRegion();
-  } catch (FwkException ex) {
+  } catch (FwkException &ex) {
     result = FWK_SEVERE;
     FWKSEVERE("doCreateRegion caught exception: " << ex.getMessage());
   }
@@ -194,7 +196,7 @@ TESTTASK doCheckValues(const char *taskId) {
   try {
     g_test->checkTest(taskId);
     result = g_test->checkValues();
-  } catch (FwkException ex) {
+  } catch (FwkException &ex) {
     result = FWK_SEVERE;
     FWKSEVERE("doCheckValues caught exception: " << ex.getMessage());
   }
@@ -239,7 +241,7 @@ TESTTASK doRegisterInterestList(const char *taskId) {
   try {
     g_test->checkTest(taskId);
     result = g_test->registerInterestList();
-  } catch (FwkException ex) {
+  } catch (FwkException &ex) {
     result = FWK_SEVERE;
     FWKSEVERE("doRegisterInterestList caught exception: " << ex.getMessage());
   }
@@ -253,7 +255,7 @@ TESTTASK doRegisterRegexList(const char *taskId) {
   try {
     g_test->checkTest(taskId);
     result = g_test->registerRegexList();
-  } catch (FwkException ex) {
+  } catch (FwkException &ex) {
     result = FWK_SEVERE;
     FWKSEVERE("doRegisterRegexList caught exception: " << ex.getMessage());
   }
@@ -266,7 +268,7 @@ TESTTASK doUnRegisterRegexList(const char *taskId) {
   try {
     g_test->checkTest(taskId);
     result = g_test->unregisterRegexList();
-  } catch (FwkException ex) {
+  } catch (FwkException &ex) {
     result = FWK_SEVERE;
     FWKSEVERE("doRegisterRegexList caught exception: " << ex.getMessage());
   }
@@ -279,7 +281,7 @@ TESTTASK doRegisterAllKeys(const char *taskId) {
   try {
     g_test->checkTest(taskId);
     result = g_test->registerAllKeys();
-  } catch (FwkException ex) {
+  } catch (FwkException &ex) {
     result = FWK_SEVERE;
     FWKSEVERE("doRegisterAllKeys caught exception: " << ex.getMessage());
   }
@@ -468,7 +470,7 @@ int32_t Security::createRegion() {
                                                      << std::endl);
     result = FWK_SUCCESS;
 
-  } catch (Exception e) {
+  } catch (Exception &e) {
     FWKSEVERE("Security::createRegion FAILED -- caught exception: "
               << e.getMessage());
   } catch (FwkException &e) {
@@ -725,7 +727,7 @@ int32_t Security::checkValues() {
             << creates << " values from creates, " << updates
             << " values from updates, and " << unknowns << " unknown values.");
     result = FWK_SUCCESS;
-  } catch (Exception e) {
+  } catch (Exception &e) {
     FWKSEVERE(
         "Security::checkValues FAILED -- caught exception: " << e.getMessage());
   } catch (FwkException &e) {
@@ -780,17 +782,17 @@ RegionPtr Security::getRegionPtr(const char *reg) {
         FWKEXCEPTION("Failed to get region: " << name);
       }
     }
-  } catch (CacheClosedException e) {
+  } catch (CacheClosedException &e) {
     FWKEXCEPTION(
         "In Security::getRegionPtr()  CacheFactory::getInstance encountered "
         "CacheClosedException: "
         << e.getMessage());
-  } catch (EntryNotFoundException e) {
+  } catch (EntryNotFoundException &e) {
     FWKEXCEPTION(
         "In Security::getRegionPtr()  CacheFactory::getInstance encountered "
         "EntryNotFoundException: "
         << e.getMessage());
-  } catch (IllegalArgumentException e) {
+  } catch (IllegalArgumentException &e) {
     FWKEXCEPTION(
         "In Security::getRegionPtr()  CacheFactory::getInstance encountered "
         "IllegalArgumentException: "
@@ -930,7 +932,7 @@ void Security::runQuery(int32_t &queryCnt) {
               << endTime.usec() << " sec");
       queryCnt++;
     }
-  } catch (Exception e) {
+  } catch (Exception &e) {
     FWKEXCEPTION(
         "CacheServerTest::runQuery Caught Exception: " << e.getMessage());
   } catch (FwkException &e) {
@@ -1014,12 +1016,15 @@ int32_t Security::doEntryOperations() {
                 reinterpret_cast<const unsigned char *>(valBuf),
                 static_cast<int32_t>(strlen(valBuf)));
             int32_t *val =
-                (int32_t *)(dynCast<CacheableBytesPtr>(tmpValue)->value());
+                const_cast<int32_t *>(reinterpret_cast<const int32_t *>(
+                    dynCast<CacheableBytesPtr>(tmpValue)->value()));
             *val = (*val == keyVal) ? keyVal + 1
                                     : keyVal;  // alternate the value so that it
                                                // can be validated later.
             int64_t *adjNow =
-                (int64_t *)(dynCast<CacheableBytesPtr>(tmpValue)->value() + 4);
+                const_cast<int64_t *>(reinterpret_cast<const int64_t *>(
+                    dynCast<CacheableBytesPtr>(tmpValue)->value())) +
+                4;
             *adjNow = getAdjustedNowMicros();
           }
           regionPtr->put(keyPtr, tmpValue);
@@ -1075,3 +1080,8 @@ int32_t Security::doEntryOperations() {
           << " query.");
   return fwkResult;
 }
+}  // namespace security
+}  // namespace testframework
+}  // namespace client
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/eda4f622/src/tests/cpp/security/Security.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/security/Security.hpp b/src/tests/cpp/security/Security.hpp
index 909f37c..ac67c29 100644
--- a/src/tests/cpp/security/Security.hpp
+++ b/src/tests/cpp/security/Security.hpp
@@ -114,7 +114,7 @@ class Security : public FrameworkTest {
   CacheableBytesPtr* m_CValue;
 };
 
-}  //   namespace security
+}  // namespace security
 }  // namespace testframework
 }  // namespace client
 }  // namespace geode


[32/34] geode-native git commit: GEODE-2552: Replace NanoSleep with std::this_thread::sleepFor.

Posted by jb...@apache.org.
GEODE-2552: Replace NanoSleep with std::this_thread::sleepFor.

- Replaced custom time/duration with std::crono.


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

Branch: refs/heads/feature/GEODE-2602
Commit: bb5d430586b83b89097d62bb9839ff4dd360716f
Parents: 1379afe
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Sat Feb 25 13:18:12 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:24 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/statistics/HostStatSampler.cpp | 99 +++++++++++---------
 .../src/statistics/PoolStatsSampler.cpp         | 44 +++++----
 2 files changed, 79 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/bb5d4305/src/cppcache/src/statistics/HostStatSampler.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/statistics/HostStatSampler.cpp b/src/cppcache/src/statistics/HostStatSampler.cpp
index 64015ec..ab3811b 100644
--- a/src/cppcache/src/statistics/HostStatSampler.cpp
+++ b/src/cppcache/src/statistics/HostStatSampler.cpp
@@ -27,19 +27,18 @@
 #include <ace/OS_NS_sys_stat.h>
 #include <utility>
 #include <vector>
+#include <chrono>
+#include <thread>
 
 #include "HostStatSampler.hpp"
 #include "HostStatHelper.hpp"
 #include "StatArchiveWriter.hpp"
-#include <NanoTimer.hpp>
 #include <geode/DistributedSystem.hpp>
 #include <geode/SystemProperties.hpp>
 #include <geode/Log.hpp>
 #include "GeodeStatisticsFactory.hpp"
 #include <ClientHealthStats.hpp>
 #include <ClientProxyMembershipID.hpp>
-using namespace apache::geode::statistics;
-using namespace apache::geode::client;
 
 namespace apache {
 namespace geode {
@@ -59,8 +58,6 @@ typedef std::vector<std::pair<std::string, int64_t> > g_fileInfo;
 }  // namespace geode
 }  // namespace apache
 
-using namespace apache::geode::statistics::globals;
-
 extern "C" {
 
 int selector(const dirent* d) {
@@ -115,6 +112,15 @@ int comparator(const dirent** d1, const dirent** d2) {
 }
 }
 
+namespace apache {
+namespace geode {
+namespace statistics {
+
+using std::chrono::high_resolution_clock;
+using std::chrono::duration_cast;
+using std::chrono::milliseconds;
+using std::chrono::nanoseconds;
+
 const char* HostStatSampler::NC_HSS_Thread = "NC HSS Thread";
 
 HostStatSampler::HostStatSampler(const char* filePath, int64_t sampleIntervalMs,
@@ -134,11 +140,11 @@ HostStatSampler::HostStatSampler(const char* filePath, int64_t sampleIntervalMs,
   m_pid = ACE_OS::getpid();
   m_statMngr = statMngr;
   m_archiveFileName = filePath;
-  g_statFile = filePath;
+  globals::g_statFile = filePath;
   m_sampleRate = sampleIntervalMs;
   rollIndex = 0;
   m_archiveDiskSpaceLimit = statDiskSpaceLimit;
-  g_spaceUsed = 0;
+  globals::g_spaceUsed = 0;
 
   if (statDiskSpaceLimit != 0) {
     m_isStatDiskSpaceEnabled = true;
@@ -171,24 +177,24 @@ HostStatSampler::HostStatSampler(const char* filePath, int64_t sampleIntervalMs,
       m_archiveFileSizeLimit = m_archiveDiskSpaceLimit;
     }
 
-    g_statFileWithExt = initStatFileWithExt();
+    globals::g_statFileWithExt = initStatFileWithExt();
 
 #ifdef _WIN32
     // replace all '\' with '/' to make everything easier..
-    size_t len = g_statFile.length() + 1;
+    size_t len = globals::g_statFile.length() + 1;
     char* slashtmp = new char[len];
-    ACE_OS::strncpy(slashtmp, g_statFile.c_str(), len);
-    for (size_t i = 0; i < g_statFile.length(); i++) {
+    ACE_OS::strncpy(slashtmp, globals::g_statFile.c_str(), len);
+    for (size_t i = 0; i < globals::g_statFile.length(); i++) {
       if (slashtmp[i] == '/') {
         slashtmp[i] = '\\';
       }
     }
-    g_statFile = slashtmp;
+    globals::g_statFile = slashtmp;
     delete[] slashtmp;
     slashtmp = NULL;
 #endif
 
-    std::string dirname = ACE::dirname(g_statFile.c_str());
+    std::string dirname = ACE::dirname(globals::g_statFile.c_str());
     // struct dirent **resultArray;
     // int entries_count = ACE_OS::scandir(dirname.c_str(), &resultArray,
     // selector, comparator);
@@ -219,14 +225,14 @@ HostStatSampler::HostStatSampler(const char* filePath, int64_t sampleIntervalMs,
       resultArray = NULL;
     }*/
 
-    FILE* existingFile = fopen(g_statFileWithExt.c_str(), "r");
+    FILE* existingFile = fopen(globals::g_statFileWithExt.c_str(), "r");
     if (existingFile != NULL && statFileLimit > 0) {
       fclose(existingFile);
       /* adongre
        * CID 28820: Resource leak (RESOURCE_LEAK)
        */
       existingFile = NULL;
-      changeArchive(g_statFileWithExt);
+      changeArchive(globals::g_statFileWithExt);
     } else {
       writeGfs();
     }
@@ -358,7 +364,7 @@ void HostStatSampler::changeArchive(std::string filename) {
   }
   filename = chkForGFSExt(filename);
   if (m_archiver != NULL) {
-    g_previoussamplesize = m_archiver->getSampleSize();
+    globals::g_previoussamplesize = m_archiver->getSampleSize();
     m_archiver->closeFile();
   }
   // create new file only when tis file has some data; otherwise reuse it
@@ -621,16 +627,17 @@ void HostStatSampler::doSample(std::string& archivefilename) {
 
   if (m_archiveFileSizeLimit != 0) {
     int64_t size = m_archiver->getSampleSize();
-    int64_t bytesWritten = m_archiver->bytesWritten();  // + g_previoussamplesize;
+    int64_t bytesWritten =
+        m_archiver->bytesWritten();  // + globals::g_previoussamplesize;
     if (bytesWritten > (m_archiveFileSizeLimit - size)) {
       // roll the archive
       changeArchive(archivefilename);
     }
   }
-  g_spaceUsed += m_archiver->bytesWritten();
+  globals::g_spaceUsed += m_archiver->bytesWritten();
   // delete older stat files if disk limit is about to be exceeded.
   if ((m_archiveDiskSpaceLimit != 0) &&
-      (g_spaceUsed >=
+      (globals::g_spaceUsed >=
        (m_archiveDiskSpaceLimit - m_archiver->getSampleSize()))) {
     checkDiskLimit();
   }
@@ -642,10 +649,10 @@ void HostStatSampler::doSample(std::string& archivefilename) {
 }
 
 void HostStatSampler::checkDiskLimit() {
-  g_fileInfo fileInfo;
-  g_spaceUsed = 0;
+  globals::g_fileInfo fileInfo;
+  globals::g_spaceUsed = 0;
   char fullpath[512] = {0};
-  std::string dirname = ACE::dirname(g_statFile.c_str());
+  std::string dirname = ACE::dirname(globals::g_statFile.c_str());
   // struct dirent **resultArray;
   // int entries_count = ACE_OS::scandir(dirname.c_str(), &resultArray,
   // selector, comparator);
@@ -657,11 +664,11 @@ void HostStatSampler::checkDiskLimit() {
       ACE_OS::snprintf(fullpath, 512, "%s%c%s", dirname.c_str(),
                        ACE_DIRECTORY_SEPARATOR_CHAR, sds[i]->d_name);
       ACE_OS::stat(fullpath, &statBuf);
-      g_fileInfoPair = std::make_pair(fullpath, statBuf.st_size);
-      fileInfo.push_back(g_fileInfoPair);
-      g_spaceUsed += fileInfo[i - 1].second;
+      globals::g_fileInfoPair = std::make_pair(fullpath, statBuf.st_size);
+      fileInfo.push_back(globals::g_fileInfoPair);
+      globals::g_spaceUsed += fileInfo[i - 1].second;
     }
-    g_spaceUsed += m_archiver->bytesWritten();
+    globals::g_spaceUsed += m_archiver->bytesWritten();
     /*for(int i = 0; i < entries_count; i++) {
     ACE_OS::free ( resultArray[i] );
     }
@@ -672,11 +679,11 @@ void HostStatSampler::checkDiskLimit() {
     sds.close();
   }
   int fileIndex = 0;
-  while ((g_spaceUsed >
+  while ((globals::g_spaceUsed >
           m_archiveDiskSpaceLimit) /*&& (fileIndex < entries_count)*/) {
     int64_t fileSize = fileInfo[fileIndex].second;
     if (ACE_OS::unlink(fileInfo[fileIndex].first.c_str()) == 0) {
-      g_spaceUsed -= fileSize;
+      globals::g_spaceUsed -= fileSize;
     } else {
       LOGWARN("%s\t%s\n", "Could not delete",
               fileInfo[fileIndex].first.c_str());
@@ -696,8 +703,8 @@ int32_t HostStatSampler::svc(void) {
     if (!m_isStatDiskSpaceEnabled) {
       changeArchive(archivefilename);
     }
-    int32_t msSpentWorking = 0;
-    int32_t msRate = static_cast<int32_t>(getSampleRate());
+    auto msSpentWorking = milliseconds::zero();
+    auto samplingRate = milliseconds(getSampleRate());
     bool gotexception = false;
     int waitTime = 0;
     while (!m_stopRequested) {
@@ -713,26 +720,23 @@ int32_t HostStatSampler::svc(void) {
           gotexception = false;
           changeArchive(archivefilename);
         }
-        int64_t sampleStartNanos = NanoTimer::now();
+
+        auto sampleStart = high_resolution_clock::now();
 
         doSample(archivefilename);
 
-        int64_t sampleEndNanos = NanoTimer::now();
-        int64_t nanosSpentWorking = sampleEndNanos - sampleStartNanos;
+        nanoseconds spentWorking = high_resolution_clock::now() - sampleStart;
         // updating the sampler statistics
-        accountForTimeSpentWorking(nanosSpentWorking);
-        msSpentWorking = static_cast<int32_t>(nanosSpentWorking / 1000000);
-
-        // Continous check for m_stopRequested to sped up stop time.
-        int32_t msToWait = msRate - msSpentWorking;
-        while (msToWait > 0) {
-          ACE_Time_Value sleepTime;
-          sleepTime.msec(msToWait > 100 ? 100 : msToWait);
-          ACE_OS::sleep(sleepTime);
-          msToWait -= 100;
-          if (m_stopRequested) {
-            break;
-          }
+        accountForTimeSpentWorking(spentWorking.count());
+
+        // TODO: replace with condition on m_stopRequested
+        auto sleepDuration =
+            samplingRate - duration_cast<milliseconds>(spentWorking);
+        static const auto wakeInterval = milliseconds(100);
+        while (!m_stopRequested && sleepDuration > milliseconds::zero()) {
+          std::this_thread::sleep_for(
+              sleepDuration > wakeInterval ? wakeInterval : sleepDuration);
+          sleepDuration -= wakeInterval;
         }
       } catch (Exception& e) {
         // log the exception and let the thread exit.
@@ -763,3 +767,6 @@ int32_t HostStatSampler::svc(void) {
   m_running = false;
   return 0;
 }
+}  // namespace statistics
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/bb5d4305/src/cppcache/src/statistics/PoolStatsSampler.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/statistics/PoolStatsSampler.cpp b/src/cppcache/src/statistics/PoolStatsSampler.cpp
index bb74448..6e40f06 100644
--- a/src/cppcache/src/statistics/PoolStatsSampler.cpp
+++ b/src/cppcache/src/statistics/PoolStatsSampler.cpp
@@ -21,10 +21,19 @@
 #include <ThinClientPoolDM.hpp>
 #include "GeodeStatisticsFactory.hpp"
 #include <ClientHealthStats.hpp>
-#include <NanoTimer.hpp>
 #include "HostStatHelper.hpp"
-using namespace apache::geode::statistics;
-using namespace apache::geode::client;
+#include <chrono>
+#include <thread>
+
+namespace apache {
+namespace geode {
+namespace statistics {
+
+using std::chrono::high_resolution_clock;
+using std::chrono::duration_cast;
+using std::chrono::milliseconds;
+using std::chrono::nanoseconds;
+
 const char* PoolStatsSampler::NC_PSS_Thread = "NC PSS Thread";
 
 PoolStatsSampler::PoolStatsSampler(int64_t sampleRate, CacheImpl* cache,
@@ -41,24 +50,20 @@ PoolStatsSampler::~PoolStatsSampler() {
 
 int32_t PoolStatsSampler::svc() {
   DistributedSystemImpl::setThreadName(NC_PSS_Thread);
-  int32_t msSpentWorking = 0;
-  int32_t msRate = static_cast<int32_t>(m_sampleRate);
+  auto msSpentWorking = milliseconds::zero();
+  auto samplingRate = milliseconds(m_sampleRate);
   // ACE_Guard < ACE_Recursive_Thread_Mutex > _guard( m_lock );
   while (!m_stopRequested) {
-    int64_t sampleStartNanos = NanoTimer::now();
+    auto sampleStart = high_resolution_clock::now();
     putStatsInAdminRegion();
-    int64_t sampleEndNanos = NanoTimer::now();
-    int64_t nanosSpentWorking = sampleEndNanos - sampleStartNanos;
-    msSpentWorking = static_cast<int32_t>(nanosSpentWorking / 1000000);
-    int32_t msToWait = msRate - msSpentWorking;
-    while (msToWait > 0) {
-      ACE_Time_Value sleepTime;
-      sleepTime.msec(msToWait > 100 ? 100 : msToWait);
-      ACE_OS::sleep(sleepTime);
-      msToWait -= 100;
-      if (m_stopRequested) {
-        break;
-      }
+    nanoseconds spentWorking = high_resolution_clock::now() - sampleStart;
+    auto sleepDuration =
+        samplingRate - duration_cast<milliseconds>(spentWorking);
+    static const auto wakeInterval = milliseconds(100);
+    while (!m_stopRequested && sleepDuration > milliseconds::zero()) {
+      std::this_thread::sleep_for(sleepDuration > wakeInterval ? wakeInterval
+                                                               : sleepDuration);
+      sleepDuration -= wakeInterval;
     }
   }
   return 0;
@@ -128,3 +133,6 @@ void PoolStatsSampler::putStatsInAdminRegion() {
     LOGDEBUG("Exception occurred, trying again.");
   }
 }
+}  // namespace statistics
+}  // namespace geode
+}  // namespace apache


[12/34] geode-native git commit: Merge branch 'feature/GEODE-2513-7' into develop

Posted by jb...@apache.org.
Merge branch 'feature/GEODE-2513-7' into develop


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

Branch: refs/heads/feature/GEODE-2602
Commit: 4c1835900a56dc76cb6aec44e13b8027e5e2cacb
Parents: 1300b48 4a6d11d
Author: Karen Miller <km...@pivotal.io>
Authored: Wed Mar 15 09:34:00 2017 -0700
Committer: Karen Miller <km...@pivotal.io>
Committed: Wed Mar 15 09:34:00 2017 -0700

----------------------------------------------------------------------
 .../type_mappings/chapter_overview.html.md.erb  |  2 +-
 ...p-class-to-dotnet-class-mappings.html.md.erb | 74 +++++++++-----------
 .../java-to-dotnet-type-mapping.html.md.erb     |  1 -
 3 files changed, 35 insertions(+), 42 deletions(-)
----------------------------------------------------------------------



[24/34] geode-native git commit: GEODE-2494: Fixes missing include for strlen.

Posted by jb...@apache.org.
GEODE-2494: Fixes missing include for strlen.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 19c6171c98835940d85b1cfbb7798604e2626125
Parents: 09837a0
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Tue Feb 28 09:13:16 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:23 2017 -0700

----------------------------------------------------------------------
 src/tests/cpp/fwklib/GsRandom.cpp | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/19c6171c/src/tests/cpp/fwklib/GsRandom.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/GsRandom.cpp b/src/tests/cpp/fwklib/GsRandom.cpp
index df13c44..c90a602 100644
--- a/src/tests/cpp/fwklib/GsRandom.cpp
+++ b/src/tests/cpp/fwklib/GsRandom.cpp
@@ -17,6 +17,7 @@
 
 #include "GsRandom.hpp"
 
+#include <cstring>
 #include <mutex>
 #include <util/concurrent/spinlock_mutex.hpp>
 


[02/34] geode-native git commit: GEODE-2509: Build failed at openSUSE LEAP 42.2

Posted by jb...@apache.org.
GEODE-2509: Build failed at openSUSE LEAP 42.2

This issue is when you use configure but does not specify lib
folder name on openSUSE, the default is "lib64" at 64bit
environment (not lib). Use --libdir option to specify the path.

This closes #47.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 06e8f39a036a0cbbda0898bb87673ed57a5dfa46
Parents: 7da9d90
Author: Danilo Chang <ra...@gmail.com>
Authored: Tue Mar 7 19:34:37 2017 +0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Tue Mar 7 16:57:30 2017 -0800

----------------------------------------------------------------------
 src/dependencies/libxml2/CMakeLists.txt  | 2 +-
 src/dependencies/xerces-c/CMakeLists.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/06e8f39a/src/dependencies/libxml2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/dependencies/libxml2/CMakeLists.txt b/src/dependencies/libxml2/CMakeLists.txt
index b0c740d..3165058 100644
--- a/src/dependencies/libxml2/CMakeLists.txt
+++ b/src/dependencies/libxml2/CMakeLists.txt
@@ -41,7 +41,7 @@ if (${WIN32})
   set ( _BUILD_COMMAND ${CMAKE_COMMAND} -E chdir win32 nmake -f Makefile.msvc all ${_MAKE_FLAGS} )
   set ( _INSTALL_COMMAND ${CMAKE_COMMAND} -E chdir win32 nmake -f Makefile.msvc install ${_MAKE_FLAGS} )
 else()
-  set ( _CONFIGURE_COMMAND ${CONFIGURE} $<$<CONFIG:Debug>:--with-debug> --with-pic --enable-static --without-iconv --without-python --without-lzma CFLAGS=${${PROJECT_NAME}_CFLAGS} "MAKE=$(MAKE)")
+  set ( _CONFIGURE_COMMAND ${CONFIGURE} $<$<CONFIG:Debug>:--with-debug> --libdir=<INSTALL_DIR>/lib --with-pic --enable-static --without-iconv --without-python --without-lzma CFLAGS=${${PROJECT_NAME}_CFLAGS} "MAKE=$(MAKE)")
   set ( _BUILD_COMMAND $(MAKE) all )
   set ( _INSTALL_COMMAND $(MAKE) install )
 endif()

http://git-wip-us.apache.org/repos/asf/geode-native/blob/06e8f39a/src/dependencies/xerces-c/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/dependencies/xerces-c/CMakeLists.txt b/src/dependencies/xerces-c/CMakeLists.txt
index b1ee30b..a64f954 100644
--- a/src/dependencies/xerces-c/CMakeLists.txt
+++ b/src/dependencies/xerces-c/CMakeLists.txt
@@ -45,7 +45,7 @@ if (WIN32)
                  #TODO cleanup includes?
                  COMMAND ${CMAKE_COMMAND} -E copy_directory src <INSTALL_DIR>/include )
 else()
-  set ( _CONFIGURE_COMMAND ${CONFIGURE} $<$<CONFIG:Debug>:--with-debug> --with-pic "CFLAGS=${${PROJECT_NAME}_CFLAGS}" "CXXFLAGS=${${PROJECT_NAME}_CXXFLAGS}" "MAKE=$(MAKE)" )
+  set ( _CONFIGURE_COMMAND ${CONFIGURE} $<$<CONFIG:Debug>:--with-debug> --libdir=<INSTALL_DIR>/lib --with-pic "CFLAGS=${${PROJECT_NAME}_CFLAGS}" "CXXFLAGS=${${PROJECT_NAME}_CXXFLAGS}" "MAKE=$(MAKE)" )
   set ( _BUILD_COMMAND $(MAKE) all )
   set ( _INSTALL_COMMAND $(MAKE) install )
 endif()


[09/34] geode-native git commit: GEODE-2303 Add eccn text to README.md

Posted by jb...@apache.org.
GEODE-2303 Add eccn text to README.md


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

Branch: refs/heads/feature/GEODE-2602
Commit: f46469a0d7593b91fa0fade47f4f0904adbf4eec
Parents: 013b336
Author: Anthony Baker <ab...@apache.org>
Authored: Mon Mar 13 20:42:19 2017 -0700
Committer: Anthony Baker <ab...@apache.org>
Committed: Mon Mar 13 20:43:08 2017 -0700

----------------------------------------------------------------------
 README.md | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/f46469a0/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 6624262..05cd4c4 100644
--- a/README.md
+++ b/README.md
@@ -24,3 +24,33 @@ Native Client applications can be written in these client technologies:
 
 * [C++] (https://isocpp.org)
 * [C#] (https://msdn.microsoft.com/en-us/library/ms228593.aspx)
+
+## Export Control
+
+This distribution includes cryptographic software.
+The country in which you currently reside may have restrictions
+on the import, possession, use, and/or re-export to another country,
+of encryption software. BEFORE using any encryption software,
+please check your country's laws, regulations and policies
+concerning the import, possession, or use, and re-export of
+encryption software, to see if this is permitted.
+See <http://www.wassenaar.org/> for more information.
+
+The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS),
+has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1,
+which includes information security software using or performing
+cryptographic functions with asymmetric algorithms.
+The form and manner of this Apache Software Foundation distribution makes
+it eligible for export under the License Exception
+ENC Technology Software Unrestricted (TSU) exception
+(see the BIS Export Administration Regulations, Section 740.13)
+for both object code and source code.
+
+The following provides more details on the included cryptographic software:
+
+* Apache Geode is designed to be used with
+  [Java Secure Socket Extension](https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html) (JSSE) and
+  [Java Cryptography Extension](http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html) (JCE).
+  The [JCE Unlimited Strength Jurisdiction Policy](http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html)
+  may need to be installed separately to use keystore passwords with 7 or more characters.
+* Apache Geode links to and uses [OpenSSL](https://www.openssl.org/) ciphers.


[13/34] geode-native git commit: GEODE-2494: Replace SpinLock with spinlock_mutex.

Posted by jb...@apache.org.
GEODE-2494: Replace SpinLock with spinlock_mutex.

- Cleanup C++ standards.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 30c6fc7f9f19e988dedb41a16620496b32c0ae70
Parents: eee5d17
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Tue Feb 21 21:55:33 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:22 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/LRUEntriesMap.cpp | 48 +++++++++++++++++----------------
 src/cppcache/src/LRUEntriesMap.hpp | 21 ++++++++-------
 2 files changed, 36 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/30c6fc7f/src/cppcache/src/LRUEntriesMap.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUEntriesMap.cpp b/src/cppcache/src/LRUEntriesMap.cpp
index 4b30513..154a1bd 100644
--- a/src/cppcache/src/LRUEntriesMap.cpp
+++ b/src/cppcache/src/LRUEntriesMap.cpp
@@ -20,6 +20,9 @@
 #include "MapSegment.hpp"
 #include "CacheImpl.hpp"
 
+#include <mutex>
+#include "util/concurrent/spinlock_mutex.hpp"
+
 namespace apache {
 namespace geode {
 namespace client {
@@ -48,11 +51,6 @@ class CPPCACHE_EXPORT TestMapAction : public virtual LRUAction {
   virtual LRUAction::Action getType() { return LRUAction::LOCAL_DESTROY; }
   friend class LRUAction;
 };
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-using namespace apache::geode::client;
 
 LRUEntriesMap::LRUEntriesMap(EntryFactory* entryFactory, RegionInternal* region,
                              const LRUAction::Action& lruAction,
@@ -67,18 +65,18 @@ LRUEntriesMap::LRUEntriesMap(EntryFactory* entryFactory, RegionInternal* region,
       m_validEntries(0),
       m_heapLRUEnabled(heapLRUEnabled) {
   m_currentMapSize = 0;
-  m_action = NULL;
-  m_evictionControllerPtr = NULL;
+  m_action = nullptr;
+  m_evictionControllerPtr = nullptr;
   // translate action type to an instance.
-  if (region == NULL) {
+  if (region == nullptr) {
     m_action = new TestMapAction(this);
   } else {
     m_action = LRUAction::newLRUAction(lruAction, region, this);
     m_name = region->getName();
     CacheImpl* cImpl = region->getCacheImpl();
-    if (cImpl != NULL) {
+    if (cImpl != nullptr) {
       m_evictionControllerPtr = cImpl->getEvictionController();
-      if (m_evictionControllerPtr != NULL) {
+      if (m_evictionControllerPtr != nullptr) {
         m_evictionControllerPtr->registerRegion(m_name);
         LOGINFO("Heap LRU eviction controller registered region %s",
                 m_name.c_str());
@@ -88,7 +86,7 @@ LRUEntriesMap::LRUEntriesMap(EntryFactory* entryFactory, RegionInternal* region,
 }
 
 void LRUEntriesMap::close() {
-  if (m_evictionControllerPtr != NULL) {
+  if (m_evictionControllerPtr != nullptr) {
     m_evictionControllerPtr->updateRegionHeapInfo((-1 * (m_currentMapSize)));
     m_evictionControllerPtr->deregisterRegion(m_name);
   }
@@ -137,7 +135,7 @@ GfErrType LRUEntriesMap::create(const CacheableKeyPtr& key,
     m_lruList.appendEntry(mePtr);
     me = mePtr;
   }
-  if (m_evictionControllerPtr != NULL) {
+  if (m_evictionControllerPtr != nullptr) {
     int64_t newSize =
         static_cast<int64_t>(Utils::checkAndGetObjectSize(newValue));
     newSize += static_cast<int64_t>(Utils::checkAndGetObjectSize(key));
@@ -238,7 +236,7 @@ GfErrType LRUEntriesMap::invalidate(const CacheableKeyPtr& key,
     } else {
       newSize -= sizeof(void*);
     }
-    if (m_evictionControllerPtr != NULL) {
+    if (m_evictionControllerPtr != nullptr) {
       if (newSize != 0) {
         updateMapSize(newSize);
       }
@@ -253,12 +251,12 @@ GfErrType LRUEntriesMap::put(const CacheableKeyPtr& key,
                              int destroyTracker, VersionTagPtr versionTag,
                              bool& isUpdate, DataInput* delta) {
   MapSegment* segmentRPtr = segmentFor(key);
-  GF_D_ASSERT(segmentRPtr != NULL);
+  GF_D_ASSERT(segmentRPtr != nullptr);
 
   GfErrType err = GF_NOERR;
   bool segmentLocked = false;
   {
-    if (m_action != NULL &&
+    if (m_action != nullptr &&
         m_action->getType() == LRUAction::OVERFLOW_TO_DISK) {
       segmentRPtr->acquire();
       segmentLocked = true;
@@ -297,7 +295,7 @@ GfErrType LRUEntriesMap::put(const CacheableKeyPtr& key,
       }
     }
     // SpinLock& lock = segmentRPtr->getSpinLock();
-    // SpinLockGuard mapGuard( lock );
+    // std::lock_guard<spinlock_mutex> mapGuard( lock );
 
     // TODO:  when can newValue be a token ??
     if (CacheableToken::isToken(newValue) && !isOldValueToken) {
@@ -328,7 +326,7 @@ GfErrType LRUEntriesMap::put(const CacheableKeyPtr& key,
       }
     }
   }
-  if (m_evictionControllerPtr != NULL) {
+  if (m_evictionControllerPtr != nullptr) {
     int64_t newSize =
         static_cast<int64_t>(Utils::checkAndGetObjectSize(newValue));
     /*
@@ -372,7 +370,8 @@ bool LRUEntriesMap::get(const CacheableKeyPtr& key, CacheablePtr& returnPtr,
   bool doProcessLRU = false;
   MapSegment* segmentRPtr = segmentFor(key);
   bool segmentLocked = false;
-  if (m_action != NULL && m_action->getType() == LRUAction::OVERFLOW_TO_DISK) {
+  if (m_action != nullptr &&
+      m_action->getType() == LRUAction::OVERFLOW_TO_DISK) {
     segmentRPtr->acquire();
     segmentLocked = true;
   }
@@ -406,14 +405,14 @@ bool LRUEntriesMap::get(const CacheableKeyPtr& key, CacheablePtr& returnPtr,
       VersionTagPtr versionTag;
       if (GF_NOERR ==
           segmentRPtr->put(key, tmpObj, mePtr, oldValue, 0, 0, isUpdate,
-                           versionTag, NULL)) {
+                           versionTag, nullptr)) {
         // m_entriesRetrieved++;
         ++m_validEntries;
         lruProps.clearEvicted();
         m_lruList.appendEntry(nodeToMark);
       }
       doProcessLRU = true;
-      if (m_evictionControllerPtr != NULL) {
+      if (m_evictionControllerPtr != nullptr) {
         int64_t newSize = 0;
         if (tmpObj != NULLPTR) {
           newSize += static_cast<int64_t>(
@@ -475,7 +474,7 @@ GfErrType LRUEntriesMap::remove(const CacheableKeyPtr& key,
           m_pmPtr->destroy(key, persistenceInfo);
         }
       }
-      if (m_evictionControllerPtr != NULL) {
+      if (m_evictionControllerPtr != nullptr) {
         int64_t sizeToRemove = static_cast<int64_t>(key->objectSize());
         sizeToRemove += static_cast<int64_t>(result->objectSize());
         updateMapSize((-1 * sizeToRemove));
@@ -488,9 +487,9 @@ GfErrType LRUEntriesMap::remove(const CacheableKeyPtr& key,
 void LRUEntriesMap::updateMapSize(int64_t size) {
   // TODO: check and remove null check since this has already been done
   // by all the callers
-  if (m_evictionControllerPtr != NULL) {
+  if (m_evictionControllerPtr != nullptr) {
     {
-      SpinLockGuard __guard(m_mapInfoLock);
+      std::lock_guard<spinlock_mutex> __guard(m_mapInfoLock);
       m_currentMapSize += size;
     }
     m_evictionControllerPtr->updateRegionHeapInfo(size);
@@ -511,3 +510,6 @@ CacheablePtr LRUEntriesMap::getFromDisk(const CacheableKeyPtr& key,
   }
   return tmpObj;
 }
+}  // namespace client
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/30c6fc7f/src/cppcache/src/LRUEntriesMap.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUEntriesMap.hpp b/src/cppcache/src/LRUEntriesMap.hpp
index 3efcbeb..074bb1e 100644
--- a/src/cppcache/src/LRUEntriesMap.hpp
+++ b/src/cppcache/src/LRUEntriesMap.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_LRUENTRIESMAP_H_
-#define GEODE_LRUENTRIESMAP_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,6 +15,11 @@
  * limitations under the License.
  */
 
+#pragma once
+
+#ifndef GEODE_LRUENTRIESMAP_H_
+#define GEODE_LRUENTRIESMAP_H_
+
 #include <geode/geode_globals.hpp>
 #include <geode/Cache.hpp>
 #include "ConcurrentEntriesMap.hpp"
@@ -27,7 +27,8 @@
 #include "LRUList.hpp"
 #include "LRUMapEntry.hpp"
 #include "MapEntryT.hpp"
-#include "SpinLock.hpp"
+
+#include "util/concurrent/spinlock_mutex.hpp"
 
 #include "NonCopyable.hpp"
 
@@ -65,7 +66,7 @@ class CPPCACHE_EXPORT LRUEntriesMap : public ConcurrentEntriesMap,
   PersistenceManagerPtr m_pmPtr;
   EvictionController* m_evictionControllerPtr;
   int64_t m_currentMapSize;
-  SpinLock m_mapInfoLock;
+  spinlock_mutex m_mapInfoLock;
   std::string m_name;
   AtomicInc m_validEntries;
   bool m_heapLRUEnabled;
@@ -83,7 +84,7 @@ class CPPCACHE_EXPORT LRUEntriesMap : public ConcurrentEntriesMap,
                         CacheablePtr& oldValue, int updateCount,
                         int destroyTracker, VersionTagPtr versionTag,
                         bool& isUpdate = EntriesMap::boolVal,
-                        DataInput* delta = NULL);
+                        DataInput* delta = nullptr);
   virtual GfErrType invalidate(const CacheableKeyPtr& key, MapEntryImplPtr& me,
                                CacheablePtr& oldValue,
                                VersionTagPtr versionTag);
@@ -113,8 +114,8 @@ class CPPCACHE_EXPORT LRUEntriesMap : public ConcurrentEntriesMap,
   virtual void close();
 
   inline bool mustEvict() const {
-    if (m_action == NULL) {
-      LOGFINE("Eviction action is NULL");
+    if (m_action == nullptr) {
+      LOGFINE("Eviction action is nullptr");
       return false;
     }
     if (m_action->overflows()) {


[34/34] geode-native git commit: GEODE-2552: Removed NanoTimer

Posted by jb...@apache.org.
GEODE-2552: Removed NanoTimer

- Replaced millisleep with std::this_thread::sleep_for.


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

Branch: refs/heads/feature/GEODE-2602
Commit: e0145aced70d9659b286df4762a00940dccefa4d
Parents: 786fff8
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Sun Feb 26 15:12:18 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:24 2017 -0700

----------------------------------------------------------------------
 src/cppcache/include/geode/geode_globals.hpp    |  2 -
 .../integration-test/ThinClientDurable.hpp      | 23 +++++----
 .../ThinClientDurableFailover.hpp               | 21 ++++----
 .../ThinClientDurableInterest.hpp               | 15 +++---
 .../testThinClientConflation.cpp                | 11 ++--
 .../testThinClientCqDurable.cpp                 | 10 ++--
 .../testThinClientHAEventIDMap.cpp              | 22 ++++----
 .../testThinClientHAPeriodicAck.cpp             | 18 ++++---
 src/cppcache/src/EvictionController.cpp         | 19 ++++---
 src/cppcache/src/LocalRegion.cpp                | 21 ++++----
 src/cppcache/src/Log.cpp                        |  6 ++-
 src/cppcache/src/NanoTimer.cpp                  | 53 --------------------
 src/cppcache/src/NanoTimer.hpp                  | 39 --------------
 src/cppcache/src/TcrConnectionManager.cpp       | 14 ++++--
 src/cppcache/src/TcrEndpoint.cpp                | 18 +++++--
 src/cppcache/src/Utils.cpp                      |  9 +++-
 src/cppcache/src/Utils.hpp                      |  1 -
 src/cppcache/test/NanoTimerTest.cpp             | 30 -----------
 src/quickstart/cpp/DurableClient.cpp            |  2 +-
 19 files changed, 127 insertions(+), 207 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/include/geode/geode_globals.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/geode_globals.hpp b/src/cppcache/include/geode/geode_globals.hpp
index 2ca7e3d..95d62a5 100644
--- a/src/cppcache/include/geode/geode_globals.hpp
+++ b/src/cppcache/include/geode/geode_globals.hpp
@@ -122,8 +122,6 @@ namespace apache {
 namespace geode {
 namespace client {
 
-extern void CPPCACHE_EXPORT millisleep(uint32_t millis);
-
 #ifdef _WIN32
 extern void CPPCACHE_EXPORT setNewAndDelete(pNew, pDelete);
 #endif

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/integration-test/ThinClientDurable.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientDurable.hpp b/src/cppcache/integration-test/ThinClientDurable.hpp
index 4b08cbc..5270b67 100644
--- a/src/cppcache/integration-test/ThinClientDurable.hpp
+++ b/src/cppcache/integration-test/ThinClientDurable.hpp
@@ -29,6 +29,9 @@
 #include "fw_dunit.hpp"
 #include "ThinClientHelper.hpp"
 
+#include <thread>
+#include <chrono>
+
 /* Testing Parameters              Param's Value
 Termination :                   Keepalive = true/ false, Client crash / Netdown
 Restart Time:                   Before Timeout / After Timeout
@@ -61,7 +64,7 @@ class OperMonitor : public CacheListener {
     CacheableInt32Ptr value = NULLPTR;
     try {
       value = dynCast<CacheableInt32Ptr>(event.getNewValue());
-    } catch (Exception) {
+    } catch (Exception&) {
       //  do nothing.
     }
 
@@ -203,22 +206,22 @@ void feederUpdate(int value, int ignoreR2 = false) {
       continue;
     }
     createIntEntry(regionNames[regIdx], mixKeys[0], value);
-    apache::geode::client::millisleep(10);
+    std::this_thread::sleep_for(std::chrono::milliseconds(10));
     createIntEntry(regionNames[regIdx], mixKeys[1], value);
-    apache::geode::client::millisleep(10);
+    std::this_thread::sleep_for(std::chrono::milliseconds(10));
     createIntEntry(regionNames[regIdx], mixKeys[2], value);
-    apache::geode::client::millisleep(10);
+    std::this_thread::sleep_for(std::chrono::milliseconds(10));
     createIntEntry(regionNames[regIdx], mixKeys[3], value);
-    apache::geode::client::millisleep(10);
+    std::this_thread::sleep_for(std::chrono::milliseconds(10));
 
     destroyEntry(regionNames[regIdx], mixKeys[0]);
-    apache::geode::client::millisleep(10);
+    std::this_thread::sleep_for(std::chrono::milliseconds(10));
     destroyEntry(regionNames[regIdx], mixKeys[1]);
-    apache::geode::client::millisleep(10);
+    std::this_thread::sleep_for(std::chrono::milliseconds(10));
     destroyEntry(regionNames[regIdx], mixKeys[2]);
-    apache::geode::client::millisleep(10);
+    std::this_thread::sleep_for(std::chrono::milliseconds(10));
     destroyEntry(regionNames[regIdx], mixKeys[3]);
-    apache::geode::client::millisleep(10);
+    std::this_thread::sleep_for(std::chrono::milliseconds(10));
   }
 }
 
@@ -320,7 +323,7 @@ DUNIT_TASK_DEFINITION(FEEDER, FeederUpdate1)
     feederUpdate(1);
 
     //  Wait 5 seconds for events to be removed from ha queues.
-    apache::geode::client::millisleep(5000);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     LOG("FeederUpdate1 complete.");
   }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/integration-test/ThinClientDurableFailover.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientDurableFailover.hpp b/src/cppcache/integration-test/ThinClientDurableFailover.hpp
index f06510e..10a0a31 100644
--- a/src/cppcache/integration-test/ThinClientDurableFailover.hpp
+++ b/src/cppcache/integration-test/ThinClientDurableFailover.hpp
@@ -29,6 +29,9 @@
 #include "fw_dunit.hpp"
 #include "ThinClientHelper.hpp"
 
+#include <thread>
+#include <chrono>
+
 /* Testing Parameters              Param's Value
 Termination :                   Keepalive = true/ false, Client crash
 Restart Time:                   Before Timeout / After Timeout
@@ -59,7 +62,7 @@ class OperMonitor : public CacheListener {
     CacheableInt32Ptr value = NULLPTR;
     try {
       value = dynCast<CacheableInt32Ptr>(event.getNewValue());
-    } catch (Exception) {
+    } catch (Exception&) {
       //  do nothing.
     }
 
@@ -177,21 +180,21 @@ void initClientCache(int redundancy, int durableTimeout, OperMonitorPtr& mon,
   // for R =1 it will get a redundancy error
   try {
     regPtr0->registerRegex(testRegex[0], true);
-  } catch (Exception) {
+  } catch (Exception&) {
     //  do nothing.
   }
   try {
     regPtr0->registerRegex(testRegex[1], false);
-  } catch (Exception) {
+  } catch (Exception&) {
     //  do nothing.
   }
 }
 
 void feederUpdate(int value) {
   createIntEntry(regionNames[0], mixKeys[0], value);
-  apache::geode::client::millisleep(10);
+  std::this_thread::sleep_for(std::chrono::milliseconds(10));
   createIntEntry(regionNames[0], mixKeys[1], value);
-  apache::geode::client::millisleep(10);
+  std::this_thread::sleep_for(std::chrono::milliseconds(10));
 }
 
 /* Close Client 1 with option keep alive = true*/
@@ -226,7 +229,7 @@ DUNIT_TASK_DEFINITION(SERVER1, StartServer2)
     }
 
     //  sleep for 3 seconds to allow redundancy monitor to detect new server.
-    apache::geode::client::millisleep(3000);
+    std::this_thread::sleep_for(std::chrono::seconds(3));
     LOG("SERVER started");
   }
 END_TASK_DEFINITION
@@ -254,7 +257,7 @@ DUNIT_TASK_DEFINITION(FEEDER, FeederUpdate1)
     feederUpdate(1);
 
     //  Wait 5 seconds for events to be removed from ha queues.
-    apache::geode::client::millisleep(5000);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     LOG("FeederUpdate1 complete.");
   }
@@ -265,7 +268,7 @@ DUNIT_TASK_DEFINITION(FEEDER, FeederUpdate2)
     feederUpdate(2);
 
     //  Wait 5 seconds for events to be removed from ha queues.
-    apache::geode::client::millisleep(5000);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     LOG("FeederUpdate2 complete.");
   }
@@ -314,7 +317,7 @@ DUNIT_TASK_DEFINITION(SERVER1, CloseServer1)
   {
     CacheHelper::closeServer(1);
     //  Wait 2 seconds to allow client failover.
-    apache::geode::client::millisleep(2000);
+    std::this_thread::sleep_for(std::chrono::seconds(2));
     LOG("SERVER closed");
   }
 END_TASK_DEFINITION

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/integration-test/ThinClientDurableInterest.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientDurableInterest.hpp b/src/cppcache/integration-test/ThinClientDurableInterest.hpp
index 24c75e4..e6286b6 100644
--- a/src/cppcache/integration-test/ThinClientDurableInterest.hpp
+++ b/src/cppcache/integration-test/ThinClientDurableInterest.hpp
@@ -29,6 +29,9 @@
 #include "fw_dunit.hpp"
 #include "ThinClientHelper.hpp"
 
+#include <thread>
+#include <chrono>
+
 /* This is to test
 1- If client doesn't do explicit registration on reconnect, durable events shud
 be recieved.
@@ -186,21 +189,21 @@ void initClientRemoveIntrest(int ClientIdx, OperMonitorPtr mon) {
 
 void feederUpdate(int value) {
   createIntEntry(regionNames[0], mixKeys[0], value);
-  apache::geode::client::millisleep(10);
+  std::this_thread::sleep_for(std::chrono::milliseconds(10));
   createIntEntry(regionNames[0], mixKeys[1], value);
-  apache::geode::client::millisleep(10);
+  std::this_thread::sleep_for(std::chrono::milliseconds(10));
 }
 
 void feederUpdate1(int value) {
   createIntEntry(regionNames[0], mixKeys[0], value);
-  apache::geode::client::millisleep(10);
+  std::this_thread::sleep_for(std::chrono::milliseconds(10));
   createIntEntry(regionNames[0], mixKeys[1], value);
-  apache::geode::client::millisleep(10);
+  std::this_thread::sleep_for(std::chrono::milliseconds(10));
 
   createIntEntry(regionNames[1], mixKeys[2], value);
-  apache::geode::client::millisleep(10);
+  std::this_thread::sleep_for(std::chrono::milliseconds(10));
   createIntEntry(regionNames[1], mixKeys[3], value);
-  apache::geode::client::millisleep(10);
+  std::this_thread::sleep_for(std::chrono::milliseconds(10));
 }
 
 DUNIT_TASK_DEFINITION(FEEDER, FeederInit)

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/integration-test/testThinClientConflation.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/testThinClientConflation.cpp b/src/cppcache/integration-test/testThinClientConflation.cpp
index 7b0a08a..57b2297 100644
--- a/src/cppcache/integration-test/testThinClientConflation.cpp
+++ b/src/cppcache/integration-test/testThinClientConflation.cpp
@@ -18,6 +18,9 @@
 #include "fw_dunit.hpp"
 #include "ThinClientHelper.hpp"
 
+#include <thread>
+#include <chrono>
+
 /* Testing Parameters              Param's Value
 Server Conflation:                   on / off
 Client side conflation setting   on/ off / server / not set
@@ -176,7 +179,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, ValidateClient1Conflation)
   {
     // Client Already Initiated , Send Client Ready and wait
     getHelper()->cachePtr->readyForEvents();
-    apache::geode::client::millisleep(5000);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     mon1C1->validate(true);
     LOG("Client 1 region 1 verified for conflation = true");
@@ -191,7 +194,7 @@ DUNIT_TASK_DEFINITION(CLIENT2, ValidateClient2Conflation)
   {
     // Client Already Initiated , Send Client Ready and wait
     getHelper()->cachePtr->readyForEvents();
-    apache::geode::client::millisleep(5000);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     mon1C2->validate(false);
     LOG("Client 2 region 1 verified for conflation = false");
@@ -227,7 +230,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, ValidateClient1Server)
   {
     // Client Already Initiated , Send Client Ready and wait
     getHelper()->cachePtr->readyForEvents();
-    apache::geode::client::millisleep(5000);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     mon1C1->validate(true);
     LOG("Client 1 region 1 verified for conflation = server");
@@ -242,7 +245,7 @@ DUNIT_TASK_DEFINITION(CLIENT2, ValidateClient2None)
   {
     // Client Already Initiated , Send Client Ready and wait
     getHelper()->cachePtr->readyForEvents();
-    apache::geode::client::millisleep(5000);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     mon1C2->validate(true);
     LOG("Client 2 region 1 verified for no conflation setting");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/integration-test/testThinClientCqDurable.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/testThinClientCqDurable.cpp b/src/cppcache/integration-test/testThinClientCqDurable.cpp
index 862795a..6ed73a1 100644
--- a/src/cppcache/integration-test/testThinClientCqDurable.cpp
+++ b/src/cppcache/integration-test/testThinClientCqDurable.cpp
@@ -24,6 +24,8 @@
 #include <ace/OS.h>
 #include <ace/High_Res_Timer.h>
 #include <string>
+#include <thread>
+#include <chrono>
 
 #define ROOT_SCOPE DISTRIBUTED_ACK
 
@@ -216,7 +218,7 @@ void RunDurableCqClient() {
 
   // execute Cq Query
   qry->execute();
-  apache::geode::client::millisleep(10000);
+  std::this_thread::sleep_for(std::chrono::seconds(10));
 
   LOGINFO("Executed new CqQuery");
 
@@ -227,7 +229,7 @@ void RunDurableCqClient() {
   LOGINFO("Sent ReadyForEvents message to server");
 
   // wait for some time to recieve events
-  apache::geode::client::millisleep(10000);
+  std::this_thread::sleep_for(std::chrono::seconds(10));
 
   // Close the Geode Cache with keepalive = true.  Server will queue events
   // for
@@ -263,7 +265,7 @@ void RunFeederClient() {
 
     regionPtr->put(keyPtr, valPtr);
   }
-  apache::geode::client::millisleep(10000);
+  std::this_thread::sleep_for(std::chrono::seconds(10));
   LOGINFO("put on 0-10 keys done.");
 
   // Close the Geode Cache
@@ -296,7 +298,7 @@ void RunFeederClient1() {
 
     regionPtr->put(keyPtr, valPtr);
   }
-  apache::geode::client::millisleep(10000);
+  std::this_thread::sleep_for(std::chrono::seconds(10));
   LOGINFO("put on 0-10 keys done.");
 
   // Close the Geode Cache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/integration-test/testThinClientHAEventIDMap.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/testThinClientHAEventIDMap.cpp b/src/cppcache/integration-test/testThinClientHAEventIDMap.cpp
index 449a95a..167ea1f 100644
--- a/src/cppcache/integration-test/testThinClientHAEventIDMap.cpp
+++ b/src/cppcache/integration-test/testThinClientHAEventIDMap.cpp
@@ -20,6 +20,8 @@
 
 #include <ace/OS.h>
 #include <string>
+#include <thread>
+#include <chrono>
 
 #define ROOT_NAME "testThinClientHAEventIDMap"
 #define ROOT_SCOPE DISTRIBUTED_ACK
@@ -485,21 +487,21 @@ DUNIT_TASK_DEFINITION(CLIENT1, CreateEntries)
   {
     for (int value = 1; value <= 100; value++) {
       createIntEntry(regionNames[0], keys[0], value);
-      apache::geode::client::millisleep(10);
+      std::this_thread::sleep_for(std::chrono::milliseconds(10));
       createIntEntry(regionNames[0], keys[1], value);
-      apache::geode::client::millisleep(10);
+      std::this_thread::sleep_for(std::chrono::milliseconds(10));
       createIntEntry(regionNames[0], keys[2], value);
-      apache::geode::client::millisleep(10);
+      std::this_thread::sleep_for(std::chrono::milliseconds(10));
       createIntEntry(regionNames[0], keys[3], value);
-      apache::geode::client::millisleep(10);
+      std::this_thread::sleep_for(std::chrono::milliseconds(10));
       createIntEntry(regionNames[1], keys[0], value);
-      apache::geode::client::millisleep(10);
+      std::this_thread::sleep_for(std::chrono::milliseconds(10));
       createIntEntry(regionNames[1], keys[1], value);
-      apache::geode::client::millisleep(10);
+      std::this_thread::sleep_for(std::chrono::milliseconds(10));
       createIntEntry(regionNames[1], keys[2], value);
-      apache::geode::client::millisleep(10);
+      std::this_thread::sleep_for(std::chrono::milliseconds(10));
       createIntEntry(regionNames[1], keys[3], value);
-      apache::geode::client::millisleep(10);
+      std::this_thread::sleep_for(std::chrono::milliseconds(10));
     }
   }
 END_TASK_DEFINITION
@@ -515,8 +517,8 @@ END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT2, VerifyClient2Entries)
   {
-    apache::geode::client::millisleep(
-        30000);  // wait 30 sec for notifications to complete
+    // wait 30 sec for notifications to complete
+    std::this_thread::sleep_for(std::chrono::seconds(30));
 
     verifyIntEntry(regionNames[0], keys[0], 100);
     verifyIntEntry(regionNames[0], keys[1], 100);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/integration-test/testThinClientHAPeriodicAck.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/testThinClientHAPeriodicAck.cpp b/src/cppcache/integration-test/testThinClientHAPeriodicAck.cpp
index 6b4a82a..0ae6a40 100644
--- a/src/cppcache/integration-test/testThinClientHAPeriodicAck.cpp
+++ b/src/cppcache/integration-test/testThinClientHAPeriodicAck.cpp
@@ -20,6 +20,8 @@
 
 #include <ace/OS.h>
 #include <string>
+#include <thread>
+#include <chrono>
 
 #define ROOT_NAME "testThinClientHAPeriodicAck"
 #define ROOT_SCOPE DISTRIBUTED_ACK
@@ -489,21 +491,21 @@ DUNIT_TASK_DEFINITION(CLIENT1, CreateEntries)
   {
     for (int value = 1; value <= 100; value++) {
       createIntEntry(regionNames[0], keys[0], value);
-      apache::geode::client::millisleep(50);
+      std::this_thread::sleep_for(std::chrono::milliseconds(50));
       createIntEntry(regionNames[0], keys[1], value);
-      apache::geode::client::millisleep(50);
+      std::this_thread::sleep_for(std::chrono::milliseconds(50));
       createIntEntry(regionNames[0], keys[2], value);
-      apache::geode::client::millisleep(50);
+      std::this_thread::sleep_for(std::chrono::milliseconds(50));
       createIntEntry(regionNames[0], keys[3], value);
-      apache::geode::client::millisleep(50);
+      std::this_thread::sleep_for(std::chrono::milliseconds(50));
       createIntEntry(regionNames[1], keys[0], value);
-      apache::geode::client::millisleep(50);
+      std::this_thread::sleep_for(std::chrono::milliseconds(50));
       createIntEntry(regionNames[1], keys[1], value);
-      apache::geode::client::millisleep(50);
+      std::this_thread::sleep_for(std::chrono::milliseconds(50));
       createIntEntry(regionNames[1], keys[2], value);
-      apache::geode::client::millisleep(50);
+      std::this_thread::sleep_for(std::chrono::milliseconds(50));
       createIntEntry(regionNames[1], keys[3], value);
-      apache::geode::client::millisleep(50);
+      std::this_thread::sleep_for(std::chrono::milliseconds(50));
     }
   }
 END_TASK_DEFINITION

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/src/EvictionController.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/EvictionController.cpp b/src/cppcache/src/EvictionController.cpp
index dada43f..24da390 100644
--- a/src/cppcache/src/EvictionController.cpp
+++ b/src/cppcache/src/EvictionController.cpp
@@ -23,7 +23,9 @@
 #include "ReadWriteLock.hpp"
 #include <string>
 
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
 
 const char* EvictionController::NC_EC_Thread = "NC EC Thread";
 EvictionController::EvictionController(size_t maxHeapSize,
@@ -54,7 +56,7 @@ int EvictionController::svc() {
   int64_t pendingEvictions = 0;
   while (m_run) {
     int64_t readInfo = 0;
-    readInfo = (int64_t)m_queue.get(1500);
+    readInfo = m_queue.get(1500);
     if (readInfo == 0) continue;
 
     processHeapInfo(readInfo, pendingEvictions);
@@ -62,7 +64,7 @@ int EvictionController::svc() {
   int32_t size = m_queue.size();
   for (int i = 0; i < size; i++) {
     int64_t readInfo = 0;
-    readInfo = (int64_t)m_queue.get();
+    readInfo = m_queue.get();
     if (readInfo == 0) continue;
     processHeapInfo(readInfo, pendingEvictions);
   }
@@ -104,8 +106,6 @@ void EvictionController::processHeapInfo(int64_t& readInfo,
     pendingEvictions += bytesToEvict;
     if (evictionPercentage > 100) evictionPercentage = 100;
     orderEvictions(evictionPercentage);
-    // Sleep for 10 seconds to allow the evictions to catch up
-    //   apache::geode::client::millisleep(10);  //taken this out for now
   }
 }
 
@@ -120,7 +120,7 @@ void EvictionController::deregisterRegion(std::string& name) {
   // Iterate over regions vector and remove the one that we need to remove
   WriteGuard guard(m_regionLock);
   for (size_t i = 0; i < m_regions.size(); i++) {
-    std::string str = (std::string)m_regions.at(i);
+    std::string str = m_regions.at(i);
     if (str == name) {
       std::vector<std::string>::iterator iter = m_regions.begin();
       m_regions.erase(iter + i);
@@ -149,12 +149,12 @@ void EvictionController::evict(int32_t percentage) {
   {
     ReadGuard guard(m_regionLock);
     for (size_t i = 0; i < m_regions.size(); i++) {
-      regionTmpVector.push_back((std::string)m_regions.at(i));
+      regionTmpVector.push_back(m_regions.at(i));
     }
   }
 
   for (size_t i = 0; i < regionTmpVector.size(); i++) {
-    std::string str = (std::string)regionTmpVector.at(i);
+    std::string str = regionTmpVector.at(i);
     RegionPtr rptr;
     m_cacheImpl->getRegion(str.c_str(), rptr);
     if (rptr != NULLPTR) {
@@ -165,3 +165,6 @@ void EvictionController::evict(int32_t percentage) {
     }
   }
 }
+}  // namespace client
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/src/LocalRegion.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LocalRegion.cpp b/src/cppcache/src/LocalRegion.cpp
index 5e61580..4fe4ab0 100644
--- a/src/cppcache/src/LocalRegion.cpp
+++ b/src/cppcache/src/LocalRegion.cpp
@@ -21,7 +21,6 @@
 #include "CacheImpl.hpp"
 #include "CacheRegionHelper.hpp"
 #include "CacheableToken.hpp"
-#include "NanoTimer.hpp"
 #include "Utils.hpp"
 
 #include "EntryExpiryHandler.hpp"
@@ -34,7 +33,9 @@
 #include <vector>
 #include <geode/PoolManager.hpp>
 
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
 
 LocalRegion::LocalRegion(const std::string& name, CacheImpl* cache,
                          RegionInternal* rPtr,
@@ -648,7 +649,7 @@ void LocalRegion::setRegionExpiryTask() {
     uint32_t duration = getRegionExpiryDuration();
     RegionExpiryHandler* handler =
         new RegionExpiryHandler(rptr, getRegionExpiryAction(), duration);
-    long expiryTaskId =
+    int64_t expiryTaskId =
         CacheImpl::expiryTaskManager->scheduleExpiryTask(handler, duration, 0);
     handler->setExpiryTaskId(expiryTaskId);
     LOGFINE(
@@ -667,7 +668,7 @@ void LocalRegion::registerEntryExpiryTask(MapEntryImplPtr& entry) {
   uint32_t duration = getEntryExpiryDuration();
   EntryExpiryHandler* handler =
       new EntryExpiryHandler(rptr, entry, getEntryExpirationAction(), duration);
-  long id =
+  int64_t id =
       CacheImpl::expiryTaskManager->scheduleExpiryTask(handler, duration, 0);
   if (Log::finestEnabled()) {
     CacheableKeyPtr key;
@@ -1034,9 +1035,6 @@ GfErrType LocalRegion::getAllNoThrow(const VectorOfCacheableKey& keys,
   return err;
 }
 
-namespace apache {
-namespace geode {
-namespace client {
 // encapsulates actions that need to be taken for a put() operation
 class PutActions {
  public:
@@ -1603,9 +1601,6 @@ class InvalidateActions {
  private:
   LocalRegion& m_region;
 };
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
 
 template <typename TAction>
 GfErrType LocalRegion::updateNoThrow(const CacheableKeyPtr& key,
@@ -3107,7 +3102,7 @@ void LocalRegion::evict(int32_t percentage) {
   if (m_released || m_destroyPending) return;
   if (m_entries != NULL) {
     int32_t size = m_entries->size();
-    int32_t entriesToEvict = (int32_t)(percentage * size) / 100;
+    int32_t entriesToEvict = (percentage * size) / 100;
     // only invoked from EvictionController so static_cast is always safe
     LRUEntriesMap* lruMap = static_cast<LRUEntriesMap*>(m_entries);
     LOGINFO("Evicting %d entries. Current entry count is %d", entriesToEvict,
@@ -3160,3 +3155,7 @@ CacheablePtr LocalRegion::handleReplay(GfErrType& err,
 }
 
 TombstoneListPtr LocalRegion::getTombstoneList() { return m_tombstoneList; }
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/src/Log.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/Log.cpp b/src/cppcache/src/Log.cpp
index 894f041..ce8d66b 100644
--- a/src/cppcache/src/Log.cpp
+++ b/src/cppcache/src/Log.cpp
@@ -21,6 +21,8 @@
 #include <string>
 #include <utility>
 #include <vector>
+#include <thread>
+#include <chrono>
 
 #include <ace/ACE.h>
 #include <ace/Guard_T.h>
@@ -370,7 +372,7 @@ void Log::init(LogLevel level, const char* logFileName, int32_t logFileLimit,
           break;
         }
         // continue after some sleep
-        apache::geode::client::millisleep(200);
+        std::this_thread::sleep_for(std::chrono::milliseconds(200));
       }
       /* (don't throw exception; try appending to existing file instead)
       if (renameResult < 0) {
@@ -435,7 +437,7 @@ void Log::writeBanner() {
       break;
     }
     // continue after some sleep
-    apache::geode::client::millisleep(200);
+    std::this_thread::sleep_for(std::chrono::milliseconds(200));
   }
   if (!g_log) {
     g_isLogFileOpened = false;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/src/NanoTimer.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/NanoTimer.cpp b/src/cppcache/src/NanoTimer.cpp
deleted file mode 100644
index 25ec2e4..0000000
--- a/src/cppcache/src/NanoTimer.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.
- */
-
-#include "NanoTimer.hpp"
-#include <ace/OS.h>
-#include <ace/Time_Value.h>
-#include <ace/High_Res_Timer.h>
-
-// @TODO: Make these actually nano granularity when possible.
-
-namespace apache {
-namespace geode {
-namespace client {
-
-int64_t NanoTimer::now() {
-  ACE_Time_Value now = ACE_High_Res_Timer::gettimeofday_hr();
-  return (now.sec() * 1000000000ll) /* convert secs to nanosecs */
-         + (now.usec() * 1000ll);   /* convert microsecs to nanosecs */
-}
-
-void NanoTimer::sleep(uint32_t nanos) {
-  timespec spec;
-  spec.tv_sec = 0L;
-  spec.tv_nsec = nanos;
-  timespec remaining;
-  remaining.tv_sec = 0L;
-  remaining.tv_nsec = 0L;
-  ACE_OS::nanosleep(&spec, &remaining);
-}
-
-void millisleep(uint32_t millis) {
-  time_t secs = millis / 1000;
-  suseconds_t usecs = (millis % 1000) * 1000;
-  ACE_Time_Value duration(secs, usecs);
-  ACE_OS::sleep(duration);
-}
-}  // namespace client
-}  // namespace geode
-}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/src/NanoTimer.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/NanoTimer.hpp b/src/cppcache/src/NanoTimer.hpp
deleted file mode 100644
index 8dbf4d8..0000000
--- a/src/cppcache/src/NanoTimer.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#pragma once
-
-#ifndef GEODE_NANOTIMER_H_
-#define GEODE_NANOTIMER_H_
-
-/*
- * 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.
- */
-
-#include <geode/geode_globals.hpp>
-
-namespace apache {
-namespace geode {
-namespace client {
-
-class CPPCACHE_EXPORT NanoTimer {
- public:
-  static int64_t now();
-
-  static void sleep(uint32_t nanos);
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_NANOTIMER_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/src/TcrConnectionManager.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcrConnectionManager.cpp b/src/cppcache/src/TcrConnectionManager.cpp
index 67d7d01..a16482b 100644
--- a/src/cppcache/src/TcrConnectionManager.cpp
+++ b/src/cppcache/src/TcrConnectionManager.cpp
@@ -33,7 +33,12 @@
 #include "ServerLocation.hpp"
 #include <ace/INET_Addr.h>
 #include <set>
-using namespace apache::geode::client;
+#include <thread>
+#include <chrono>
+
+namespace apache {
+namespace geode {
+namespace client {
 volatile bool TcrConnectionManager::isNetDown = false;
 volatile bool TcrConnectionManager::TEST_DURABLE_CLIENT_CRASH = false;
 
@@ -475,7 +480,7 @@ void TcrConnectionManager::netDown() {
   isNetDown = true;
 
   //  sleep for 15 seconds to allow ping and redundancy threads to pause.
-  apache::geode::client::millisleep(15000);
+  std::this_thread::sleep_for(std::chrono::seconds(15));
 
   {
     ACE_Guard<ACE_Recursive_Thread_Mutex> guard(m_endpoints.mutex());
@@ -498,7 +503,7 @@ void TcrConnectionManager::revive() {
 
   //  sleep for 15 seconds to allow redundancy thread to reestablish
   //  connections.
-  apache::geode::client::millisleep(15000);
+  std::this_thread::sleep_for(std::chrono::seconds(15));
 }
 
 int TcrConnectionManager::redundancy(volatile bool &isRunning) {
@@ -601,3 +606,6 @@ GfErrType TcrConnectionManager::sendSyncRequestRegisterInterest(
   return m_redundancyManager->sendSyncRequestRegisterInterest(
       request, reply, attemptFailover, endpoint, theHADM, region);
 }
+}  // namespace client
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/src/TcrEndpoint.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcrEndpoint.cpp b/src/cppcache/src/TcrEndpoint.cpp
index cfe0900..eed827e 100644
--- a/src/cppcache/src/TcrEndpoint.cpp
+++ b/src/cppcache/src/TcrEndpoint.cpp
@@ -24,7 +24,13 @@
 #include "Utils.hpp"
 #include "DistributedSystemImpl.hpp"
 
-using namespace apache::geode::client;
+#include <thread>
+#include <chrono>
+
+namespace apache {
+namespace geode {
+namespace client {
+
 #define throwException(ex)                              \
   {                                                     \
     LOGFINEST("%s: %s", ex.getName(), ex.getMessage()); \
@@ -236,7 +242,7 @@ GfErrType TcrEndpoint::createNewConnection(
       LOGINFO("Timeout in handshake with endpoint[%s]", m_name.c_str());
       err = GF_TIMOUT;
       m_needToConnectInLock = true;  // while creating the connection
-      apache::geode::client::millisleep(50);
+      std::this_thread::sleep_for(std::chrono::milliseconds(50));
     } catch (const GeodeIOException& ex) {
       LOGINFO("IO error[%d] in handshake with endpoint[%s]: %s",
               ACE_OS::last_error(), m_name.c_str(), ex.getMessage());
@@ -774,7 +780,7 @@ inline bool TcrEndpoint::handleIOException(const std::string& message,
     m_needToConnectInLock = true;
     return false;
   }
-  apache::geode::client::millisleep(10);
+  std::this_thread::sleep_for(std::chrono::milliseconds(10));
   return true;
 }
 
@@ -987,7 +993,7 @@ GfErrType TcrEndpoint::sendRequestWithRetry(
         connection only when not a sticky connection.
           closeConnection( conn );
         }*/
-        apache::geode::client::millisleep(10);
+        std::this_thread::sleep_for(std::chrono::milliseconds(10));
         int32_t type = request.getMessageType();
         epFailure = (type != TcrMessage::QUERY && type != TcrMessage::PUTALL &&
                      type != TcrMessage::PUT_ALL_WITH_CALLBACK &&
@@ -1334,3 +1340,7 @@ void TcrEndpoint::sendRequestForChunkedResponse(const TcrMessage& request,
 void TcrEndpoint::closeFailedConnection(TcrConnection*& conn) {
   closeConnection(conn);
 }
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/src/Utils.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/Utils.cpp b/src/cppcache/src/Utils.cpp
index ac3449a..e954f6c 100644
--- a/src/cppcache/src/Utils.cpp
+++ b/src/cppcache/src/Utils.cpp
@@ -17,13 +17,14 @@
 
 #include "Utils.hpp"
 #include "ace/OS.h"
-#include "NanoTimer.hpp"
 #include <ace/Recursive_Thread_Mutex.h>
 #include <ace/INET_Addr.h>
 #include <cstdio>
 #include <chrono>
 
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
 
 #ifdef _WIN32
 
@@ -289,3 +290,7 @@ int32_t Utils::logWideString(char* buf, size_t maxLen, const wchar_t* wStr) {
     return ACE_OS::snprintf(buf, maxLen, "null");
   }
 }
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/src/Utils.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/Utils.hpp b/src/cppcache/src/Utils.hpp
index b95c7e8..2cc1473 100644
--- a/src/cppcache/src/Utils.hpp
+++ b/src/cppcache/src/Utils.hpp
@@ -29,7 +29,6 @@
 #include <geode/ExceptionTypes.hpp>
 #include <geode/CacheableString.hpp>
 #include <geode/DataOutput.hpp>
-#include "NanoTimer.hpp"
 #include <geode/statistics/Statistics.hpp>
 #include <geode/SystemProperties.hpp>
 #include <geode/DistributedSystem.hpp>

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/cppcache/test/NanoTimerTest.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/test/NanoTimerTest.cpp b/src/cppcache/test/NanoTimerTest.cpp
deleted file mode 100644
index 7c10ab5..0000000
--- a/src/cppcache/test/NanoTimerTest.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.
- */
-
-#include <gtest/gtest.h>
-
-#include <NanoTimer.hpp>
-
-using namespace apache::geode::client;
-
-TEST(NanoTimerTest, ValidateSleep) {
-  const int64_t before = NanoTimer::now();
-  NanoTimer::sleep(3000000UL /* nano-seconds */);
-  const int64_t after = NanoTimer::now();
-  EXPECT_LE(3000000L /* nano-seconds */, (after - before))
-      << "Slept at least three milli-seconds";
-}

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e0145ace/src/quickstart/cpp/DurableClient.cpp
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/DurableClient.cpp b/src/quickstart/cpp/DurableClient.cpp
index 909172a..b406237 100644
--- a/src/quickstart/cpp/DurableClient.cpp
+++ b/src/quickstart/cpp/DurableClient.cpp
@@ -83,7 +83,7 @@ void RunDurableClient() {
   LOGINFO("Sent ReadyForEvents message to server");
 
   // wait for some time to recieve events
-  apache::geode::client::millisleep(1000);
+  std::this_thread::sleep_for(std::chrono::seconds(1));
 
   // Close the Geode Cache with keepalive = true.  Server will queue events
   // for


[10/34] geode-native git commit: GEODE-2513 Unbrand docs section Installing the SQLite Persistence Manager

Posted by jb...@apache.org.
GEODE-2513 Unbrand docs section Installing the SQLite
Persistence Manager


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

Branch: refs/heads/feature/GEODE-2602
Commit: 1300b48d7ab20e93dd83d6813b790efeee3f1d89
Parents: f46469a
Author: Karen Miller <km...@pivotal.io>
Authored: Tue Mar 14 15:45:32 2017 -0700
Committer: Karen Miller <km...@pivotal.io>
Committed: Tue Mar 14 15:45:32 2017 -0700

----------------------------------------------------------------------
 .../sqlite-persistence/chapter_overview.html.md.erb    |  8 ++++----
 .../sqlite-persistence/linux_install.html.md.erb       | 11 ++++++-----
 .../sqlite-persistence/solaris_install.html.md.erb     | 11 ++++++-----
 .../sqlite-persistence/windows_install.html.md.erb     | 13 +++++++------
 4 files changed, 23 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/1300b48d/docs/geode-native-docs/sqlite-persistence/chapter_overview.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/sqlite-persistence/chapter_overview.html.md.erb b/docs/geode-native-docs/sqlite-persistence/chapter_overview.html.md.erb
index c9ba431..42c36e1 100644
--- a/docs/geode-native-docs/sqlite-persistence/chapter_overview.html.md.erb
+++ b/docs/geode-native-docs/sqlite-persistence/chapter_overview.html.md.erb
@@ -21,18 +21,18 @@ limitations under the License.
 
 This section describes how to download, build and install the SQLite database libraries for use with disk overflow.
 
-See [PersistenceManager](../client-cache/persistence-manager.html#persistence-manager) for additional information about the SQLite database libraries.
+See [Persistence Manager](../client-cache/persistence-manager.html#persistence-manager) for additional information about the SQLite database libraries.
 
 -   **[Linux Installation](linux_install.html)**
 
-    This topic describes how to install the SQLite Persistence Manager on Linux for use with the Geode native client.
+    This topic describes how to install the SQLite Persistence Manager on Linux.
 
 -   **[Solaris Installation](solaris_install.html)**
 
-    This topic describes how to install the SQLite Persistence Manager on Solaris for use with the Geode native client.
+    This topic describes how to install the SQLite Persistence Manager on Solaris.
 
 -   **[Windows Installation](windows_install.html)**
 
-    This topic describes how to install the SQLite Persistence Manager on Windows for use with the Geode native client.
+    This topic describes how to install the SQLite Persistence Manager on Windows.
 
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1300b48d/docs/geode-native-docs/sqlite-persistence/linux_install.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/sqlite-persistence/linux_install.html.md.erb b/docs/geode-native-docs/sqlite-persistence/linux_install.html.md.erb
index 40db0b1..99364c1 100644
--- a/docs/geode-native-docs/sqlite-persistence/linux_install.html.md.erb
+++ b/docs/geode-native-docs/sqlite-persistence/linux_install.html.md.erb
@@ -19,20 +19,21 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-This topic describes how to install the SQLite Persistence Manager on Linux for use with the Geode native client.
+This topic describes how to install the SQLite Persistence Manager on Linux.
 
-The <code>_product-dir_</code> directory refers to the path to the native client product directory.
+The <code>_product-dir_</code> directory refers to the path to the directory
+that contains the built library.
 
 The following libraries must be present in the runtime linking path:
 
 -   `libSqLiteImpl.so` is provided in <code>_product-dir_/lib</code>, so it is already present in the runtime linking path.
 -   `libsqlite3.so` is the SQLite Library. You need to create this library and make available in the runtime linking path, or copied to <code>_product-dir_/lib</code>, as described below.
 
-The Geode Native Client has been tested with SQLite v3.7.14.1.
+The library has been tested with SQLite v3.7.14.1.
 
 ## <a id="concept_CC9BD47B46DE4281BBB789FABE6ABEA9__section_FAB703D706D54311963399A714D466F9" class="no-quick-link"></a>Downloading, Building and Installing the Library
 
-You create the SQLite database library by downloading the latest .zip file and compiling the source code.
+Create the SQLite database library by downloading the latest .zip file and compiling the source code.
 
 1.  Download the source code `sqlite-autoconf-NNNNNNN.tar.gz` file (where *NNNNNNN* corresponds to the version) for SQLite v3.7.14.1 or later from [http://www.sqlite.org/download.html](http://www.sqlite.org/download.html).
 2.  Extract the source code from the .tar.gz file. For example:
@@ -54,6 +55,6 @@ You create the SQLite database library by downloading the latest .zip file and c
             ./configure --prefix=/_desired-binary-location_/sqlite-binaries
             </code>
 
-    2.  Run `gmake install` as described in the build instructions. The libraries will be available in the `sqlite-binaries` directory that you specified.
+    2.  Run `gmake install` as described in the build instructions. The libraries will be available in the `sqlite-binaries` directory specified.
 
 4.  Copy <code>/_desired-binary-location_/sqlite-binaries/lib/libsqlite3.so</code> file to <code>_product-dir_/lib</code>.

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1300b48d/docs/geode-native-docs/sqlite-persistence/solaris_install.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/sqlite-persistence/solaris_install.html.md.erb b/docs/geode-native-docs/sqlite-persistence/solaris_install.html.md.erb
index 56853b5..7260030 100644
--- a/docs/geode-native-docs/sqlite-persistence/solaris_install.html.md.erb
+++ b/docs/geode-native-docs/sqlite-persistence/solaris_install.html.md.erb
@@ -19,20 +19,21 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-This topic describes how to install the SQLite Persistence Manager on Solaris for use with the Geode native client.
+This topic describes how to install the SQLite Persistence Manager on Solaris.
 
-The *`product-dir`* directory refers to the path to the native client product directory.
+The *`product-dir`* directory refers to the path to the directory
+that contains the built library.
 
 The following libraries must be present in the runtime linking path:
 
 -   `libSqLiteImpl.so` is provided in <code><i>product-dir</i>/lib</code>, so it is already present in the runtime linking path.
 -   `libsqlite3.so` is the SQLite Library. You need to create this library and make available in the runtime linking path, or copied to <code><i>product-dir</i>/lib</code>, as described below.
 
-The Geode Native Client has been tested with SQLite v3.7.14.1.
+The library has been tested with SQLite v3.7.14.1.
 
 ## <a id="concept_613BCAD15D9C4B3C94BBA3C1A26B6166__section_FAB703D706D54311963399A714D466F9" class="no-quick-link"></a>Downloading, Building, and Installing the Library
 
-You create the SQLite database library by downloading the latest .zip file and compiling the source code.
+Create the SQLite database library by downloading the latest .zip file and compiling the source code.
 
 1.  Download the source code `sqlite-autoconf-NNNNNNN.tar.gz` file (where *NNNNNNN* corresponds to the version) for SQLite v3.7.14.1 or later from [http://www.sqlite.org/download.html](http://www.sqlite.org/download.html).
 2.  Update your PATH environment variable to include the location of the Solaris `ar` command.
@@ -66,6 +67,6 @@ You create the SQLite database library by downloading the latest .zip file and c
             CC=cc CFLAGS="-xarch=v9 -code=pic32" ./configure --prefix=/_desired-binary-location_/sqlite-binaries CFLAGS="-m64"
             </code>
 
-    2.  Run `gmake install`. The libraries will be available in the `sqlite-binaries` directory that you specified.
+    2.  Run `gmake install`. The libraries will be available in the `sqlite-binaries` directory specified.
 
 5.  Copy <code>/_desired-binary-location_/sqlite-binaries/lib/libsqlite3.so</code> file to <code><i>product-dir</i>/lib</code>.

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1300b48d/docs/geode-native-docs/sqlite-persistence/windows_install.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/sqlite-persistence/windows_install.html.md.erb b/docs/geode-native-docs/sqlite-persistence/windows_install.html.md.erb
index 0abea9b..02b86ff 100644
--- a/docs/geode-native-docs/sqlite-persistence/windows_install.html.md.erb
+++ b/docs/geode-native-docs/sqlite-persistence/windows_install.html.md.erb
@@ -19,15 +19,16 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-This topic describes how to install the SQLite Persistence Manager on Windows for use with the Geode native client.
+This topic describes how to install the SQLite Persistence Manager on Windows.
 
-The Geode Native Client has been tested with SQLite v3.7.14.1.
+The library has been tested with SQLite v3.7.14.1.
 
-The <code><i>product-dir</i></code> directory refers to the native client product directory path.
+The *`product-dir`* directory refers to the path to the directory
+that contains the built library.
 
 The following libraries are required. The <code><i>product-dir</i>/bin</code> directory containing these libraries must be present in the Windows `PATH` environment variable, and that directory is added to `PATH` during the Geode product installation.
 
--   The `sqliteimpl.dll` and `GemStone.GemFire.Plugins.SQLite.dll` files are provided in <code><i>product-dir</i>/bin</code>.
+-   The `sqliteimpl.dll` and `Apache.Geode.Plugins.SQLite.dll` files are provided in <code><i>product-dir</i>/bin</code>.
 -   For .NET C\# native client application development, you need to obtain the `System.Data.SQLite.dll` SQLite library, as described below. The library can be copied to <code><i>product-dir</i>/bin</code>.
 -   For C++ native client application development, you need the `SqLite3.dll` SQLite Library. You create this library and make it available in the runtime linking path, or copied to <code><i>product-dir</i>/bin</code>, as described below.
 
@@ -40,7 +41,7 @@ If you are writing native client applications using the .NET caching API, obtain
     -   For 64-bit Windows, under **Precompiled Binaries for 64-bit Windows (.NET Framework 4.5.1)** download `sqlite-netFx451-binary-bundle-x64-2013-1.0.101.0.zip`.
 
 3.  Execute the setup .exe file, and follow the prompts in the installation wizard. Accept all default installation options.
-4.  Copy the `C:\Program                         Files\System.Data.SQLite\2010\bin\System.Data.SQLite.dll` file to your Geode Native Client distribution at <code>_product-dir_\bin</code>.
+4.  Copy the `C:\Program                         Files\System.Data.SQLite\2010\bin\System.Data.SQLite.dll` file to your distribution at <code>_product-dir_\bin</code>.
 
 ## <a id="concept_E097592856274EFABE81426FF7312294__section_FAB703D706D54311963399A714D466F9" class="no-quick-link"></a>Downloading, Building, and Installing the Library
 
@@ -51,4 +52,4 @@ If you are writing native client applications using the C++ caching API, you nee
 3.  Using Visual Studio, build the version-specific SqLite solution either as a release or debug build:
     -   If you are using 64-bit Windows, use the x64 configuration.
 
-4.  From the built files, copy the `SqLite3.dll` file to your Geode Native Client distribution at <code><i>product-dir</i>/bin</code>.
+4.  From the built files, copy the `SqLite3.dll` file to your distribution at <code><i>product-dir</i>/bin</code>.


[33/34] geode-native git commit: GEODE-2552: Replaced NanoTimer with std::chrono.

Posted by jb...@apache.org.
GEODE-2552: Replaced NanoTimer with std::chrono.


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

Branch: refs/heads/feature/GEODE-2602
Commit: c0d0c2a2035d7b8241311fb018ff1f156352dc65
Parents: bb5d430
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Sat Feb 25 14:02:58 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:24 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/statistics/HostStatSampler.cpp |  7 +--
 src/cppcache/src/statistics/HostStatSampler.hpp |  8 ++-
 .../src/statistics/StatArchiveWriter.cpp        | 51 +++++++++++---------
 .../src/statistics/StatArchiveWriter.hpp        | 12 +++--
 4 files changed, 46 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0d0c2a2/src/cppcache/src/statistics/HostStatSampler.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/statistics/HostStatSampler.cpp b/src/cppcache/src/statistics/HostStatSampler.cpp
index ab3811b..c68a6c4 100644
--- a/src/cppcache/src/statistics/HostStatSampler.cpp
+++ b/src/cppcache/src/statistics/HostStatSampler.cpp
@@ -134,8 +134,7 @@ HostStatSampler::HostStatSampler(const char* filePath, int64_t sampleIntervalMs,
   m_archiver = NULL;
   m_samplerStats = new StatSamplerStats();
 
-  ACE_Time_Value startTimeValue = ACE_OS::gettimeofday();
-  m_startTime = startTimeValue.msec();
+  m_startTime = system_clock::now();
 
   m_pid = ACE_OS::getpid();
   m_statMngr = statMngr;
@@ -343,7 +342,9 @@ std::vector<Statistics*>& HostStatSampler::getNewStatistics() {
 
 int64_t HostStatSampler::getSystemId() { return m_pid; }
 
-int64_t HostStatSampler::getSystemStartTime() { return m_startTime; }
+system_clock::time_point HostStatSampler::getSystemStartTime() {
+  return m_startTime;
+}
 
 std::string HostStatSampler::getSystemDirectoryPath() {
   ACE_utsname u;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0d0c2a2/src/cppcache/src/statistics/HostStatSampler.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/statistics/HostStatSampler.hpp b/src/cppcache/src/statistics/HostStatSampler.hpp
index a393815..7723799 100644
--- a/src/cppcache/src/statistics/HostStatSampler.hpp
+++ b/src/cppcache/src/statistics/HostStatSampler.hpp
@@ -22,6 +22,7 @@
 
 #include <string>
 #include <vector>
+#include <chrono>
 #include <ace/Task.h>
 #include <ace/Recursive_Thread_Mutex.h>
 #include <geode/geode_globals.hpp>
@@ -50,6 +51,8 @@ namespace apache {
 namespace geode {
 namespace statistics {
 
+using std::chrono::system_clock;
+
 class StatArchiveWriter;
 class StatisticsManager;
 /**
@@ -145,7 +148,7 @@ class CPPCACHE_EXPORT HostStatSampler : public ACE_Task_Base,
   /**
    * Returns the time this sampler's system was started.
    */
-  int64_t getSystemStartTime();
+  system_clock::time_point getSystemStartTime();
   /**
    * Returns the path to this sampler's system directory; if it has one.
    */
@@ -212,7 +215,8 @@ class CPPCACHE_EXPORT HostStatSampler : public ACE_Task_Base,
   StatisticsManager* m_statMngr;
 
   int64_t m_pid;
-  int64_t m_startTime;
+  system_clock::time_point m_startTime;
+
   std::string initStatFileWithExt();
   /**
    * The archiveFile, after it exceeds archiveFileSizeLimit should be rolled

http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0d0c2a2/src/cppcache/src/statistics/StatArchiveWriter.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/statistics/StatArchiveWriter.cpp b/src/cppcache/src/statistics/StatArchiveWriter.cpp
index 7c0a42c..51950b6 100644
--- a/src/cppcache/src/statistics/StatArchiveWriter.cpp
+++ b/src/cppcache/src/statistics/StatArchiveWriter.cpp
@@ -26,10 +26,16 @@
 
 #include "StatArchiveWriter.hpp"
 #include "GeodeStatisticsFactory.hpp"
-#include <NanoTimer.hpp>
 
-using namespace apache::geode::client;
-using namespace apache::geode::statistics;
+namespace apache {
+namespace geode {
+namespace statistics {
+
+using std::chrono::steady_clock;
+using std::chrono::system_clock;
+using std::chrono::duration_cast;
+using std::chrono::milliseconds;
+using std::chrono::nanoseconds;
 
 // Constructor and Member functions of StatDataOutput class
 
@@ -320,20 +326,19 @@ StatArchiveWriter::StatArchiveWriter(std::string outfile,
   this->sampler = samplerArg;
 
   // write the time, system property etc.
-  this->previousTimeStamp = NanoTimer::now();
-  this->previousTimeStamp += NANOS_PER_MILLI / 2;
-  this->previousTimeStamp /= NANOS_PER_MILLI;
-  ACE_Time_Value now = ACE_OS::gettimeofday();
-  int64_t epochsec = now.sec();
-  int64_t initialDate = epochsec * 1000;
+  this->previousTimeStamp = steady_clock::now();
 
   this->dataBuffer->writeByte(HEADER_TOKEN);
   this->dataBuffer->writeByte(ARCHIVE_VERSION);
-  this->dataBuffer->writeLong(initialDate);
+  this->dataBuffer->writeLong(
+      duration_cast<milliseconds>(system_clock::now().time_since_epoch())
+          .count());
   int64_t sysId = sampler->getSystemId();
   this->dataBuffer->writeLong(sysId);
-  int64_t sysStartTime = sampler->getSystemStartTime();
-  this->dataBuffer->writeLong(sysStartTime);
+  this->dataBuffer->writeLong(
+      duration_cast<milliseconds>(
+          sampler->getSystemStartTime().time_since_epoch())
+          .count());
   int32_t tzOffset = ACE_OS::timezone();
   // offset in milli seconds
   tzOffset = tzOffset * -1 * 1000;
@@ -341,7 +346,7 @@ StatArchiveWriter::StatArchiveWriter(std::string outfile,
 
   struct tm *tm_val;
   time_t clock = ACE_OS::time();
-  tm_val = localtime(&clock);
+  tm_val = ACE_OS::localtime(&clock);
   char buf[512] = {0};
   ACE_OS::strftime(buf, sizeof(buf), "%Z", tm_val);
   std::string tzId(buf);
@@ -388,7 +393,7 @@ int64_t StatArchiveWriter::bytesWritten() { return bytesWrittenToFile; }
 
 int64_t StatArchiveWriter::getSampleSize() { return m_samplesize; }
 
-void StatArchiveWriter::sample(int64_t timeStamp) {
+void StatArchiveWriter::sample(const steady_clock::time_point &timeStamp) {
   ACE_Guard<ACE_Recursive_Thread_Mutex> guard(sampler->getStatListMutex());
   m_samplesize = dataBuffer->getBytesWritten();
 
@@ -407,10 +412,7 @@ void StatArchiveWriter::sample(int64_t timeStamp) {
   m_samplesize = dataBuffer->getBytesWritten() - m_samplesize;
 }
 
-void StatArchiveWriter::sample() {
-  int64_t timestamp = NanoTimer::now();
-  sample(timestamp);
-}
+void StatArchiveWriter::sample() { sample(steady_clock::now()); }
 
 void StatArchiveWriter::close() {
   sample();
@@ -511,13 +513,13 @@ void StatArchiveWriter::resampleResources() {
   }
 }
 
-void StatArchiveWriter::writeTimeStamp(int64_t timeStamp) {
-  timeStamp += NANOS_PER_MILLI / 2;
-  timeStamp /= NANOS_PER_MILLI;
-  int64_t delta = timeStamp - this->previousTimeStamp;
+void StatArchiveWriter::writeTimeStamp(
+    const steady_clock::time_point &timeStamp) {
+  int32_t delta =
+      duration_cast<milliseconds>(timeStamp - this->previousTimeStamp).count();
   if (delta > MAX_SHORT_TIMESTAMP) {
     dataBuffer->writeShort(static_cast<int16_t>(INT_TIMESTAMP_TOKEN));
-    dataBuffer->writeInt(static_cast<int32_t>(delta));
+    dataBuffer->writeInt(delta);
   } else {
     dataBuffer->writeShort(static_cast<uint16_t>(delta));
   }
@@ -614,3 +616,6 @@ void StatArchiveWriter::writeResourceInst(StatDataOutput *dataOut,
     dataOut->writeByte(static_cast<int8_t>(instId));
   }
 }
+}  // namespace statistics
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0d0c2a2/src/cppcache/src/statistics/StatArchiveWriter.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/statistics/StatArchiveWriter.hpp b/src/cppcache/src/statistics/StatArchiveWriter.hpp
index b41d8e7..f4158de 100644
--- a/src/cppcache/src/statistics/StatArchiveWriter.hpp
+++ b/src/cppcache/src/statistics/StatArchiveWriter.hpp
@@ -33,6 +33,7 @@
 #include <geode/Log.hpp>
 #include <geode/DataOutput.hpp>
 #include <NonCopyable.hpp>
+#include <chrono>
 
 using namespace apache::geode::client;
 
@@ -54,7 +55,6 @@ const int16_t ILLEGAL_RESOURCE_INST_ID_TOKEN = -1;
 const int32_t MAX_SHORT_RESOURCE_INST_ID = 65535;
 const int32_t MAX_SHORT_TIMESTAMP = 65534;
 const int32_t INT_TIMESTAMP_TOKEN = 65535;
-const int64_t NANOS_PER_MILLI = 1000000;
 
 /** @file
 */
@@ -62,6 +62,10 @@ const int64_t NANOS_PER_MILLI = 1000000;
 namespace apache {
 namespace geode {
 namespace statistics {
+
+using std::chrono::system_clock;
+using std::chrono::steady_clock;
+
 /**
  * Some of the classes which are used by the StatArchiveWriter Class
  * 1. StatDataOutput // Just a wrapper around DataOutput so that the number of
@@ -200,7 +204,7 @@ class CPPCACHE_EXPORT StatArchiveWriter {
  private:
   HostStatSampler *sampler;
   StatDataOutput *dataBuffer;
-  int64_t previousTimeStamp;
+  steady_clock::time_point previousTimeStamp;
   int32_t resourceTypeId;
   int32_t resourceInstId;
   int32_t statResourcesModCount;
@@ -215,7 +219,7 @@ class CPPCACHE_EXPORT StatArchiveWriter {
   void sampleResources();
   void resampleResources();
   void writeResourceInst(StatDataOutput *, int32_t);
-  void writeTimeStamp(int64_t timeStamp);
+  void writeTimeStamp(const steady_clock::time_point &timeStamp);
   void writeStatValue(StatisticDescriptor *f, int64_t v, DataOutput dataOut);
   ResourceType *getResourceType(Statistics *);
   bool resourceInstMapHas(Statistics *sp);
@@ -232,7 +236,7 @@ class CPPCACHE_EXPORT StatArchiveWriter {
    * Archives a sample snapshot at the given timeStamp.
    * @param timeStamp a value obtained using NanoTimer::now.
    */
-  void sample(int64_t timeStamp);
+  void sample(const steady_clock::time_point &timeStamp);
   /**
    * Archives a sample snapshot at the current time.
    */


[29/34] geode-native git commit: GEODE-2494: Reverts conversion to pointer from ref.

Posted by jb...@apache.org.
GEODE-2494: Reverts conversion to pointer from ref.


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

Branch: refs/heads/feature/GEODE-2602
Commit: c6a23f3c7befa6b5d968c4f577759654d88ea05f
Parents: 3dd36d6
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Tue Feb 28 08:39:16 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:23 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/LRUList.cpp | 8 ++++----
 src/cppcache/src/LRUList.hpp | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/c6a23f3c/src/cppcache/src/LRUList.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUList.cpp b/src/cppcache/src/LRUList.cpp
index 00879c9..92b32f9 100644
--- a/src/cppcache/src/LRUList.cpp
+++ b/src/cppcache/src/LRUList.cpp
@@ -72,7 +72,7 @@ void LRUList<TEntry, TCreateEntry>::getLRUEntry(LRUListEntryPtr& result) {
   bool isLast = false;
   LRUListNode* aNode;
   while (true) {
-    aNode = getHeadNode(&isLast);
+    aNode = getHeadNode(isLast);
     if (aNode == nullptr) {
       result = NULLPTR;
       break;
@@ -102,7 +102,7 @@ void LRUList<TEntry, TCreateEntry>::getLRUEntry(LRUListEntryPtr& result) {
 
 template <typename TEntry, typename TCreateEntry>
 typename LRUList<TEntry, TCreateEntry>::LRUListNode*
-LRUList<TEntry, TCreateEntry>::getHeadNode(bool* isLast) {
+LRUList<TEntry, TCreateEntry>::getHeadNode(bool& isLast) {
   std::lock_guard<spinlock_mutex> lk(m_headLock);
 
   LRUListNode* result = m_headNode;
@@ -114,7 +114,7 @@ LRUList<TEntry, TCreateEntry>::getHeadNode(bool* isLast) {
     nextNode = m_headNode->getNextLRUListNode();
     if (nextNode == nullptr) {
       // last one in the list...
-      *isLast = true;
+      isLast = true;
       LRUListEntryPtr entry;
       result->getEntry(entry);
       if (entry->getLRUProperties().testEvicted()) {
@@ -127,7 +127,7 @@ LRUList<TEntry, TCreateEntry>::getHeadNode(bool* isLast) {
     }
   }
 
-  *isLast = false;
+  isLast = false;
   // advance head node, and return old value.
   m_headNode = nextNode;
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/c6a23f3c/src/cppcache/src/LRUList.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUList.hpp b/src/cppcache/src/LRUList.hpp
index 0364ac6..2db5a09 100644
--- a/src/cppcache/src/LRUList.hpp
+++ b/src/cppcache/src/LRUList.hpp
@@ -141,7 +141,7 @@ class LRUList {
    * @brief return the head entry in the list,
    * and removing it from the list.
    */
-  LRUListNode* getHeadNode(bool* isLast);
+  LRUListNode* getHeadNode(bool& isLast);
 
   spinlock_mutex m_headLock;
   spinlock_mutex m_tailLock;


[20/34] geode-native git commit: GEODE-2494: Replace SpinLock with spinlock_mutex.

Posted by jb...@apache.org.
GEODE-2494: Replace SpinLock with spinlock_mutex.

- Cleanup C++ standards.


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

Branch: refs/heads/feature/GEODE-2602
Commit: bee14556112a56fa142cf9dca3cf2c74881797d4
Parents: 12cb7c9
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Tue Feb 21 22:14:50 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:23 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/SerializationRegistry.cpp | 51 +++++++++++++------------
 src/cppcache/src/SerializationRegistry.hpp |  2 +-
 2 files changed, 28 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/bee14556/src/cppcache/src/SerializationRegistry.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/SerializationRegistry.cpp b/src/cppcache/src/SerializationRegistry.cpp
index e7f7c27..d0c5917 100644
--- a/src/cppcache/src/SerializationRegistry.cpp
+++ b/src/cppcache/src/SerializationRegistry.cpp
@@ -33,7 +33,6 @@
 #include "EventId.hpp"
 #include <geode/Properties.hpp>
 #include <geode/ExceptionTypes.hpp>
-#include "SpinLock.hpp"
 #include <geode/RegionAttributes.hpp>
 #include "CacheableObjectPartList.hpp"
 #include "ClientConnectionResponse.hpp"
@@ -59,6 +58,9 @@
 
 #include "NonCopyable.hpp"
 
+#include <mutex>
+#include "util/concurrent/spinlock_mutex.hpp"
+
 namespace apache {
 namespace geode {
 namespace client {
@@ -81,9 +83,9 @@ class TheTypeMap : private NonCopyable, private NonAssignable {
   IdToFactoryMap* m_map;
   IdToFactoryMap* m_map2;  // to hold Fixed IDs since GFE 5.7.
   StrToPdxFactoryMap* m_pdxTypemap;
-  SpinLock m_mapLock;
-  SpinLock m_map2Lock;
-  SpinLock m_pdxTypemapLock;
+  spinlock_mutex m_mapLock;
+  spinlock_mutex m_map2Lock;
+  spinlock_mutex m_pdxTypemapLock;
 
  public:
   TheTypeMap();
@@ -166,29 +168,29 @@ class TheTypeMap : private NonCopyable, private NonAssignable {
   }
 
   inline void clear() {
-    SpinLockGuard guard(m_mapLock);
+    std::lock_guard<spinlock_mutex> guard(m_mapLock);
     m_map->unbind_all();
 
-    SpinLockGuard guard2(m_map2Lock);
+    std::lock_guard<spinlock_mutex> guard2(m_map2Lock);
     m_map2->unbind_all();
 
-    SpinLockGuard guard3(m_pdxTypemapLock);
+    std::lock_guard<spinlock_mutex> guard3(m_pdxTypemapLock);
     m_pdxTypemap->unbind_all();
   }
 
   inline void find(int64_t id, TypeFactoryMethod& func) {
-    SpinLockGuard guard(m_mapLock);
+    std::lock_guard<spinlock_mutex> guard(m_mapLock);
     m_map->find(id, func);
   }
 
   inline void find2(int64_t id, TypeFactoryMethod& func) {
-    SpinLockGuard guard(m_map2Lock);
+    std::lock_guard<spinlock_mutex> guard(m_map2Lock);
     m_map2->find(id, func);
   }
 
   inline void bind(TypeFactoryMethod func) {
     Serializable* obj = func();
-    SpinLockGuard guard(m_mapLock);
+    std::lock_guard<spinlock_mutex> guard(m_mapLock);
     int64_t compId = static_cast<int64_t>(obj->typeId());
     if (compId == GeodeTypeIdsImpl::CacheableUserData ||
         compId == GeodeTypeIdsImpl::CacheableUserData2 ||
@@ -217,7 +219,7 @@ class TheTypeMap : private NonCopyable, private NonAssignable {
   }
 
   inline void rebind(int64_t compId, TypeFactoryMethod func) {
-    SpinLockGuard guard(m_mapLock);
+    std::lock_guard<spinlock_mutex> guard(m_mapLock);
     int bindRes = m_map->rebind(compId, func);
     if (bindRes == -1) {
       LOGERROR(
@@ -231,13 +233,13 @@ class TheTypeMap : private NonCopyable, private NonAssignable {
   }
 
   inline void unbind(int64_t compId) {
-    SpinLockGuard guard(m_mapLock);
+    std::lock_guard<spinlock_mutex> guard(m_mapLock);
     m_map->unbind(compId);
   }
 
   inline void bind2(TypeFactoryMethod func) {
     Serializable* obj = func();
-    SpinLockGuard guard(m_map2Lock);
+    std::lock_guard<spinlock_mutex> guard(m_map2Lock);
     int8_t dsfid = obj->DSFID();
 
     int64_t compId = 0;
@@ -268,18 +270,18 @@ class TheTypeMap : private NonCopyable, private NonAssignable {
   }
 
   inline void rebind2(int64_t compId, TypeFactoryMethod func) {
-    SpinLockGuard guard(m_map2Lock);
+    std::lock_guard<spinlock_mutex> guard(m_map2Lock);
     m_map2->rebind(compId, func);
   }
 
   inline void unbind2(int64_t compId) {
-    SpinLockGuard guard(m_map2Lock);
+    std::lock_guard<spinlock_mutex> guard(m_map2Lock);
     m_map2->unbind(compId);
   }
 
   inline void bindPdxType(TypeFactoryMethodPdx func) {
     PdxSerializable* obj = func();
-    SpinLockGuard guard(m_pdxTypemapLock);
+    std::lock_guard<spinlock_mutex> guard(m_pdxTypemapLock);
     const char* objFullName = obj->getClassName();
 
     int bindRes = m_pdxTypemap->bind(objFullName, func);
@@ -302,13 +304,14 @@ class TheTypeMap : private NonCopyable, private NonAssignable {
     }
   }
 
-  inline void findPdxType(char* objFullName, TypeFactoryMethodPdx& func) {
-    SpinLockGuard guard(m_pdxTypemapLock);
+  inline void findPdxType(const char* objFullName, TypeFactoryMethodPdx& func) {
+    std::lock_guard<spinlock_mutex> guard(m_pdxTypemapLock);
     m_pdxTypemap->find(objFullName, func);
   }
 
-  inline void rebindPdxType(char* objFullName, TypeFactoryMethodPdx func) {
-    SpinLockGuard guard(m_pdxTypemapLock);
+  inline void rebindPdxType(const char* objFullName,
+                            TypeFactoryMethodPdx func) {
+    std::lock_guard<spinlock_mutex> guard(m_pdxTypemapLock);
     int bindRes = m_pdxTypemap->rebind(objFullName, func);
     if (bindRes == -1) {
       LOGERROR(
@@ -321,8 +324,8 @@ class TheTypeMap : private NonCopyable, private NonAssignable {
     }
   }
 
-  inline void unbindPdxType(char* objFullName) {
-    SpinLockGuard guard(m_pdxTypemapLock);
+  inline void unbindPdxType(const char* objFullName) {
+    std::lock_guard<spinlock_mutex> guard(m_pdxTypemapLock);
     m_pdxTypemap->unbind(objFullName);
   }
 };
@@ -452,13 +455,13 @@ void SerializationRegistry::init() {
   theTypeMap::instance()->setup();
 }
 
-PdxSerializablePtr SerializationRegistry::getPdxType(char* className) {
+PdxSerializablePtr SerializationRegistry::getPdxType(const char* className) {
   TypeFactoryMethodPdx objectType = NULL;
   theTypeMap::instance()->findPdxType(className, objectType);
   PdxSerializablePtr pdxObj;
   if (objectType == NULL) {
     try {
-      pdxObj = new PdxWrapper((const char*)className);
+      pdxObj = new PdxWrapper(className);
     } catch (const Exception&) {
       LOGERROR(
           "Unregistered class %s during PDX deserialization: Did the "

http://git-wip-us.apache.org/repos/asf/geode-native/blob/bee14556/src/cppcache/src/SerializationRegistry.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/SerializationRegistry.hpp b/src/cppcache/src/SerializationRegistry.hpp
index 85783f7..14aec66 100644
--- a/src/cppcache/src/SerializationRegistry.hpp
+++ b/src/cppcache/src/SerializationRegistry.hpp
@@ -146,7 +146,7 @@ class CPPCACHE_EXPORT SerializationRegistry {
   static int32_t GetEnumValue(SerializablePtr enumInfo);
   static SerializablePtr GetEnum(int32_t val);
 
-  static PdxSerializablePtr getPdxType(char* className);
+  static PdxSerializablePtr getPdxType(const char* className);
 
  private:
   static PoolPtr getPool();


[03/34] geode-native git commit: GEODE-2603 Native client doc: Update SSL page

Posted by jb...@apache.org.
GEODE-2603 Native client doc: Update SSL page


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

Branch: refs/heads/feature/GEODE-2602
Commit: 1176deea39296e836ab86534d3ac52fb14872ec6
Parents: 06e8f39
Author: Dave Barnes <db...@pivotal.io>
Authored: Tue Mar 7 17:33:46 2017 -0800
Committer: Dave Barnes <db...@pivotal.io>
Committed: Tue Mar 7 17:33:46 2017 -0800

----------------------------------------------------------------------
 .../security/sslclientserver.html.md.erb        | 42 +++++++++++++-------
 1 file changed, 27 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/1176deea/docs/geode-native-docs/security/sslclientserver.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/security/sslclientserver.html.md.erb b/docs/geode-native-docs/security/sslclientserver.html.md.erb
index 6fd9ba7..89bb284 100644
--- a/docs/geode-native-docs/security/sslclientserver.html.md.erb
+++ b/docs/geode-native-docs/security/sslclientserver.html.md.erb
@@ -29,25 +29,36 @@ Follow these instructions to download and install OpenSSL for your specific oper
 
 The native client requires OpenSSL 1.0.1t or later. For Windows platforms, you can use either the regular or the OpenSSL 1.0.1t "Light" version.
 
-**Note:**
-If you use Cygwin, it is recommended that you do not use the OpenSSL library that comes with Cygwin because it is built with `cygwin.dll` as a dependency.
+**Note for Windows users:** If you use Cygwin, do not use the OpenSSL library that comes with
+Cygwin, which is built with `cygwin.dll` as a dependency. Instead, download a fresh copy from
+OpenSSL as described in the following section.
 
 ## Step 1. Download and install OpenSSL
 
-### <a id="security__section_5C95C2E4D9244B27BF8FD178E402D993" class="no-quick-link"></a>Linux
+To install OpenSSL:
 
-Download the OpenSSL tarball archive from the OpenSSL web site at [http://www.openssl.org/source/](http://www.openssl.org/source/). Copy the downloaded tarball file into `NativeClient_xxxx/templates/security/openssl/Linux` and run `buildit.sh`.
+1. Download the OpenSSL archive from the [OpenSSL web site](http://www.openssl.org/source/). 
 
-### <a id="security__section_93651F296C1A4EA5A3FA045EC15FB506" class="no-quick-link"></a>Solaris
+2. Extract the archive in a directory of your choice. For example:
 
-Download the OpenSSL tarball archive from the OpenSSL web site at [http://www.openssl.org/source/](http://www.openssl.org/source/). Copy the downloaded tarball file into `NativeClient_xxxx/templates/security/openssl/SunOS` and run `buildit.sh`.
-
-### <a id="security__section_68961A8829D44BFB8F542F3317464E5E" class="no-quick-link"></a>Windows
+    ```
+    $ tar xvzf openssl-1.0.1u.tar.gz
+    x openssl-1.0.1u/ACKNOWLEDGMENTS
+    x openssl-1.0.1u/apps/
+    x openssl-1.0.1u/apps/app_rand.c
+    ...
+    ```
 
-Download the installer for OpenSSL from [http://www.openssl.org/related/binaries.html](http://www.openssl.org/related/binaries.html). You can also use the OpenSSL "Light" version.
+3. Look in the top-level directory of the source distribution to identify the installation instructions for your operating system:
 
-Use the downloaded OpenSSL installer to install it on Windows. You can usually accept the default installation path (`C:\OpenSSL`).
+    ```
+    $ cd openssl-1.0.1u
+    $ ls INSTALL*
+    INSTALL        INSTALL.DJGPP      INSTALL.MacOS      INSTALL.NW        INSTALL.OS2
+    INSTALL.VMS    INSTALL.W32        INSTALL.W64        INSTALL.WCE
+    ```
 
+4. Build the OpenSSL library by following the instructions for your operating system.
 
 ## Step 2. Create keystores
 
@@ -75,7 +86,7 @@ Configure your system environment to build and run OpenSSL. Follow the environme
 <code>
 \> set GFCPP=_product-dir_<br />
 \> set OPENSSL=_path-to-installed-openssl_<br />
-\> set PATH=_path-to-jdk-or-jre_\bin;%GFCPP%\bin;%GFCPP%\ssl\_libs;%OPENSSL%\bin;%PATH%<br />
+\> set PATH=_jdk-or-jre-path_\bin;%GFCPP%\bin;%GFCPP%\ssl\_libs;%OPENSSL%\bin;%PATH%<br />
 \> set CLASSPATH=_path-to-gemfire-installation_\lib\gfSecurityImpl.jar;%CLASSPATH%
 </code>
 
@@ -88,16 +99,17 @@ Configure SSL properties.
 1.  In `gfcpp.properties`, set `ssl-enabled` to true and set `ssl-keystore` and `ssl-truststore` to point to your keystore files. See [Security-Related System Properties (gfcpp.properties)](security-systemprops.html#security) for a description of these properties.
 2.  On each locator, enable SSL and set the following SSL properties in the locator\u2019s `gemfire.properties` file:
 
-    ``` pre
+    ```
     ssl-enabled-components=server,locator
     ssl-protocols=any
     ssl-ciphers=SSL_RSA_WITH_NULL_SHA
     ```
+    Make sure your choice of cipher matches a cipher supported on the server.
 
+# Starting and stopping the client and server with SSL in place
 
-## Step 5. Start and stop the client and server
-
-Before you start and stop the client and server, make sure you configure the native client with the SSL properties as described and with the servers or locators specified as usual.
+Before you start and stop the client and server, make sure you configure the native client with the
+SSL properties as described and with the servers or locators specified as usual.
 
 Specifically, ensure that:
 


[14/34] geode-native git commit: GEODE-2494: Replaced spin lock protected counter with std::atomic.

Posted by jb...@apache.org.
GEODE-2494: Replaced spin lock protected counter with std::atomic.

- Cleanup C++11 standards.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 2e6a5bcc11166c7f5cddff39e16e9356bbc7825b
Parents: aa65990
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Wed Feb 15 23:33:21 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:22 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/EventId.cpp | 35 ++++++++++++++++-------------------
 1 file changed, 16 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/2e6a5bcc/src/cppcache/src/EventId.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/EventId.cpp b/src/cppcache/src/EventId.cpp
index a987b76..6f944a6 100644
--- a/src/cppcache/src/EventId.cpp
+++ b/src/cppcache/src/EventId.cpp
@@ -18,31 +18,29 @@
 #include "EventId.hpp"
 #include "GeodeTypeIdsImpl.hpp"
 #include "ClientProxyMembershipID.hpp"
-#include <ace/TSS_T.h>
 
-#include <ace/OS.h>
-#include <ace/INET_Addr.h>
+#include <cstring>
+#include <atomic>
 
 namespace apache {
 namespace geode {
 namespace client {
 
-// to be used only with ACE_TSS<> or WinTSS<>
 class EventIdTSS {
  private:
-  static SpinLock s_eidThrIdLock;
-  static int64_t s_eidThrId;
+  static std::atomic<int64_t> s_eidThrId;
 
   int64_t m_eidThrTSS;
   int64_t m_eidSeqTSS;
 
+  ~EventIdTSS() = default;
+  EventIdTSS(const EventIdTSS&) = delete;
+  EventIdTSS& operator=(const EventIdTSS&) = delete;
+
  public:
   // this should get called just once per thread due to first access to TSS
   EventIdTSS() {
-    {
-      SpinLockGuard _guard(s_eidThrIdLock);
-      m_eidThrTSS = ++s_eidThrId;
-    }
+    m_eidThrTSS = ++s_eidThrId;
     m_eidSeqTSS = 0;
   }
 
@@ -52,13 +50,12 @@ class EventIdTSS {
 
   inline int64_t getSeqNum() { return m_eidSeqTSS - 1; }
 
-  static ACE_TSS<EventIdTSS> s_eventId;
+  static thread_local EventIdTSS s_eventId;
 
 };  // class EventIdTSS
 
-SpinLock EventIdTSS::s_eidThrIdLock;
-int64_t EventIdTSS::s_eidThrId = 0;
-ACE_TSS<EventIdTSS> EventIdTSS::s_eventId;
+std::atomic<int64_t> EventIdTSS::s_eidThrId;
+thread_local EventIdTSS EventIdTSS::s_eventId;
 
 void EventId::toData(DataOutput& output) const {
   //  This method is always expected to write out nonstatic distributed
@@ -162,18 +159,18 @@ EventId::EventId(bool doInit, uint32_t reserveSize,
   }
 
   for (uint32_t i = 0; i < reserveSize; i++) {
-    EventIdTSS::s_eventId->getAndIncEidSeq();
+    EventIdTSS::s_eventId.getAndIncEidSeq();
   }
 }
 
 void EventId::initFromTSS() {
-  m_eidThr = EventIdTSS::s_eventId->getEidThr();
-  m_eidSeq = EventIdTSS::s_eventId->getAndIncEidSeq();
+  m_eidThr = EventIdTSS::s_eventId.getEidThr();
+  m_eidSeq = EventIdTSS::s_eventId.getAndIncEidSeq();
 }
 
 void EventId::initFromTSS_SameThreadIdAndSameSequenceId() {
-  m_eidThr = EventIdTSS::s_eventId->getEidThr();
-  m_eidSeq = EventIdTSS::s_eventId->getSeqNum();
+  m_eidThr = EventIdTSS::s_eventId.getEidThr();
+  m_eidSeq = EventIdTSS::s_eventId.getSeqNum();
 }
 
 EventId::~EventId() {}


[11/34] geode-native git commit: GEODE-2513 Unbrand docs section Interoperability

Posted by jb...@apache.org.
GEODE-2513 Unbrand docs section Interoperability

- section title is Interoperability of Language Classes and Types
- corrected namespaces (packages)
- removed duplicate table captions


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

Branch: refs/heads/feature/GEODE-2602
Commit: 4a6d11d54a0c5d415876f4c6dde6934d26a6ef52
Parents: f46469a
Author: Karen Miller <km...@pivotal.io>
Authored: Tue Mar 14 16:46:32 2017 -0700
Committer: Karen Miller <km...@pivotal.io>
Committed: Tue Mar 14 16:46:32 2017 -0700

----------------------------------------------------------------------
 .../type_mappings/chapter_overview.html.md.erb  |  2 +-
 ...p-class-to-dotnet-class-mappings.html.md.erb | 74 +++++++++-----------
 .../java-to-dotnet-type-mapping.html.md.erb     |  1 -
 3 files changed, 35 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/4a6d11d5/docs/geode-native-docs/type_mappings/chapter_overview.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/type_mappings/chapter_overview.html.md.erb b/docs/geode-native-docs/type_mappings/chapter_overview.html.md.erb
index aa54124..45002c8 100644
--- a/docs/geode-native-docs/type_mappings/chapter_overview.html.md.erb
+++ b/docs/geode-native-docs/type_mappings/chapter_overview.html.md.erb
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-*Interoperability of Language Classes and Types* provides a table that maps C++ class methods to corresponding .NET class methods and a table that maps Java types to .NET types.
+This section provides a table that maps C++ class methods to corresponding .NET class methods and a table that maps Java types to .NET types.
 
 -   **[C++ Class to .NET Class Mappings](cpp-class-to-dotnet-class-mappings.html)**
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/4a6d11d5/docs/geode-native-docs/type_mappings/cpp-class-to-dotnet-class-mappings.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/type_mappings/cpp-class-to-dotnet-class-mappings.html.md.erb b/docs/geode-native-docs/type_mappings/cpp-class-to-dotnet-class-mappings.html.md.erb
index c33eb1c..3ec7bec 100644
--- a/docs/geode-native-docs/type_mappings/cpp-class-to-dotnet-class-mappings.html.md.erb
+++ b/docs/geode-native-docs/type_mappings/cpp-class-to-dotnet-class-mappings.html.md.erb
@@ -24,7 +24,6 @@ Wherever the native C++ class methods use pass-by-reference semantics to return
 <a id="concept_FD847E19497C4985ACB247C0FA2C2AD5__table_8D8D228E223E4E89A313A17DB5C38652"></a>
 
 <table>
-<caption><span class="tablecap">Table 1. C++ Class to .NET Class Mappings</span></caption>
 <colgroup>
 <col width="50%" />
 <col width="50%" />
@@ -37,121 +36,121 @@ Wherever the native C++ class methods use pass-by-reference semantics to return
 </thead>
 <tbody>
 <tr class="odd">
-<td>class <code class="ph codeph">gemfire::AttributesFactory</code></td>
+<td>class <code class="ph codeph">apache::geode::client::AttributesFactory</code></td>
 <td>Sealed class <code class="ph codeph">AttributesFactory</code></td>
 </tr>
 <tr class="even">
-<td><p>class <code class="ph codeph">gemfire::AttributesMutator</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::AttributesMutator</code></p></td>
 <td>Sealed class <code class="ph codeph">AttributesMutator</code></td>
 </tr>
 <tr class="odd">
-<td>class <code class="ph codeph">gemfire::Cache</code></td>
+<td>class <code class="ph codeph">apache::geode::client::Cache</code></td>
 <td>Sealed class <code class="ph codeph">Cache</code></td>
 </tr>
 <tr class="even">
-<td><p>abstract class <code class="ph codeph">gemfire:: Cacheable</code></p></td>
+<td><p>abstract class <code class="ph codeph">apache::geode::client::Cacheable</code></p></td>
 <td><p>Interface <code class="ph codeph">IPdxSerializable</code> or interface <code class="ph codeph">IGFSerializable</code></p></td>
 </tr>
 <tr class="odd">
-<td><p>class <code class="ph codeph">gemfire::CacheableBytes</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::CacheableBytes</code></p></td>
 <td><p><code class="ph codeph">Byte[]</code> or <code class="ph codeph">ArrayList&lt;Byte&gt;</code></p></td>
 </tr>
 <tr class="even">
-<td><p>class <code class="ph codeph">gemfire::Cacheableint32</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::Cacheableint32</code></p></td>
 <td><p><code class="ph codeph">Int32</code></p></td>
 </tr>
 <tr class="odd">
-<td><p>class <code class="ph codeph">gemfire:: CacheableString</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::CacheableString</code></p></td>
 <td><p><code class="ph codeph">String</code></p></td>
 </tr>
 <tr class="even">
-<td><p>abstract class <code class="ph codeph">gemfire:: CacheableKey</code></p></td>
+<td><p>abstract class <code class="ph codeph">apache::geode::client::CacheableKey</code></p></td>
 <td><p>You can use any type that implements <code class="ph codeph">hashcode</code> and <code class="ph codeph">equals</code>. The generic .NET built-in types are all suitable.</p></td>
 </tr>
 <tr class="odd">
-<td><p>abstract class <code class="ph codeph">gemfire::CacheListener</code></p></td>
+<td><p>abstract class <code class="ph codeph">apache::geode::client::CacheListener</code></p></td>
 <td><p>Interface <code class="ph codeph">ICacheListener</code></p></td>
 </tr>
 <tr class="even">
-<td><p>class <code class="ph codeph">gemfire:: CacheLoader</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::CacheLoader</code></p></td>
 <td><p>Interface <code class="ph codeph">ICacheLoader</code> plus static class <code class="ph codeph">CacheLoader</code></p></td>
 </tr>
 <tr class="odd">
-<td><p>class <code class="ph codeph">gemfire:: CacheWriter</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::CacheWriter</code></p></td>
 <td><p>Interface class <code class="ph codeph">ICacheWriter</code></p></td>
 </tr>
 <tr class="even">
-<td><p>class <code class="ph codeph">gemfire::CacheFactory</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::CacheFactory</code></p></td>
 <td><p>Sealed class <code class="ph codeph">CacheFactory</code></p></td>
 </tr>
 <tr class="odd">
-<td><p>class <code class="ph codeph">gemfire::DataInput</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::DataInput</code></p></td>
 <td><p>With <code class="ph codeph">IPdxSerializable</code>, <code class="ph codeph">IPdxReader.</code></p>
 <p>With <code class="ph codeph">IGFSerializable</code>, sealed class <code class="ph codeph">DataInput</code>.</p></td>
 </tr>
 <tr class="even">
-<td><p>class <code class="ph codeph">gemfire:: DataOutput</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::DataOutput</code></p></td>
 <td><p>With <code class="ph codeph">IPdxSerializable</code>, <code class="ph codeph">IPdxWriter.</code></p>
 <p>With <code class="ph codeph">IGFSerializable</code>, sealed class <code class="ph codeph">DataOutput</code>.</p></td>
 </tr>
 <tr class="odd">
-<td><p>class <code class="ph codeph">gemfire:: DiskPolicyType</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::DiskPolicyType</code></p></td>
 <td><p>enum <code class="ph codeph">DiskPolicyType</code> plus static class <code class="ph codeph">DiskPolicy</code> containing convenience methods for <code class="ph codeph">DiskPolicyType</code> enumeration</p></td>
 </tr>
 <tr class="even">
-<td><p>class <code class="ph codeph">gemfire:: DistributedSystem</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::DistributedSystem</code></p></td>
 <td><p>Sealed class <code class="ph codeph">DistributedSystem</code></p></td>
 </tr>
 <tr class="odd">
-<td><p>class <code class="ph codeph">gemfire:: EntryEvent</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::EntryEvent</code></p></td>
 <td><p>Sealed class <code class="ph codeph">EntryEvent</code></p></td>
 </tr>
 <tr class="even">
-<td><p>class <code class="ph codeph">gemfire:: Exception</code></p></td>
-<td><p>Class <code class="ph codeph">GemfireException</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::Exception</code></p></td>
+<td><p>Class <code class="ph codeph">GeodeException</code></p></td>
 </tr>
 <tr class="odd">
-<td><p>all other exceptions deriving from <code class="ph codeph">gemfire::                                     Exception</code></p></td>
-<td><p>Corresponding exceptions deriving from <code class="ph codeph">GemfireException</code></p></td>
+<td><p>all other exceptions deriving from <code class="ph codeph">apache::geode::client::Exception</code></p></td>
+<td><p>Corresponding exceptions deriving from <code class="ph codeph">GeodeException</code></p></td>
 </tr>
 <tr class="even">
-<td><p>class <code class="ph codeph">gemfire:: ExpirationAction</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::ExpirationAction</code></p></td>
 <td><p>enum <code class="ph codeph">ExpirationAction</code> plus static class <code class="ph codeph">Expiration</code> containing convenience methods for <code class="ph codeph">ExpirationAction</code> enumeration</p></td>
 </tr>
 <tr class="odd">
-<td><p>class <code class="ph codeph">gemfire:: Log</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::Log</code></p></td>
 <td><p>Static class <code class="ph codeph">Log</code>. The native <code class="ph codeph">Log::log</code> method is mapped to <code class="ph codeph">Log.Write</code> to avoid the conflict with the class name which is reserved for the constructors of Log class. The various loglevel <code class="ph codeph">Throw</code> or <code class="ph codeph">Catch</code> methods are not implemented, since they are redundant to <code class="ph codeph">Log::Log</code> , <code class="ph codeph">Log::LogThrow</code>, and <code class="ph codeph">Log::LogCatch</code> methods that take <code class="ph codeph">LogLevel</code> as a parameter.</p></td>
 </tr>
 <tr class="even">
-<td><p>enum <code class="ph codeph">gemfire:: MemberType</code></p></td>
+<td><p>enum <code class="ph codeph">apache::geode::client::MemberType</code></p></td>
 <td><p>enum <code class="ph codeph">MemberType</code></p></td>
 </tr>
 <tr class="odd">
-<td><p>abstract class <code class="ph codeph">gemfire:: PersistanceManager</code></p></td>
+<td><p>abstract class <code class="ph codeph">apache::geode::client::PersistanceManager</code></p></td>
 <td><p>Not provided. You can register a C++ implementation using <code class="ph codeph">AttributesFactory.SetPersistenceManager</code> but you cannot implement a new one in .NET</p></td>
 </tr>
 <tr class="even">
-<td><p>class <code class="ph codeph">gemfire:: Properties</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::Properties</code></p></td>
 <td><p>Sealed class <code class="ph codeph">Properties</code></p></td>
 </tr>
 <tr class="odd">
-<td><p>class <code class="ph codeph">gemfire:: Properties::Visitor</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::Properties::Visitor</code></p></td>
 <td><p>Delegate <code class="ph codeph">PropertiesVisitor</code></p></td>
 </tr>
 <tr class="even">
-<td><p>abstract class <code class="ph codeph">gemfire:: Region</code></p></td>
+<td><p>abstract class <code class="ph codeph">apache::geode::client::Region</code></p></td>
 <td><p>Class <code class="ph codeph">IRegion</code></p></td>
 </tr>
 <tr class="odd">
-<td><p>class <code class="ph codeph">gemfire:: RegionAttributes</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::RegionAttributes</code></p></td>
 <td><p>Sealed class <code class="ph codeph">RegionAttributes</code></p></td>
 </tr>
 <tr class="even">
-<td><p>class <code class="ph codeph">gemfire:: ScopeType</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::ScopeType</code></p></td>
 <td><p>enum <code class="ph codeph">ScopeType</code> plus static class <code class="ph codeph">Scope</code> containing convenience methods for <code class="ph codeph">ScopeType</code> enumeration+</p></td>
 </tr>
 <tr class="odd">
-<td><p>abstract class <code class="ph codeph">gemfire::                                     Serializable</code></p></td>
+<td><p>abstract class <code class="ph codeph">apache::geode::client::Serializable</code></p></td>
 <td><p>Two options:</p>
 <ul>
 <li><p>Interface <code class="ph codeph">IPdxSerializable</code></p></li>
@@ -159,11 +158,11 @@ Wherever the native C++ class methods use pass-by-reference semantics to return
 </ul></td>
 </tr>
 <tr class="even">
-<td><p>class <code class="ph codeph">gemfire:: SystemProperties</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::SystemProperties</code></p></td>
 <td><p>Sealed class <code class="ph codeph">SystemProperties</code></p></td>
 </tr>
 <tr class="odd">
-<td><p>class <code class="ph codeph">gemfire:: UserData</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::UserData</code></p></td>
 <td><p>Two options:</p>
 <ul>
 <li><p>Interface <code class="ph codeph">IPdxSerializable</code></p></li>
@@ -171,7 +170,7 @@ Wherever the native C++ class methods use pass-by-reference semantics to return
 </ul></td>
 </tr>
 <tr class="even">
-<td><p>class <code class="ph codeph">gemfire:: VectorT&lt;T&gt;</code></p></td>
+<td><p>class <code class="ph codeph">apache::geode::client::VectorT&lt;T&gt;</code></p></td>
 <td><p>Array of the given type, such as T[]</p></td>
 </tr>
 </tbody>
@@ -179,8 +178,3 @@ Wherever the native C++ class methods use pass-by-reference semantics to return
 
 <span class="tablecap">Table 1. C++ Class to .NET Class Mappings</span>
 
--   **[Interoperability of C++ Types When Using PDX Serialization](../cpp-caching-api/type_interoperability.html)**
-
-    This topic table lists the mapping between C++ types and other language types when using PDX serialization.
-
-

http://git-wip-us.apache.org/repos/asf/geode-native/blob/4a6d11d5/docs/geode-native-docs/type_mappings/java-to-dotnet-type-mapping.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/type_mappings/java-to-dotnet-type-mapping.html.md.erb b/docs/geode-native-docs/type_mappings/java-to-dotnet-type-mapping.html.md.erb
index ba1cec8..faf90cf 100644
--- a/docs/geode-native-docs/type_mappings/java-to-dotnet-type-mapping.html.md.erb
+++ b/docs/geode-native-docs/type_mappings/java-to-dotnet-type-mapping.html.md.erb
@@ -24,7 +24,6 @@ The following table provides a mapping between Java and .NET types.
 <a id="concept_24D0AAC71FF1483AB47A7772DA018966__table_F85EC7AA1E1140E9888B753E812E65E4"></a>
 
 <table>
-<caption><span class="tablecap">Table 1. Java types and .NET types</span></caption>
 <colgroup>
 <col width="50%" />
 <col width="50%" />


[08/34] geode-native git commit: GEODE-2513 Rename gfcpp.properties file to geode.properties - updated references, moved and renamed files This closes #52

Posted by jb...@apache.org.
GEODE-2513 Rename gfcpp.properties file to geode.properties - updated references, moved and renamed files
This closes #52


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

Branch: refs/heads/feature/GEODE-2602
Commit: 013b336aa08abfbcb4a48f27e9601ff3b6ab37cd
Parents: 8ddafe9
Author: Dave Barnes <db...@pivotal.io>
Authored: Mon Mar 13 11:24:17 2017 -0700
Committer: Dave Barnes <db...@pivotal.io>
Committed: Mon Mar 13 14:38:39 2017 -0700

----------------------------------------------------------------------
 .../source/subnavs/geode-nc-nav.erb             |  10 +-
 .../chapter-overview.html.md.erb                |   2 +-
 .../cache-init-file/file-basics.html.md.erb     |   2 +-
 .../controlling-cache-size.html.md.erb          |   4 +-
 .../creating-a-cache.html.md.erb                |   4 +-
 .../dotnet-caching-api.html.md.erb              |   2 +-
 .../chapter_overview.html.md.erb                |  34 ---
 .../default_sample_file.html.md.erb             | 121 --------
 .../gfcpp.properties_search_path.html.md.erb    |  28 --
 .../overriding_gfcpp.properties.html.md.erb     |  26 --
 .../client-side-config.html.md.erb              |   2 +-
 .../configuring-durable-nc.html.md.erb          |   6 +-
 .../sending-periodic-ack.html.md.erb            |   2 +-
 .../using-queue-conflation.html.md.erb          |   2 +-
 .../security/LDAPserverauth.html.md.erb         |   2 +-
 .../geode-native-docs/security/PKCS.html.md.erb |   2 +-
 .../security/authforcacheserver.html.md.erb     |   2 +-
 .../security/overviewauthentication.html.md.erb |   2 +-
 .../security/overviewencryptcred.html.md.erb    |   4 +-
 .../security/overviewsecurity.html.md.erb       |   4 +-
 .../security/security-systemprops.html.md.erb   |   4 +-
 .../security/sslclientserver.html.md.erb        |   4 +-
 .../security/systempropsforauth.html.md.erb     |   2 +-
 .../attribute-def-priority.html.md.erb          |   6 +-
 .../attributes-gfcpp.html.md.erb                | 278 -------------------
 .../cache-server-config.html.md.erb             |   4 +-
 .../chapter-overview.html.md.erb                |   8 +-
 .../config-overview.html.md.erb                 |  10 +-
 .../define-programmatically.html.md.erb         |   2 +-
 .../native-client-config.html.md.erb            |  28 +-
 .../propfile_attributes.html.md.erb             | 278 +++++++++++++++++++
 .../propfile_overriding.html.md.erb             |  26 ++
 .../propfile_overview.html.md.erb               |  34 +++
 .../propfile_sample.html.md.erb                 | 121 ++++++++
 .../propfile_search_path.html.md.erb            |  28 ++
 .../chapter_overview.html.md.erb                |   2 +-
 .../sampling_statistics.html.md.erb             |   2 +-
 .../suspend-resume-xacts.html.md.erb            |   2 +-
 38 files changed, 550 insertions(+), 550 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb b/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb
index ef131ca..e61c9ea 100644
--- a/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb
+++ b/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb
@@ -101,10 +101,10 @@ limitations under the License.
                                         <a href="/docs/guide-native/11/setting-properties/attribute-def-priority.html">Attribute Definition Priority</a>
                                     </li>
                                     <li>
-                                        <a href="/docs/guide-native/11/gfcpp.properties/gfcpp.properties_search_path.html">Search Path for Multiple gfcpp.properties Files</a>
+                                        <a href="/docs/guide-native/11/setting-properties/propfile_search_path.html">Search Path for Multiple Properties Files</a>
                                     </li>
                                     <li>
-                                        <a href="/docs/guide-native/11/gfcpp.properties/overriding_gfcpp.properties.html">Overriding gfcpp.properties Settings</a>
+                                        <a href="/docs/guide-native/11/setting-properties/propfile_overriding.html">Overriding Properties File Settings</a>
                                     </li>
                                     <li>
                                         <a href="/docs/guide-native/11/setting-properties/define-programmatically.html">Defining Properties Programmatically</a>
@@ -112,13 +112,13 @@ limitations under the License.
                                 </ul>
                             </li>
                             <li>
-                                <a href="/docs/guide-native/11/setting-properties/attributes-gfcpp.html">Attributes in gfcpp.properties</a>
+                                <a href="/docs/guide-native/11/setting-properties/propfile_attributes.html">Attributes in the Properties File</a>
                             </li>
                             <li class="has_submenu">
-                                <a href="/docs/guide-native/11/gfcpp.properties/chapter_overview.html">gfcpp.properties Example File</a>
+                                <a href="/docs/guide-native/11/setting-properties/propfile_overview.html">Properties File Example</a>
                                 <ul>
                                     <li>
-                                        <a href="/docs/guide-native/11/gfcpp.properties/default_sample_file.html">Using the Default Sample File</a>
+                                        <a href="/docs/guide-native/11/setting-properties/propfile_sample.html">Using the Default Sample File</a>
                                     </li>
                                 </ul>
                             </li>

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/cache-init-file/chapter-overview.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/cache-init-file/chapter-overview.html.md.erb b/docs/geode-native-docs/cache-init-file/chapter-overview.html.md.erb
index 700a629..7a086aa 100644
--- a/docs/geode-native-docs/cache-init-file/chapter-overview.html.md.erb
+++ b/docs/geode-native-docs/cache-init-file/chapter-overview.html.md.erb
@@ -34,7 +34,7 @@ The initialization file can have any name, but is generally referred to as `cach
 The contents of a declarative XML file correspond to APIs declared in the `Cache.hpp` and `Region.hpp` header files. The cache initialization file allows you to accomplish declaratively many of the cache management activities that you can program through the API.
 
 -   The contents of the cache initialization file must conform to the XML definition in <code>_product-dir_/dtd/gfcpp-cache8000.dtd</code>. The DTD file identifies the valid element tags that may be present in your XML file, the attributes that correspond to each element, and the valid values for the elements and attributes.
--   The name of the declarative XML file is specified when establishing a connection to the distributed system. You can define it by setting the `cache-xml-file` configuration attribute in the `gfcpp.properties` file for the native client. For details about the `gfcpp.properties` file, see [Setting System and Cache Properties](../setting-properties/chapter-overview.html).
+-   The name of the declarative XML file is specified when establishing a connection to the distributed system. You can define it by setting the `cache-xml-file` configuration attribute in the `geode.properties` file for the native client. For details about the `geode.properties` file, see [Setting System and Cache Properties](../setting-properties/chapter-overview.html).
 
 
 #  Example cache.xml File

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/cache-init-file/file-basics.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/cache-init-file/file-basics.html.md.erb b/docs/geode-native-docs/cache-init-file/file-basics.html.md.erb
index d46ae70..d67d292 100644
--- a/docs/geode-native-docs/cache-init-file/file-basics.html.md.erb
+++ b/docs/geode-native-docs/cache-init-file/file-basics.html.md.erb
@@ -30,6 +30,6 @@ The initialization file can have any name, but is generally referred to as `cach
 The contents of a declarative XML file correspond to APIs declared in the `Cache.hpp` and `Region.hpp` header files. The cache initialization file allows you to accomplish declaratively many of the cache management activities that you can program through the API.
 
 -   The contents of the cache initialization file must conform to the XML definition in `productDir/dtd/gfcpp-cache8000.dtd` (see [Native Client Cache XML DTD](cache-dtd.html#cache-dtd)).
--   The name of the declarative XML file is specified when establishing a connection to the distributed system. You can define it by setting the `cache-xml-file` configuration attribute in the `gfcpp.properties` file for the native client. For details about the `gfcpp.properties` file, see [Setting System and Cache Properties](../setting-properties/chapter-overview.html#system_and_cache_properties).
+-   The name of the declarative XML file is specified when establishing a connection to the distributed system. You can define it by setting the `cache-xml-file` configuration attribute in the `geode.properties` file for the native client. For details about the `geode.properties` file, see [Setting System and Cache Properties](../setting-properties/chapter-overview.html#system_and_cache_properties).
 
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/client-cache/controlling-cache-size.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/client-cache/controlling-cache-size.html.md.erb b/docs/geode-native-docs/client-cache/controlling-cache-size.html.md.erb
index 3117b26..917088a 100644
--- a/docs/geode-native-docs/client-cache/controlling-cache-size.html.md.erb
+++ b/docs/geode-native-docs/client-cache/controlling-cache-size.html.md.erb
@@ -30,8 +30,8 @@ You can cap the size of any region with the region attribute [LruEntriesLimit](l
 
 ## <a id="controlling-cache-size__section_E59CA4D5724147DC83E8991E654AC155" class="no-quick-link"></a>Controlling Cache Size
 
-You can control overall cache size with the [heap-lru-limit](../setting-properties/attributes-gfcpp.html#attributes-gfcpp), which is set in `gfcpp.properties`. This property sets the maximum amount of memory used for the cache, in megabytes. If a new entry causes memory to grow past this limit, the LRU algorithm is called to evict entries. Heap LRU causes eviction to occur on all regions in the cache, overriding region-level [LruEntriesLimit](lru-entries-limit.html#concept_75D723D60E044FF9AE97C939699AB10A) settings when it needs to reclaim memory.
+You can control overall cache size with the [heap-lru-limit](../setting-properties/propfile_attributes.html#attributes-gfcpp), which is set in `geode.properties`. This property sets the maximum amount of memory used for the cache, in megabytes. If a new entry causes memory to grow past this limit, the LRU algorithm is called to evict entries. Heap LRU causes eviction to occur on all regions in the cache, overriding region-level [LruEntriesLimit](lru-entries-limit.html#concept_75D723D60E044FF9AE97C939699AB10A) settings when it needs to reclaim memory.
 
 For each region, evictions are performed according to the region's `DiskPolicy` and `PersistenceManager` settings. If you use `heap-lru-limit`, review these region attributes for all your caching regions, to be sure you are evicting the way you want to.
 
-The related [heap-lru-delta](../setting-properties/attributes-gfcpp.html#attributes-gfcpp) property, also set in `gfcpp.properties`, is the amount of memory to free up once the LRU evictions have begun. Memory is reclaimed until the amount of memory used is below `heap-lru-limit` minus `heap-lru-delta`.
+The related [heap-lru-delta](../setting-properties/propfile_attributes.html#attributes-gfcpp) property, also set in `geode.properties`, is the amount of memory to free up once the LRU evictions have begun. Memory is reclaimed until the amount of memory used is below `heap-lru-limit` minus `heap-lru-delta`.

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/dotnet-caching-api/creating-a-cache.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/dotnet-caching-api/creating-a-cache.html.md.erb b/docs/geode-native-docs/dotnet-caching-api/creating-a-cache.html.md.erb
index 4ed588d..5c63bf1 100644
--- a/docs/geode-native-docs/dotnet-caching-api/creating-a-cache.html.md.erb
+++ b/docs/geode-native-docs/dotnet-caching-api/creating-a-cache.html.md.erb
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-You create a cache using the Geode `CacheFactory.Create` call. Cache creation initializes the distributed system and creates the cache using your `gfcpp.properties` and `cache.xml` file settings and any additional properties you provide to the call.
+You create a cache using the Geode `CacheFactory.Create` call. Cache creation initializes the distributed system and creates the cache using your `geode.properties` and `cache.xml` file settings and any additional properties you provide to the call.
 
 See [Setting System and Cache Properties](../setting-properties/chapter-overview.html#system_and_cache_properties) and see [Cache Initialization File](../cache-init-file/chapter-overview.html#chapter-overview).
 
@@ -36,7 +36,7 @@ Cache cache = cacheFactory.Create();
 
 ## Providing Properties to the Cache Creation
 
-You can also create a cache by referencing a `cache.xml` file, as shown in the following example. You can use the `Properties` object to change any of the `gfcpp.properties` settings.
+You can also create a cache by referencing a `cache.xml` file, as shown in the following example. You can use the `Properties` object to change any of the `geode.properties` settings.
 
 ``` pre
 Properties prop = Properties.Create();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/dotnet-caching-api/dotnet-caching-api.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/dotnet-caching-api/dotnet-caching-api.html.md.erb b/docs/geode-native-docs/dotnet-caching-api/dotnet-caching-api.html.md.erb
index 249347a..470ac77 100644
--- a/docs/geode-native-docs/dotnet-caching-api/dotnet-caching-api.html.md.erb
+++ b/docs/geode-native-docs/dotnet-caching-api/dotnet-caching-api.html.md.erb
@@ -45,7 +45,7 @@ The .NET API documentation is available at [http://gemfire-apis.docs.pivotal.io]
 
 -   **[Creating a Cache](creating-a-cache.html)**
 
-    You create a cache using the Geode `CacheFactory.Create` call. Cache creation initializes the distributed system and creates the cache using your `gfcpp.properties` and `cache.xml` file settings and any additional properties you provide to the call.
+    You create a cache using the Geode `CacheFactory.Create` call. Cache creation initializes the distributed system and creates the cache using your `geode.properties` and `cache.xml` file settings and any additional properties you provide to the call.
 
 -   **[Creating a Region](creating-a-region.html)**
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/gfcpp.properties/chapter_overview.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/gfcpp.properties/chapter_overview.html.md.erb b/docs/geode-native-docs/gfcpp.properties/chapter_overview.html.md.erb
deleted file mode 100644
index 529c659..0000000
--- a/docs/geode-native-docs/gfcpp.properties/chapter_overview.html.md.erb
+++ /dev/null
@@ -1,34 +0,0 @@
----
-title:  gfcpp.properties Example File
----
-
-<!--
-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.
--->
-
-Use the gfcpp.properties file to configure distributed system connections for the client.
-
-The following example shows the format of a gfcpp.properties file. The first two attributes in this example should be set by programmers during application development, while other attributes are set on-site during system integration. The properties and their default settings that can be set in this file are described in detail in [Attributes in gfcpp.properties](../setting-properties/attributes-gfcpp.html#attributes-gfcpp).
-
-## gfcpp.properties File Format
-
-``` pre
-#Tue Feb 14 17:24:02 PDT 2006
-log-level=info
-cache-xml-file=./cache.xml
-stacktrace-enabled=true
-```
-

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/gfcpp.properties/default_sample_file.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/gfcpp.properties/default_sample_file.html.md.erb b/docs/geode-native-docs/gfcpp.properties/default_sample_file.html.md.erb
deleted file mode 100644
index 4b09f64..0000000
--- a/docs/geode-native-docs/gfcpp.properties/default_sample_file.html.md.erb
+++ /dev/null
@@ -1,121 +0,0 @@
----
-title:  Using the Default Sample File
----
-
-<!--
-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.
--->
-
-A sample gfcpp.properties file is included with the Apache Geode native client installation in the <code>_product-dir_/defaultSystem</code> directory.
-
-To use this file:
-
-1.  Copy the file to the directory where you start the application.
-2.  Uncomment the lines you need and edit the settings as shown in this example:
-
-    ``` pre
-    cache-xml-file=test.xml
-    ```
-
-3.  Start the application.
-
-## Default gfcpp.properties File
-
-``` pre
-# Default C++ distributed system properties
-# Copy to current directory and uncomment to override defaults.
-#
-## Debugging support, enables stacktraces in gemfire::Exception.
-#
-# The default is false, uncomment to enable stacktraces in exceptions.
-#stacktrace-enabled=true
-#crash-dump-enabled=true
-#
-#
-## Cache region configurtion
-#
-#cache-xml-file=cache.xml
-#
-## Log file config
-#
-#log-file=gemfire_cpp.log
-#log-level=config
-# zero indicates use no limit.
-#log-file-size-limit=0
-# zero indicates use no limit. 
-#log-disk-space-limit=0 
-#
-## Statistics values
-#
-# the rate is in seconds.
-#statistic-sample-rate=1
-#statistic-sampling-enabled=true
-#statistic-archive-file=statArchive.gfs
-# zero indicates use no limit.
-#archive-file-size-limit=0
-# zero indicates use no limit.
-#archive-disk-space-limit=0
-#enable-time-statistics=false 
-#
-## Heap based eviction configuration
-#
-# maximum amount of memory used by the cache for all regions, 0 disables this feature
-#heap-lru-limit=0
-# percentage over heap-lru-limit when LRU will be called. 
-#heap-lru-delta=10
-#
-## Durable client support
-#
-#durable-client-id=
-#durable-timeout=300
-#
-## SSL socket support
-#
-#ssl-enabled=false
-#ssl-keystore=
-#ssl-truststore=
-#
-## .NET AppDomain support
-#
-#appdomain-enabled=false
-#
-## Misc
-#
-#conflate-events=server
-#disable-shuffling-of-endpoints=false
-#grid-client=false
-#max-fe-threads=
-#max-socket-buffer-size=66560
-# the units are in seconds.
-#connect-timeout=59
-#notify-ack-interval=10
-#notify-dupcheck-life=300
-#ping-interval=10 
-#redundancy-monitor-interval=10
-#auto-ready-for-events=true
-#
-## module name of the initializer pointing to sample
-## implementation from templates/security
-#security-client-auth-library=securityImpl
-## static method name of the library mentioned above
-#security-client-auth-factory=createUserPasswordAuthInitInstance
-## credential for Dummy Authenticator configured in server.
-## note: security-password property will be inserted by the initializer
-## mentioned in the above property.
-#security-username=root
-```
-
-

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/gfcpp.properties/gfcpp.properties_search_path.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/gfcpp.properties/gfcpp.properties_search_path.html.md.erb b/docs/geode-native-docs/gfcpp.properties/gfcpp.properties_search_path.html.md.erb
deleted file mode 100644
index 99fce6e..0000000
--- a/docs/geode-native-docs/gfcpp.properties/gfcpp.properties_search_path.html.md.erb
+++ /dev/null
@@ -1,28 +0,0 @@
----
-title:  Search Path for Multiple gfcpp.properties Files
----
-
-<!--
-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.
--->
-
-The client and cache server processes first look for their properties file in the <code>_product-dir_/defaultSystem</code> directory, then in the working directory.
-
-Any properties set in the working directory override settings in the `defaultSystem/gfcpp.properties` file.
-
-If you are running multiple processes on one machine, you can configure the `gfcpp.properties` file in the `defaultSystem` directory as a shared file that all processes can find. If a few processes need a slightly different configuration, you can put individual `gfcpp.properties` files in their home directories to override specific properties.
-
-

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/gfcpp.properties/overriding_gfcpp.properties.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/gfcpp.properties/overriding_gfcpp.properties.html.md.erb b/docs/geode-native-docs/gfcpp.properties/overriding_gfcpp.properties.html.md.erb
deleted file mode 100644
index 7e4bae2..0000000
--- a/docs/geode-native-docs/gfcpp.properties/overriding_gfcpp.properties.html.md.erb
+++ /dev/null
@@ -1,26 +0,0 @@
----
-title:  Overriding gfcpp.properties Settings
----
-
-<!--
-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.
--->
-
-Application developers have the option of configuring system attributes programmatically, rather than using the `gfcpp.properties` file.
-
-Attributes set programmatically override any matching attribute settings in the `gfcpp.properties` file, but additional attributes not set programmatically will be configured using the settings in `gfcpp.properties`.
-
-

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/preserving-data/client-side-config.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/client-side-config.html.md.erb b/docs/geode-native-docs/preserving-data/client-side-config.html.md.erb
index 8617efd..e89fa93 100644
--- a/docs/geode-native-docs/preserving-data/client-side-config.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/client-side-config.html.md.erb
@@ -23,7 +23,7 @@ All durable messaging configurations are performed on the client.
 
 -   **[Configuring a Durable Client](configuring-durable-nc.html)**
 
-    The durable client can be configured in the `gfcpp.properties` file, or in the `CacheFactory::set(name,             value)` call.
+    The durable client can be configured in the `geode.properties` file, or in the `CacheFactory::set(name,             value)` call.
 
 -   **[Configuring Durable Interest in Keys](config-durable-interest-keys.html)**
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/preserving-data/configuring-durable-nc.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/configuring-durable-nc.html.md.erb b/docs/geode-native-docs/preserving-data/configuring-durable-nc.html.md.erb
index a39897c..1000583 100644
--- a/docs/geode-native-docs/preserving-data/configuring-durable-nc.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/configuring-durable-nc.html.md.erb
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-The durable client can be configured in the `gfcpp.properties` file, or in the `CacheFactory::set(name,             value)` call.
+The durable client can be configured in the `geode.properties` file, or in the `CacheFactory::set(name,             value)` call.
 
 -   **Durable client ID**\u2014Indicate that the client is durable by giving it a `durable-client-ID`. The servers use this ID to identify the client. For a non-durable client, the `durable-client-ID` is an empty string. The ID can be any number that is unique among the clients attached to servers in the same distributed system.
 
@@ -31,9 +31,9 @@ To assist with tuning, Geode statistics track message queues for durable clients
 
 When the queue is full, it blocks further operations that add messages until the queue size drops to an acceptable level. Server configuration sets the action to take. See details on server configuration of the queue in the server documentation section [Implementing Durable Client/Server Messaging](geodeman/developing/events/implementing_durable_client_server_messaging.html).
 
-## Configuring a Durable Client Using gfcpp.properties
+## Configuring a Durable Client Using geode.properties
 
-The following example shows `gfcpp.properties` settings to make the client durable and set the durable timeout to 200seconds.
+The following example shows `geode.properties` settings to make the client durable and set the durable timeout to 200seconds.
 
 ``` pre
 durable-client-id=31

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/preserving-data/sending-periodic-ack.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/sending-periodic-ack.html.md.erb b/docs/geode-native-docs/preserving-data/sending-periodic-ack.html.md.erb
index a3d2bd4..c3f2620 100644
--- a/docs/geode-native-docs/preserving-data/sending-periodic-ack.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/sending-periodic-ack.html.md.erb
@@ -24,7 +24,7 @@ Servers use periodic acknowledgment to reduce the likelihood of duplicate notifi
 <a id="concept_868B8082463846DE9F35BBEA56105C82__section_D4375BCCF8A2426BA58073B9549B6F04"></a>
 When redundancy is enabled for high availability and `redundancy-level` is set to 1 or higher, clients send (and servers expect) periodic acknowledgment messages at configurable intervals for notifications they have received. A periodic ack is not sent by the client if there are no unacknowledged notifications at the time.
 
-Use the following system properties in the `gfcpp.properties` file to configure periodic ack.
+Use the following system properties in the `geode.properties` file to configure periodic ack.
 
 <table>
 <colgroup>

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/preserving-data/using-queue-conflation.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/preserving-data/using-queue-conflation.html.md.erb b/docs/geode-native-docs/preserving-data/using-queue-conflation.html.md.erb
index a8a42cc..9f45e52 100644
--- a/docs/geode-native-docs/preserving-data/using-queue-conflation.html.md.erb
+++ b/docs/geode-native-docs/preserving-data/using-queue-conflation.html.md.erb
@@ -31,7 +31,7 @@ For more information, see the server documentation at [Conflate the Server Subsc
 
 ## <a id="concept_AEFA04AF9ABD42C0A37ED31806596D24__section_BE506A32A8E44073B197B03AC5232C01" class="no-quick-link"></a>Overriding Queue Conflation Per-Client
 
-Override conflation on a per-client basis by setting the conflate-events property in the client\u2019s `gfcpp.properties` file.
+Override conflation on a per-client basis by setting the conflate-events property in the client\u2019s `geode.properties` file.
 
 Valid settings are:
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/security/LDAPserverauth.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/security/LDAPserverauth.html.md.erb b/docs/geode-native-docs/security/LDAPserverauth.html.md.erb
index 894b9b3..f98d815 100644
--- a/docs/geode-native-docs/security/LDAPserverauth.html.md.erb
+++ b/docs/geode-native-docs/security/LDAPserverauth.html.md.erb
@@ -30,7 +30,7 @@ When a client initiates a connection to a cache server, the client submits its c
 
 **Configuration Settings**
 
-In the `gfcpp.properties` file for the client, specify the `UserPasswordAuthInit` callback, the user name, and the password, like this:
+In the `geode.properties` file for the client, specify the `UserPasswordAuthInit` callback, the user name, and the password, like this:
 
 ``` pre
 security-client-auth-library=securityImpl

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/security/PKCS.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/security/PKCS.html.md.erb b/docs/geode-native-docs/security/PKCS.html.md.erb
index 821a154..ef43ae9 100644
--- a/docs/geode-native-docs/security/PKCS.html.md.erb
+++ b/docs/geode-native-docs/security/PKCS.html.md.erb
@@ -30,7 +30,7 @@ When clients require authentication to connect to a cache server, they use the `
 
 **Building the securityImpl Library**
 
-To use the PKCS sample implementation, you need to build OpenSSL and then build the securityImpl library. In the `gfcpp.properties `file for the client, specify the `PKCSAuthInit` callback, the keystore path, the security alias, and the keystore password, like this:
+To use the PKCS sample implementation, you need to build OpenSSL and then build the securityImpl library. In the `geode.properties `file for the client, specify the `PKCSAuthInit` callback, the keystore path, the security alias, and the keystore password, like this:
 
 ``` pre
 security-client-auth-library=securityImpl

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/security/authforcacheserver.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/security/authforcacheserver.html.md.erb b/docs/geode-native-docs/security/authforcacheserver.html.md.erb
index 384a111..43713de 100644
--- a/docs/geode-native-docs/security/authforcacheserver.html.md.erb
+++ b/docs/geode-native-docs/security/authforcacheserver.html.md.erb
@@ -21,7 +21,7 @@ limitations under the License.
 
 When the cache server receives client credentials during the handshake operation, the server authenticates the client with the callback configured in the `security-client-authenticator` system property. The handshake succeeds or fails depending on the results of the authentication process.
 
-Here is an example of how you could configure `security-client-authenticator` in the `gfcpp.properties` file:
+Here is an example of how you could configure `security-client-authenticator` in the `geode.properties` file:
 
 ``` pre
 security-client-authenticator=templates.security.PKCSAuthenticator.create

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/security/overviewauthentication.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/security/overviewauthentication.html.md.erb b/docs/geode-native-docs/security/overviewauthentication.html.md.erb
index 5bcd7d9..c1e7b3b 100644
--- a/docs/geode-native-docs/security/overviewauthentication.html.md.erb
+++ b/docs/geode-native-docs/security/overviewauthentication.html.md.erb
@@ -29,7 +29,7 @@ Once the client is authenticated, the server assigns the client a unique ID and
 
 -   **[Configuring Credentials for Authentication](systempropsforauth.html)**
 
-    The native client uses system properties to acquire valid credentials for authentication by the server. You define these properties in the `gfcpp.properties` file, which the native client accesses during startup.
+    The native client uses system properties to acquire valid credentials for authentication by the server. You define these properties in the `geode.properties` file, which the native client accesses during startup.
 
 -   **[Configuring Authentication by the Cache Server](authforcacheserver.html)**
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/security/overviewencryptcred.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/security/overviewencryptcred.html.md.erb b/docs/geode-native-docs/security/overviewencryptcred.html.md.erb
index fa726b8..a119669 100644
--- a/docs/geode-native-docs/security/overviewencryptcred.html.md.erb
+++ b/docs/geode-native-docs/security/overviewencryptcred.html.md.erb
@@ -23,7 +23,7 @@ For secure transmission of sensitive credentials like passwords, encrypt credent
 
 ## <a id="security__section_1BB8F13C7ACB44668FF337F59A3BA5AE" class="no-quick-link"></a>Enabling Diffe-Hellman
 
-Set the `security-client-dhalgo` system property in the `gfcpp.properties` file to the password for the public key file store on the client (the name of a valid symmetric key cipher supported by the JDK).
+Set the `security-client-dhalgo` system property in the `geode.properties` file to the password for the public key file store on the client (the name of a valid symmetric key cipher supported by the JDK).
 
 Valid `security-client-dhalgo` property values are `DESede`, `AES`, and `Blowfish`, which enable the Diffie-Hellman algorithm with the specified cipher to encrypt the credentials.
 
@@ -51,7 +51,7 @@ With Diffie-Hellman enabled, you can have your client authenticate its servers.
 
     2.  Concatenate the generated .pem files into a single .pem file. You will use this file name in the next step.
 
-2.  In the `gfcpp.properties` file:
+2.  In the `geode.properties` file:
 
     1.  Set `security-client-kspath` to the file name of the `.pem` file password for the public key file store on the client.
     2.  Set `security-client-kspasswd` to the password for the public key file store on the client.

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/security/overviewsecurity.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/security/overviewsecurity.html.md.erb b/docs/geode-native-docs/security/overviewsecurity.html.md.erb
index ec4ea25..ad243a7 100644
--- a/docs/geode-native-docs/security/overviewsecurity.html.md.erb
+++ b/docs/geode-native-docs/security/overviewsecurity.html.md.erb
@@ -35,9 +35,9 @@ The security framework authenticates clients that attempt to connect to a Geode
 
     Using a provided callback that implements the `AccessControl` interface, you can configure each server to authorize some or all cache operations.
 
--   **[Security-Related System Properties (gfcpp.properties)](security-systemprops.html)**
+-   **[Security-Related System Properties (geode.properties)](security-systemprops.html)**
 
-    The table describes the security-related system properties in the `gfcpp.properties` file for native client authentication and authorization.
+    The table describes the security-related system properties in the `geode.properties` file for native client authentication and authorization.
 
 -   **[SSL Client/Server Communication](sslclientserver.html)**
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/security/security-systemprops.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/security/security-systemprops.html.md.erb b/docs/geode-native-docs/security/security-systemprops.html.md.erb
index d987a90..c580aad 100644
--- a/docs/geode-native-docs/security/security-systemprops.html.md.erb
+++ b/docs/geode-native-docs/security/security-systemprops.html.md.erb
@@ -1,5 +1,5 @@
 ---
-title:  Security-Related System Properties (gfcpp.properties)
+title:  Security-Related System Properties (geode.properties)
 ---
 
 <!--
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-The table describes the security-related system properties in the `gfcpp.properties` file for native client authentication and authorization.
+The table describes the security-related system properties in the `geode.properties` file for native client authentication and authorization.
 
 <a id="security__section_6DC4C72A2EEB432AA40DE97D438FD1E7"></a><a id="security__table_92A6A66523764199A19BCD66BA189921"></a>
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/security/sslclientserver.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/security/sslclientserver.html.md.erb b/docs/geode-native-docs/security/sslclientserver.html.md.erb
index 89bb284..b0ff092 100644
--- a/docs/geode-native-docs/security/sslclientserver.html.md.erb
+++ b/docs/geode-native-docs/security/sslclientserver.html.md.erb
@@ -92,11 +92,11 @@ Configure your system environment to build and run OpenSSL. Follow the environme
 
 where <code>_path-to-installed-openssl_</code> is typically `C:\OpenSSL>`.
 
-## Step 4. Configure SSL properties in gfcpp.properties and gemfire.properties
+## Step 4. Configure SSL properties in geode.properties and gemfire.properties
 
 Configure SSL properties.
 
-1.  In `gfcpp.properties`, set `ssl-enabled` to true and set `ssl-keystore` and `ssl-truststore` to point to your keystore files. See [Security-Related System Properties (gfcpp.properties)](security-systemprops.html#security) for a description of these properties.
+1.  In `geode.properties`, set `ssl-enabled` to true and set `ssl-keystore` and `ssl-truststore` to point to your keystore files. See [Security-Related System Properties (geode.properties)](security-systemprops.html#security) for a description of these properties.
 2.  On each locator, enable SSL and set the following SSL properties in the locator\u2019s `gemfire.properties` file:
 
     ```

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/security/systempropsforauth.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/security/systempropsforauth.html.md.erb b/docs/geode-native-docs/security/systempropsforauth.html.md.erb
index 8c0252d..1101146 100644
--- a/docs/geode-native-docs/security/systempropsforauth.html.md.erb
+++ b/docs/geode-native-docs/security/systempropsforauth.html.md.erb
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-The native client uses system properties to acquire valid credentials for authentication by the server. You define these properties in the `gfcpp.properties` file, which the native client accesses during startup.
+The native client uses system properties to acquire valid credentials for authentication by the server. You define these properties in the `geode.properties` file, which the native client accesses during startup.
 
 ## <a id="security__section_E1835A3B22D44D47A4C9DB54A3590B71" class="no-quick-link"></a>security-client-auth-factory
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/setting-properties/attribute-def-priority.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/setting-properties/attribute-def-priority.html.md.erb b/docs/geode-native-docs/setting-properties/attribute-def-priority.html.md.erb
index c9614d1..f484f32 100644
--- a/docs/geode-native-docs/setting-properties/attribute-def-priority.html.md.erb
+++ b/docs/geode-native-docs/setting-properties/attribute-def-priority.html.md.erb
@@ -25,10 +25,10 @@ In case an attribute is defined in more than one place, the first source in this
 
 -   Programmatic configuration
 -   Properties set at the command line
--   <code>_current-working-directory_/gfcpp.properties</code> file
--   <code>_product-dir_/defaultSystem/gfcpp.properties</code> file
+-   <code>_current-working-directory_/geode.properties</code> file
+-   <code>_product-dir_/defaultSystem/geode.properties</code> file
 -   defaults
 
 
-The `gfcpp.properties` files and programmatic configuration are optional. If they are not present, no warnings or errors occur. For details on programmatic configuration through the `Properties` object, see [Defining Properties Programmatically](define-programmatically.html#define-programmatically).
+The `geode.properties` files and programmatic configuration are optional. If they are not present, no warnings or errors occur. For details on programmatic configuration through the `Properties` object, see [Defining Properties Programmatically](define-programmatically.html#define-programmatically).
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/setting-properties/attributes-gfcpp.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/setting-properties/attributes-gfcpp.html.md.erb b/docs/geode-native-docs/setting-properties/attributes-gfcpp.html.md.erb
deleted file mode 100644
index 58f0822..0000000
--- a/docs/geode-native-docs/setting-properties/attributes-gfcpp.html.md.erb
+++ /dev/null
@@ -1,278 +0,0 @@
----
-title:  Attributes in gfcpp.properties
----
-
-<!--
-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.
--->
-
-A variety of `gfcpp.properties` settings can be used when a client connects to a distributed system.
-
-The following settings can be configured:
-
--   **[General Properties](attributes-gfcpp.html#attributes-gfcpp__table_21004C9E93294F03BE3469C13EA33262)** Basic information for the process, such as cache creation parameters.
--   **[Logging Properties](attributes-gfcpp.html#attributes-gfcpp__table_D42627049FD6432494BDE5170AF1BCCF)** How and where to log system messages.
--   **[Statistics Archiving Properties](attributes-gfcpp.html#attributes-gfcpp__table_E1A0EDBA67CD41319E1E5FD0A0BB2723)** How to collect and archive statistics information.
--   **[Durable Client Properties](attributes-gfcpp.html#attributes-gfcpp__table_BA6DAF27947B4A9488787E6BDCFC15B9)** Information about the durable clients connected to the system.
--   **[Security Properties](attributes-gfcpp.html#attributes-gfcpp__table_B3A8E9EB44A94557A97BB700E2BA1EF1)** Information about various security parameters.
-
-## <a id="attributes-gfcpp__section_655789BCC46642789F91CDA8AE03CD9B" class="no-quick-link"></a>Attribute Definitions
-
-The following tables list attributes that can be stored in the `gfcpp.properties` file to be read by a client.
-
-For the system properties that relate to high availability, see [Sending Periodic Acknowledgement](../preserving-data/sending-periodic-ack.html#concept_868B8082463846DE9F35BBEA56105C82). For a list of security-related system properties and their descriptions, see the table [System Properties for Client Authentication and Authorization](../security/security-systemprops.html#security__table_92A6A66523764199A19BCD66BA189921).
-
-<a id="attributes-gfcpp__table_21004C9E93294F03BE3469C13EA33262"></a>
-
-<table>
-<caption><span class="tablecap">Table 1. Attributes in gfcpp.properties\u2014General Properties</span></caption>
-<colgroup>
-<col width="33%" />
-<col width="33%" />
-<col width="34%" />
-</colgroup>
-<thead>
-<tr class="header">
-<th>gfcpp.properties Attribute</th>
-<th>Description</th>
-<th>Default</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td>appdomain-enabled</td>
-<td>If <code class="ph codeph">true</code>, allows client to work when multiple .NET appdomains are in use.</td>
-<td>false</td>
-</tr>
-<tr class="even">
-<td>cache-xml-file</td>
-<td>Name and path of the file whose contents are used by default to initialize a cache if one is created. If not specified, the client starts with an empty cache, which is populated at run time.
-<p>See <a href="../cache-init-file/chapter-overview.html#chapter-overview">Cache Initialization File</a> for more information on the cache initialization file.</p></td>
-<td>no default</td>
-</tr>
-<tr class="odd">
-<td>heap-lru-delta</td>
-<td>When heap LRU is triggered, this is the amount that gets added to the percentage that is above the <code class="ph codeph">heap-lru-limit</code> amount. LRU continues until the memory usage is below <code class="ph codeph">heap-lru-limit</code> minus this percentage. This property is only used if <code class="ph codeph">heap-lru-limit</code> is greater than 0 .</td>
-<td>10</td>
-</tr>
-<tr class="even">
-<td>heap-lru-limit</td>
-<td>Maximum amount of memory, in megabytes, used by the cache for all regions. If this limit is exceeded by <code class="ph codeph">heap-lru-delta</code> percent, LRU reduces the memory footprint as necessary. If not specified, or set to 0, memory usage is governed by each region's LRU entries limit, if any.</td>
-<td>0</td>
-</tr>
-<tr class="odd">
-<td>conflate-events</td>
-<td>Client side conflation setting, which is sent to the server.</td>
-<td>server</td>
-</tr>
-<tr class="even">
-<td>connect-timeout</td>
-<td>Amount of time (in seconds) to wait for a response after a socket connection attempt.</td>
-<td>59</td>
-</tr>
-<tr class="odd">
-<td>connection-pool-size</td>
-<td>Number of connections per endpoint</td>
-<td>5</td>
-</tr>
-<tr class="even">
-<td>crash-dump-enabled</td>
-<td>Whether crash dump generation for unhandled fatal errors is enabled. True is enabled, false otherwise.</td>
-<td>true</td>
-</tr>
-<tr class="odd">
-<td>disable-chunk-handler-thread</td>
-<td>When set to false, each application thread processes its own response. If set to true, the chunk-handler-thread processes the response for each application thread.</td>
-<td>false</td>
-</tr>
-<tr class="even">
-<td>disable-shuffling-of-endpoints</td>
-<td>If true, prevents server endpoints that are configured in pools from being shuffled before use.</td>
-<td>false</td>
-</tr>
-<tr class="odd">
-<td>grid-client</td>
-<td>If true, the client does not start various internal threads, so that startup and shutdown time is reduced.</td>
-<td>false</td>
-</tr>
-<tr class="even">
-<td>max-fe-threads</td>
-<td>Thread pool size for parallel function execution. An example of this is the GetAll operations.</td>
-<td>2 * number of CPU cores</td>
-</tr>
-<tr class="odd">
-<td>max-socket-buffer-size</td>
-<td>Maximum size of the socket buffers, in bytes, that the client will try to set for client-server connections.</td>
-<td>65 * 1024</td>
-</tr>
-<tr class="even">
-<td>notify-ack-interval</td>
-<td>Interval, in seconds, in which client sends acknowledgments for subscription notifications.</td>
-<td>1</td>
-</tr>
-<tr class="odd">
-<td>notify-dupcheck-life</td>
-<td>Amount of time, in seconds, the client tracks subscription notifications before dropping the duplicates.</td>
-<td>300</td>
-</tr>
-<tr class="even">
-<td>ping-interval</td>
-<td>Interval, in seconds, between communication attempts with the server to show the client is alive. Pings are only sent when the <code class="ph codeph">ping-interval</code> elapses between normal client messages. This must be set lower than the server's <code class="ph codeph">maximum-time-between-pings</code>.</td>
-<td>10</td>
-</tr>
-<tr class="odd">
-<td>redundancy-monitor-interval</td>
-<td>Interval, in seconds, at which the subscription HA maintenance thread checks for the configured redundancy of subscription servers.</td>
-<td>10</td>
-</tr>
-<tr class="even">
-<td>stacktrace-enabled</td>
-<td>If <code class="ph codeph">true</code>, the exception classes capture a stack trace that can be printed with their <code class="ph codeph">printStackTrace</code> function. If false, the function prints a message that the trace is unavailable.</td>
-<td>false</td>
-</tr>
-<tr class="odd">
-<td>tombstone-timeout</td>
-<td>Time in milliseconds used to timeout tombstone entries when region consistency checking is enabled.
-</td>
-<td>480000</td>
-</tr>
-</tbody>
-</table>
-
-
-<a id="attributes-gfcpp__table_D42627049FD6432494BDE5170AF1BCCF"></a>
-
-<table>
-<caption><span class="tablecap">Table 2. Attributes in gfcpp.properties\u2014Logging Properties</span></caption>
-<colgroup>
-<col width="34%" />
-<col width="33%" />
-<col width="33%" />
-</colgroup>
-<thead>
-<tr class="header">
-<th>gfcpp.properties Attribute</th>
-<th>Description</th>
-<th>Default</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td>log-disk-space-limit</td>
-<td>Maximum amount of disk space, in megabytes, allowed for all log files, current, and rolled. If set to 0, the space is unlimited.</td>
-<td>0</td>
-</tr>
-<tr class="even">
-<td>log-file</td>
-<td>Name and full path of the file where a running client writes log messages. If not specified, logging goes to <code class="ph codeph">stdout</code>.</td>
-<td>no default file</td>
-</tr>
-<tr class="odd">
-<td>log-file-size-limit</td>
-<td>Maximum size, in megabytes, of a single log file. Once this limit is exceeded, a new log file is created and the current log file becomes inactive. If set to 0, the file size is unlimited.</td>
-<td>0</td>
-</tr>
-<tr class="even">
-<td>log-level</td>
-<td>Controls the types of messages that are written to the application's log. These are the levels, in descending order of severity and the types of message they provide:
-<ul>
-<li><strong>Error</strong> (highest severity) is a serious failure that will probably prevent program execution.</li>
-<li><strong>Warning</strong> is a potential problem in the system.</li>
-<li><strong>Info</strong> is an informational message of interest to the end user and system administrator.</li>
-<li><strong>Config</strong> is a static configuration message, often used to debug problems with particular configurations.</li>
-<li><strong>Fine, Finer, Finest, and Debug</strong> provide tracing information. Only use these with guidance from technical support.</li>
-</ul>
-<p>Enabling logging at any level enables logging for all higher levels.</p></td>
-<td>config</td>
-</tr>
-</tbody>
-</table>
-
-
-<a id="attributes-gfcpp__table_E1A0EDBA67CD41319E1E5FD0A0BB2723"></a>
-
-<table>
-<caption><span class="tablecap">Table 3. Attributes in gfcpp.properties\u2014Statistics Archiving Properties</span></caption>
-<colgroup>
-<col width="33%" />
-<col width="33%" />
-<col width="34%" />
-</colgroup>
-<thead>
-<tr class="header">
-<th>gfcpp.properties Attribute</th>
-<th>Description</th>
-<th>Default</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td>statistic-sampling-enabled</td>
-<td>Controls whether the process creates a statistic archive file.</td>
-<td>true</td>
-</tr>
-<tr class="even">
-<td>statistic-archive-file</td>
-<td>Name and full path of the file where a running system member writes archives statistics. If <code class="ph codeph">archive-disk-space-limit</code> is not set, the client appends the process ID to the configured file name, like <code class="ph codeph">statArchive-PID.gfs</code>. If the space limit is set, the process ID is not appended but each rolled file name is renamed to statArchive-ID.gfs, where ID is the rolled number of the file.</td>
-<td>./statArchive.gfs</td>
-</tr>
-<tr class="odd">
-<td>archive-disk-space-limit</td>
-<td>Maximum amount of disk space, in megabytes, allowed for all archive files, current, and rolled. If set to 0, the space is unlimited.</td>
-<td>0</td>
-</tr>
-<tr class="even">
-<td>archive-file-size-limit</td>
-<td>Maximum size, in bytes, of a single statistic archive file. Once this limit is exceeded, a new statistic archive file is created and the current archive file becomes inactive. If set to 0, the file size is unlimited.</td>
-<td>0</td>
-</tr>
-<tr class="odd">
-<td>statistic-sample-rate</td>
-<td>Rate, in seconds, that statistics are sampled. Operating system statistics are updated only when a sample is taken. If statistic archival is enabled, then these samples are written to the archive.
-<p>Lowering the sample rate for statistics reduces system resource use while still providing some statistics for system tuning and failure analysis.</p>
-</td>
-<td>1</td>
-</tr>
-<tr class="even">
-<td>enable-time-statistics</td>
-<td>Enables time-based statistics for the distributed system and caching. For performance reasons, time-based statistics are disabled by default. See <a href="../system-statistics/chapter_overview.html#concept_3BE5237AF2D34371883453E6A9474A79">System Statistics</a>. </td>
-<td>false</td>
-</tr>
-</tbody>
-</table>
-
-
-### <a id="attributes-gfcpp__table_BA6DAF27947B4A9488787E6BDCFC15B9" class="no-quick-link"></a>Table 4. Attributes in gfcpp.properties\u2014Durable Client Properties
-
-| gfcpp.properties Attribute | Description                                                                                                                                                                                                                                                                    | Default |
-|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
-| auto-ready-for-events      | Whether client subscriptions automatically receive events when declaratively configured via XML. If set to `false`, event startup is not automatic and you need to call the `Cache.ReadyForEvents()` method API after subscriptions for the server to start delivering events. | true    |
-| durable-client-id          | Identifier to specify if you want the client to be durable.                                                                                                                                                                                                                    | empty   |
-| durable-timeout            | Time, in seconds, a durable client's subscription is maintained when it is not connected to the server before being dropped.                                                                                                                                                   | 300     |
-
-
-### <a id="attributes-gfcpp__table_B3A8E9EB44A94557A97BB700E2BA1EF1" class="no-quick-link"></a>Table 5. Attributes in gfcpp.properties\u2014Security Properties
-
-| gfcpp.properties Attribute   | Description                                                          | Default |
-|------------------------------|----------------------------------------------------------------------|---------|
-| security-client-dhalgo       | Diffie-Hellman secret key algorithm.                                 | null    |
-| security-client-kspath       | keystore (.pem file ) path.                                          | null    |
-| security-client-auth-factory | Factory method for the security `AuthInitialize` module.             | empty   |
-| security-client-auth-library | Path to the client security library for the `AuthInitialize` module. | empty   |
-| ssl-keystore-password        | Keystore password.                                                   | null    |
-
-
-

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/setting-properties/cache-server-config.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/setting-properties/cache-server-config.html.md.erb b/docs/geode-native-docs/setting-properties/cache-server-config.html.md.erb
index 95c34e1..e7c2f5a 100644
--- a/docs/geode-native-docs/setting-properties/cache-server-config.html.md.erb
+++ b/docs/geode-native-docs/setting-properties/cache-server-config.html.md.erb
@@ -21,13 +21,13 @@ limitations under the License.
 
 You configure the cache server in two files: `gemfire.properties` for server system-level configuration and `cache.xml` for cache-level configuration.
 
-The configuration of the caches is part of the application development process. See [Cache Initialization File](../cache-init-file/chapter-overview.html#chapter-overview). The cache-level configuration file is generally referred to as `cache.xml`, but you can use any name.
+The configuration of the caches is part of the application development process. See [Cache Initialization File (cache.xml)](../cache-init-file/chapter-overview.html#chapter-overview). The cache-level configuration file is generally referred to as `cache.xml`, but you can use any name.
 
 ## <a id="cache-server-config__section_FED30097F6C246DE843EBD8B5292D86C" class="no-quick-link"></a>Configuration File Locations
 
 For the cache server, the `gemfire.properties` file is usually stored in the current working directory.
 
-For the `cache.xml` configuration file, a client looks for the path specified by the `cache-xml-file` attribute in `gfcpp.properties` (see [Attributes in gfcpp.properties](attributes-gfcpp.html#attributes-gfcpp)). If the `cache.xml` is not found, the process starts with an unconfigured cache.
+For the `cache.xml` configuration file, a client looks for the path specified by the `cache-xml-file` attribute in `geode.properties` (see [Attributes in the Properties File](propfile_attributes.html#attributes-gfcpp)). If the `cache.xml` is not found, the process starts with an unconfigured cache.
 
 ## <a id="cache-server-config__section_F47DE4D858B04244956B91360AD8967E" class="no-quick-link"></a>Modifying Attributes Outside the gemfire.properties File
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/setting-properties/chapter-overview.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/setting-properties/chapter-overview.html.md.erb b/docs/geode-native-docs/setting-properties/chapter-overview.html.md.erb
index 390a8ab..2ea38cc 100644
--- a/docs/geode-native-docs/setting-properties/chapter-overview.html.md.erb
+++ b/docs/geode-native-docs/setting-properties/chapter-overview.html.md.erb
@@ -25,12 +25,12 @@ This section describes how to configure clients and cache servers to participate
 
     You can configure clients through files and API calls. The servers are configured through command-line input and configuration files.
 
--   **[Attributes in gfcpp.properties](attributes-gfcpp.html)**
+-   **[Attributes in the Properties File](propfile_attributes.html)**
 
-    A variety of `gfcpp.properties` settings can be used when a client connects to a distributed system.
+    A variety of `geode.properties` settings can be used when a client connects to a distributed system.
 
--   **[gfcpp.properties Example File](../gfcpp.properties/chapter_overview.html)**
+-   **[Properties File Example](propfile_overview.html)**
 
-    Use the gfcpp.properties file to configure distributed system connections for the client.
+    Use the geode.properties file to configure distributed system connections for the client.
 
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/setting-properties/config-overview.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/setting-properties/config-overview.html.md.erb b/docs/geode-native-docs/setting-properties/config-overview.html.md.erb
index 6df0843..5354a71 100644
--- a/docs/geode-native-docs/setting-properties/config-overview.html.md.erb
+++ b/docs/geode-native-docs/setting-properties/config-overview.html.md.erb
@@ -23,7 +23,7 @@ You can configure clients through files and API calls. The servers are configure
 
 -   **[Client Configuration](native-client-config.html)**
 
-    You configure the client in two files: `gfcpp.properties` for system-level configuration and `cache.xml` for cache-level configuration.
+    You configure the client in two files: `geode.properties` for system-level configuration and `cache.xml` for cache-level configuration.
 
 -   **[Cache Server Configuration](cache-server-config.html)**
 
@@ -33,16 +33,16 @@ You can configure clients through files and API calls. The servers are configure
 
     You can specify attributes in different ways, which can cause conflicting definitions. Applications can be configured programmatically, and that has priority over other settings.
 
--   **[Search Path for Multiple gfcpp.properties Files](../gfcpp.properties/gfcpp.properties_search_path.html)**
+-   **[Search Path for Multiple Properties Files](propfile_search_path.html)**
 
     The client and server processes first look for their properties file in the <code>_product-dir_/defaultSystem</code> directory, then in the working directory.
 
--   **[Overriding gfcpp.properties Settings](../gfcpp.properties/overriding_gfcpp.properties.html)**
+-   **[Overriding Properties File Settings](propfile_overriding.html)**
 
-    Application developers have the option of configuring system attributes programmatically, rather than using the `gfcpp.properties` file.
+    Application developers have the option of configuring system attributes programmatically, rather than using the `geode.properties` file.
 
 -   **[Defining Properties Programmatically](define-programmatically.html)**
 
-    You can pass in specific gfcpp properties programmatically by using a `Properties` object to define the non-default properties.
+    You can pass in specific properties programmatically by using a `Properties` object to define the non-default properties.
 
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/setting-properties/define-programmatically.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/setting-properties/define-programmatically.html.md.erb b/docs/geode-native-docs/setting-properties/define-programmatically.html.md.erb
index 4650086..af02b5a 100644
--- a/docs/geode-native-docs/setting-properties/define-programmatically.html.md.erb
+++ b/docs/geode-native-docs/setting-properties/define-programmatically.html.md.erb
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-You can pass in specific gfcpp properties programmatically by using a `Properties` object to define the non-default properties.
+You can pass in specific properties programmatically by using a `Properties` object to define the non-default properties.
 
 Example:
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/013b336a/docs/geode-native-docs/setting-properties/native-client-config.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/setting-properties/native-client-config.html.md.erb b/docs/geode-native-docs/setting-properties/native-client-config.html.md.erb
index 9513eb1..9076f6f 100644
--- a/docs/geode-native-docs/setting-properties/native-client-config.html.md.erb
+++ b/docs/geode-native-docs/setting-properties/native-client-config.html.md.erb
@@ -19,34 +19,34 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-You configure the client in two files: `gfcpp.properties` for system-level configuration and `cache.xml` for cache-level configuration.
+You configure the client in two files: `geode.properties` for system-level configuration and `cache.xml` for cache-level configuration.
 
-The configuration of the caches is part of the application development process. See [Cache Initialization File](../cache-init-file/chapter-overview.html#chapter-overview). (The cache-level configuration file is generally referred to as `cache.xml`, but you can use any name.)
+The configuration of the caches is part of the application development process. See [Cache Initialization File (cache.xml)](../cache-init-file/chapter-overview.html#chapter-overview). (The cache-level configuration file is generally referred to as `cache.xml`, but you can use any name.)
 
-## <a id="native-client-config__section_67D24B8F8C6C46CDA3474E6E42963D04" class="no-quick-link"></a>About gfcpp.properties Configuration File
+## <a id="native-client-config__section_67D24B8F8C6C46CDA3474E6E42963D04" class="no-quick-link"></a>About the geode.properties Configuration File
 
-The `gfcpp.properties` file provides local settings required to connect a client to a distributed system, along with settings for licensing, logging, and statistics. See [Attributes in gfcpp.properties](attributes-gfcpp.html#attributes-gfcpp).
+The `geode.properties` file provides local settings required to connect a client to a distributed system, along with settings for licensing, logging, and statistics. See [Attributes in the Properties File](propfile_attributes.html#attributes-gfcpp).
 
-The application software may include a set of `gfcpp.properties` files. You set any attributes needed for the application design in these files, then you can add any attributes needed for the local site.
+The application software may include a set of `geode.properties` files. You set any attributes needed for the application design in these files, then you can add any attributes needed for the local site.
 
-If you do not have `gfcpp.properties` files, use any text editor to create them. See [gfcpp.properties Example File](../gfcpp.properties/chapter_overview.html#concept_41DADD6F4E41495A89CCBB8A790ED9DF) for a sample of the file format and contents.
+If you do not have `geode.properties` files, use any text editor to create them. See [Properties File Example](propfile_overview.html#concept_41DADD6F4E41495A89CCBB8A790ED9DF) for a sample of the file format and contents.
 
 ## <a id="native-client-config__section_88780874FD6C4BBD9B1B993758A985BB" class="no-quick-link"></a>Configuration File Locations
 
-A client looks for a `gfcpp.properties` file first in the working directory where the process runs, then in <code>_product-dir_/defaultSystem</code>.
-Use the `defaultSystem` directory to group configuration files or to share them among processes for more convenient administration. If `gfcpp.properties` is not found, the process starts up with the default settings.
+A client looks for a `geode.properties` file first in the working directory where the process runs, then in <code>_product-dir_/defaultSystem</code>.
+Use the `defaultSystem` directory to group configuration files or to share them among processes for more convenient administration. If `geode.properties` is not found, the process starts up with the default settings.
 
-For the `cache.xml` cache configuration file, a client looks for the path specified by the `cache-xml-file` attribute in `gfcpp.properties` (see [Attributes in gfcpp.properties](attributes-gfcpp.html#attributes-gfcpp)). If the `cache.xml` is not found, the process starts with an unconfigured cache.
+For the `cache.xml` cache configuration file, a client looks for the path specified by the `cache-xml-file` attribute in `geode.properties` (see [Attributes in the Properties File](propfile_attributes.html#attributes-gfcpp)). If the `cache.xml` is not found, the process starts with an unconfigured cache.
 
 ## <a id="native-client-config__section_6EBE269F15A1497BB4ABBF659F978DA1" class="no-quick-link"></a>Configuring System Properties for the Client
 
 The typical configuration procedure for a client includes the high-level steps listed below. The rest of this chapter provides the details.
 
-1.  Place the `gfcpp.properties` file for the application in the working directory or in <code>_product-dir_/defaultSystem</code>.
-Use the configuration file that came with the application software if there is one, or create your own. See [gfcpp.properties Example File](../gfcpp.properties/chapter_overview.html#concept_41DADD6F4E41495A89CCBB8A790ED9DF) for a sample of the file format and contents.
-2.  Place the `cache.xml` file for the application in the desired location and specify its path in the `gfcpp.properties` file.
-3.  Add other attributes to the `gfcpp.properties` file as needed for the local system architecture. See [Attributes in gfcpp.properties](attributes-gfcpp.html#attributes-gfcpp) for the configurable attributes, and [gfcpp.properties Example File](../gfcpp.properties/chapter_overview.html#concept_41DADD6F4E41495A89CCBB8A790ED9DF) for a sample of the file format.
+1.  Place the `geode.properties` file for the application in the working directory or in <code>_product-dir_/defaultSystem</code>.
+Use the configuration file that came with the application software if there is one, or create your own. See [Properties File Example](propfile_overview.html#concept_41DADD6F4E41495A89CCBB8A790ED9DF) for a sample of the file format and contents.
+2.  Place the `cache.xml` file for the application in the desired location and specify its path in the `geode.properties` file.
+3.  Add other attributes to the `geode.properties` file as needed for the local system architecture. See [Attributes in the Properties File](propfile_attributes.html#attributes-gfcpp) for the configurable attributes, and [Properties File Example](propfile_overview.html#concept_41DADD6F4E41495A89CCBB8A790ED9DF) for a sample of the file format.
 
 ## <a id="native-client-config__section_7F09E85DD0144972AAA7028D81780129" class="no-quick-link"></a>Running a Client Out of the Box
 
-If you start a client without any configuration, it uses any attributes set programmatically plus any hard-coded defaults (listed in [Attributes in gfcpp.properties](attributes-gfcpp.html#attributes-gfcpp)). Running with the defaults is a convenient way to learn the operation of the distributed system and to test which attributes need to be reconfigured for your environment.
+If you start a client without any configuration, it uses any attributes set programmatically plus any hard-coded defaults (listed in [Attributes in the Properties File](propfile_attributes.html#attributes-gfcpp)). Running with the defaults is a convenient way to learn the operation of the distributed system and to test which attributes need to be reconfigured for your environment.


[18/34] geode-native git commit: GEODE-2494: Replace SpinLock with spinlock_mutex.

Posted by jb...@apache.org.
GEODE-2494: Replace SpinLock with spinlock_mutex.

- Cleanup C++ standards.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 12cb7c95c196f475b5868c5d3e556ab404985c0e
Parents: 30c6fc7
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Tue Feb 21 22:00:21 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:22 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/PooledBasePool.hpp | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/12cb7c95/src/cppcache/src/PooledBasePool.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/PooledBasePool.hpp b/src/cppcache/src/PooledBasePool.hpp
index f065cb1..2e5cc23 100644
--- a/src/cppcache/src/PooledBasePool.hpp
+++ b/src/cppcache/src/PooledBasePool.hpp
@@ -22,23 +22,27 @@
 
 #include <geode/geode_globals.hpp>
 #include <geode/SharedPtr.hpp>
-#include "SpinLock.hpp"
 #include "PooledBase.hpp"
 #include <deque>
 
+#include <mutex>
+#include "util/concurrent/spinlock_mutex.hpp"
+
 namespace apache {
 namespace geode {
 namespace client {
 
+using util::concurrent::spinlock_mutex;
+
 class CPPCACHE_EXPORT PooledBasePool {
-  SpinLock m_poolLock;
+  spinlock_mutex m_poolLock;
   std::deque<PooledBase*> m_pooldata;
 
  public:
   PooledBasePool() : m_poolLock(), m_pooldata() {}
 
   ~PooledBasePool() {
-    SpinLockGuard guard(m_poolLock);
+    std::lock_guard<spinlock_mutex> guard(m_poolLock);
     while (!m_pooldata.empty()) {
       PooledBase* item = m_pooldata.front();
       m_pooldata.pop_front();
@@ -49,28 +53,28 @@ class CPPCACHE_EXPORT PooledBasePool {
   inline void returnToPool(PooledBase* poolable) {
     poolable->prePool();
     {
-      SpinLockGuard guard(m_poolLock);
+      std::lock_guard<spinlock_mutex> guard(m_poolLock);
       m_pooldata.push_back(const_cast<PooledBase*>(poolable));
     }
   }
 
   inline PooledBase* takeFromPool() {
-    PooledBase* result = NULL;
+    PooledBase* result = nullptr;
     {
-      SpinLockGuard guard(m_poolLock);
+      std::lock_guard<spinlock_mutex> guard(m_poolLock);
       if (!m_pooldata.empty()) {
         result = m_pooldata.front();
         m_pooldata.pop_front();
       }
     }
-    if (result != NULL) {
+    if (result != nullptr) {
       result->postPool();
     }
     return result;
   }
 
   inline void clear() {
-    SpinLockGuard guard(m_poolLock);
+    std::lock_guard<spinlock_mutex> guard(m_poolLock);
     while (!m_pooldata.empty()) {
       PooledBase* item = m_pooldata.front();
       m_pooldata.pop_front();


[05/34] geode-native git commit: GEODE-2636: Ensure reasonable default library names.

Posted by jb...@apache.org.
GEODE-2636: Ensure reasonable default library names.

This closes #50


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

Branch: refs/heads/feature/GEODE-2602
Commit: 7836549522817c97b6a319b19353265eaf3257c5
Parents: db9d541
Author: Sarge <md...@pivotal.io>
Authored: Thu Mar 9 13:12:09 2017 -0800
Committer: Anthony Baker <ab...@apache.org>
Committed: Thu Mar 9 13:15:04 2017 -0800

----------------------------------------------------------------------
 src/quickstart/cpp/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/78365495/src/quickstart/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/CMakeLists.txt b/src/quickstart/cpp/CMakeLists.txt
index e02e4c2..67ed69e 100644
--- a/src/quickstart/cpp/CMakeLists.txt
+++ b/src/quickstart/cpp/CMakeLists.txt
@@ -26,6 +26,9 @@ elseif(UNIX)
     set(DYNAMIC_LIBRARY_PATH LD_LIBRARY_PATH=${NATIVECLIENT_DIR}/lib)
 endif()
 
+set(PRODUCT_LIB_NAME "apache-geode" CACHE STRING "Binary name")
+set(PRODUCT_DLL_NAME "Apache.Geode" CACHE STRING ".Net Binary name")
+
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 


[22/34] geode-native git commit: GEODE-2494: Replace SpinLock with spinlock_mutex.

Posted by jb...@apache.org.
GEODE-2494: Replace SpinLock with spinlock_mutex.

- Cleanup C++ standards.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 60179e57b8c24ea28d8f0f7c2d69bfc95a94e258
Parents: eda4f62
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Wed Feb 22 17:58:05 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:23 2017 -0700

----------------------------------------------------------------------
 src/tests/cpp/fwklib/GsRandom.cpp        | 21 ++++++++++++++++-----
 src/tests/cpp/fwklib/GsRandom.hpp        |  6 ++++--
 src/tests/cpp/fwklib/MersenneTwister.cpp |  7 ++++---
 src/tests/cpp/fwklib/MersenneTwister.hpp |  4 ++--
 4 files changed, 26 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/60179e57/src/tests/cpp/fwklib/GsRandom.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/GsRandom.cpp b/src/tests/cpp/fwklib/GsRandom.cpp
index ae1c240..df13c44 100644
--- a/src/tests/cpp/fwklib/GsRandom.cpp
+++ b/src/tests/cpp/fwklib/GsRandom.cpp
@@ -17,13 +17,20 @@
 
 #include "GsRandom.hpp"
 
-using namespace apache::geode::client;
-using namespace apache::geode::client::testframework;
+#include <mutex>
+#include <util/concurrent/spinlock_mutex.hpp>
+
+namespace apache {
+namespace geode {
+namespace client {
+namespace testframework {
+
+using util::concurrent::spinlock_mutex;
 
 GsRandom *GsRandom::singleton = 0;
 MTRand GsRandom::gen;
 int32_t GsRandom::seedUsed = -101;
-SpinLock GsRandom::lck;
+spinlock_mutex GsRandom::lck;
 
 /**
   * Creates a new random number generator using a single
@@ -36,14 +43,14 @@ GsRandom *GsRandom::getInstance(int32_t seed) {
   if (singleton == 0) {
     setInstance(seed);
   } else {
-    SpinLockGuard guard(lck);
+    std::lock_guard<spinlock_mutex> guard(lck);
     setSeed(seed);
   }
   return singleton;
 }
 
 void GsRandom::setInstance(int32_t seed) {
-  SpinLockGuard guard(lck);
+  std::lock_guard<spinlock_mutex> guard(lck);
   if (singleton == 0) {
     singleton = new GsRandom();
     if (seed != -1) {
@@ -116,3 +123,7 @@ char *GsRandom::randomAlphanumericString(int32_t max, int32_t min,
   buf[len] = 0;
   return buf;
 }
+}  // namespace testframework
+}  // namespace client
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/60179e57/src/tests/cpp/fwklib/GsRandom.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/GsRandom.hpp b/src/tests/cpp/fwklib/GsRandom.hpp
index 6c26d75..701568d 100644
--- a/src/tests/cpp/fwklib/GsRandom.hpp
+++ b/src/tests/cpp/fwklib/GsRandom.hpp
@@ -24,7 +24,7 @@
 
 #include <string>
 
-#include "SpinLock.hpp"
+#include <util/concurrent/spinlock_mutex.hpp>
 #include "MersenneTwister.hpp"
 
 namespace apache {
@@ -32,12 +32,14 @@ namespace geode {
 namespace client {
 namespace testframework {
 
+using util::concurrent::spinlock_mutex;
+
 class GsRandom {
  private:
   static MTRand gen;
   static GsRandom* singleton;
   static int32_t seedUsed;
-  static SpinLock lck;
+  static spinlock_mutex lck;
   static void setInstance(int32_t seed);
 
   GsRandom() {}

http://git-wip-us.apache.org/repos/asf/geode-native/blob/60179e57/src/tests/cpp/fwklib/MersenneTwister.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/MersenneTwister.cpp b/src/tests/cpp/fwklib/MersenneTwister.cpp
index 6b21318..7aedd02 100644
--- a/src/tests/cpp/fwklib/MersenneTwister.cpp
+++ b/src/tests/cpp/fwklib/MersenneTwister.cpp
@@ -74,9 +74,10 @@
 // Not thread safe (unless auto-initialization is avoided and each thread has
 // its own MTRand object)
 
+#include <mutex>
 #include "MersenneTwister.hpp"
 
-apache::geode::client::SpinLock MTRand::lck;
+apache::geode::util::concurrent::spinlock_mutex MTRand::lck;
 
 MTRand::MTRand(const uint32_t &oneSeed) { seed(oneSeed); }
 
@@ -116,7 +117,7 @@ double MTRand::randNorm(const double &mean, const double &variance) {
 uint32_t MTRand::randInt() {
   // Pull a 32-bit integer from the generator state
   // Every other access function simply transforms the numbers extracted here
-  apache::geode::client::SpinLockGuard guard(lck);
+  std::lock_guard<apache::geode::util::concurrent::spinlock_mutex> guard(lck);
 
   if (left <= 0) reload();
   --left;
@@ -212,7 +213,7 @@ void MTRand::seed() {
   }
 
   // Was not successful, so use time() and clock() instead
-  seed(hash(time(NULL), clock()));
+  seed(hash(time(nullptr), clock()));
 }
 
 void MTRand::initialize(const uint32_t seed) {

http://git-wip-us.apache.org/repos/asf/geode-native/blob/60179e57/src/tests/cpp/fwklib/MersenneTwister.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/MersenneTwister.hpp b/src/tests/cpp/fwklib/MersenneTwister.hpp
index 9fa1b95..b22683e 100644
--- a/src/tests/cpp/fwklib/MersenneTwister.hpp
+++ b/src/tests/cpp/fwklib/MersenneTwister.hpp
@@ -85,7 +85,7 @@
 #include <ctime>
 #include <math.h>
 
-#include "SpinLock.hpp"
+#include <util/concurrent/spinlock_mutex.hpp>
 #include <geode/geode_base.hpp>
 
 class MTRand {
@@ -102,7 +102,7 @@ class MTRand {
   int32_t left;       // number of values left before reload needed
 
  private:
-  static apache::geode::client::SpinLock lck;
+  static apache::geode::util::concurrent::spinlock_mutex lck;
 
   // Methods
  public:


[30/34] geode-native git commit: GEODE-2602: Fixes C++11 issues with C++/CLI.

Posted by jb...@apache.org.
GEODE-2602: Fixes C++11 issues with C++/CLI.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 57e915b289e59d7fd5c3c97e4ade189cd798df73
Parents: e0145ac
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Wed Mar 15 17:38:02 2017 +0000
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:24 2017 -0700

----------------------------------------------------------------------
 src/cppcache/include/geode/CacheStatistics.hpp |  2 +
 src/cppcache/include/geode/SharedBase.hpp      | 15 +++---
 src/cppcache/src/PooledBasePool.cpp            | 56 +++++++++++++++++++++
 src/cppcache/src/PooledBasePool.hpp            | 42 ++--------------
 src/cppcache/src/SharedBase.cpp                | 16 ++++--
 src/cppcache/src/Utils.cpp                     | 12 ++++-
 6 files changed, 94 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/57e915b2/src/cppcache/include/geode/CacheStatistics.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/CacheStatistics.hpp b/src/cppcache/include/geode/CacheStatistics.hpp
index b7fbcfc..85e9d4b 100644
--- a/src/cppcache/include/geode/CacheStatistics.hpp
+++ b/src/cppcache/include/geode/CacheStatistics.hpp
@@ -22,6 +22,8 @@
 
 #include "geode_globals.hpp"
 #include "geode_types.hpp"
+#include <atomic>
+
 /**
  * @file
  */

http://git-wip-us.apache.org/repos/asf/geode-native/blob/57e915b2/src/cppcache/include/geode/SharedBase.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/SharedBase.hpp b/src/cppcache/include/geode/SharedBase.hpp
index 2528278..84389f4 100644
--- a/src/cppcache/include/geode/SharedBase.hpp
+++ b/src/cppcache/include/geode/SharedBase.hpp
@@ -22,7 +22,9 @@
  * limitations under the License.
  */
 
-#include <atomic>
+#include <memory>
+#include <functional>
+
 #include "geode_globals.hpp"
 
 /** @file
@@ -41,7 +43,7 @@ namespace client {
 class CPPCACHE_EXPORT SharedBase {
  public:
   /** Constructor. */
-  inline SharedBase() : m_refCount(0) {}
+  SharedBase();
 
   /** Atomically increment reference count */
   void preserveSB() const;
@@ -53,16 +55,17 @@ class CPPCACHE_EXPORT SharedBase {
   void releaseSB() const;
 
   /** @return the reference count */
-  inline int32_t refCount() { return m_refCount; }
+  int32_t refCount();
 
  protected:
   inline SharedBase(bool noInit) {}
-  inline SharedBase(const SharedBase&) {}
+  inline SharedBase(const SharedBase&) : SharedBase() {};
 
-  virtual ~SharedBase() {}
+  virtual ~SharedBase() {};
 
  private:
-  std::atomic<int32_t> m_refCount;
+  // workaround for std::atomic not allowed in managed code.
+  mutable std::unique_ptr<void, std::function<void(void*)>> m_refCount;
 
   void operator=(const SharedBase& rhs);
 };

http://git-wip-us.apache.org/repos/asf/geode-native/blob/57e915b2/src/cppcache/src/PooledBasePool.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/PooledBasePool.cpp b/src/cppcache/src/PooledBasePool.cpp
new file mode 100644
index 0000000..f7f0b89
--- /dev/null
+++ b/src/cppcache/src/PooledBasePool.cpp
@@ -0,0 +1,56 @@
+
+#include <mutex>
+
+#include "PooledBasePool.hpp"
+#include "util/concurrent/spinlock_mutex.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+using util::concurrent::spinlock_mutex;
+
+PooledBasePool::~PooledBasePool() {
+  std::lock_guard<spinlock_mutex> guard(m_poolLock);
+  while (!m_pooldata.empty()) {
+    PooledBase* item = m_pooldata.front();
+    m_pooldata.pop_front();
+    delete item;
+  }
+}
+
+void PooledBasePool::returnToPool(PooledBase* poolable) {
+  poolable->prePool();
+  {
+    std::lock_guard<spinlock_mutex> guard(m_poolLock);
+    m_pooldata.push_back(const_cast<PooledBase*>(poolable));
+  }
+}
+
+PooledBase* PooledBasePool::takeFromPool() {
+  PooledBase* result = nullptr;
+  {
+    std::lock_guard<spinlock_mutex> guard(m_poolLock);
+    if (!m_pooldata.empty()) {
+      result = m_pooldata.front();
+      m_pooldata.pop_front();
+    }
+  }
+  if (result != nullptr) {
+    result->postPool();
+  }
+  return result;
+}
+
+void PooledBasePool::clear() {
+  std::lock_guard<spinlock_mutex> guard(m_poolLock);
+  while (!m_pooldata.empty()) {
+    PooledBase* item = m_pooldata.front();
+    m_pooldata.pop_front();
+    delete item;
+  }
+}
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/57e915b2/src/cppcache/src/PooledBasePool.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/PooledBasePool.hpp b/src/cppcache/src/PooledBasePool.hpp
index 2e5cc23..2608d97 100644
--- a/src/cppcache/src/PooledBasePool.hpp
+++ b/src/cppcache/src/PooledBasePool.hpp
@@ -25,7 +25,6 @@
 #include "PooledBase.hpp"
 #include <deque>
 
-#include <mutex>
 #include "util/concurrent/spinlock_mutex.hpp"
 
 namespace apache {
@@ -41,46 +40,13 @@ class CPPCACHE_EXPORT PooledBasePool {
  public:
   PooledBasePool() : m_poolLock(), m_pooldata() {}
 
-  ~PooledBasePool() {
-    std::lock_guard<spinlock_mutex> guard(m_poolLock);
-    while (!m_pooldata.empty()) {
-      PooledBase* item = m_pooldata.front();
-      m_pooldata.pop_front();
-      delete item;
-    }
-  }
+  ~PooledBasePool();
 
-  inline void returnToPool(PooledBase* poolable) {
-    poolable->prePool();
-    {
-      std::lock_guard<spinlock_mutex> guard(m_poolLock);
-      m_pooldata.push_back(const_cast<PooledBase*>(poolable));
-    }
-  }
+  void returnToPool(PooledBase* poolable);
 
-  inline PooledBase* takeFromPool() {
-    PooledBase* result = nullptr;
-    {
-      std::lock_guard<spinlock_mutex> guard(m_poolLock);
-      if (!m_pooldata.empty()) {
-        result = m_pooldata.front();
-        m_pooldata.pop_front();
-      }
-    }
-    if (result != nullptr) {
-      result->postPool();
-    }
-    return result;
-  }
+  PooledBase* takeFromPool();
 
-  inline void clear() {
-    std::lock_guard<spinlock_mutex> guard(m_poolLock);
-    while (!m_pooldata.empty()) {
-      PooledBase* item = m_pooldata.front();
-      m_pooldata.pop_front();
-      delete item;
-    }
-  }
+  void clear();
 };
 }  // namespace client
 }  // namespace geode

http://git-wip-us.apache.org/repos/asf/geode-native/blob/57e915b2/src/cppcache/src/SharedBase.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/SharedBase.cpp b/src/cppcache/src/SharedBase.cpp
index c1d9f0c..ec3ad91 100644
--- a/src/cppcache/src/SharedBase.cpp
+++ b/src/cppcache/src/SharedBase.cpp
@@ -17,18 +17,28 @@
 
 #include <geode/SharedBase.hpp>
 
-#include <typeinfo>
+#include <atomic>
+#include <memory>
+#include <functional>
 
 namespace apache {
 namespace geode {
 namespace client {
 
+using Counter = std::atomic<int32_t>;
+
+SharedBase::SharedBase() : m_refCount((void*) new Counter(0), [](void* ptr){
+  delete reinterpret_cast<Counter*>(ptr);
+}) {}
+
+int32_t SharedBase::refCount() { return *reinterpret_cast<Counter*>(m_refCount.get()); }
+
 void SharedBase::preserveSB() const {
-  ++const_cast<SharedBase*>(this)->m_refCount;
+  ++*reinterpret_cast<Counter*>(this->m_refCount.get());
 }
 
 void SharedBase::releaseSB() const {
-  if (--const_cast<SharedBase*>(this)->m_refCount == 0) {
+  if (--*reinterpret_cast<Counter*>(this->m_refCount.get()) == 0) {
     delete this;
   }
 }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/57e915b2/src/cppcache/src/Utils.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/Utils.cpp b/src/cppcache/src/Utils.cpp
index e954f6c..6ba5f93 100644
--- a/src/cppcache/src/Utils.cpp
+++ b/src/cppcache/src/Utils.cpp
@@ -22,16 +22,20 @@
 #include <cstdio>
 #include <chrono>
 
+#ifdef _WIN32
+
 namespace apache {
 namespace geode {
 namespace client {
 
-#ifdef _WIN32
-
 pNew Utils::s_pNew = NULL;
 pDelete Utils::s_pDelete = NULL;
 bool Utils::s_setNewAndDelete = false;
 
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
 void* operator new(size_t size) {
   if (!Utils::s_pNew) {
     apache::geode::client::setDefaultNewAndDelete();
@@ -52,6 +56,10 @@ void operator delete[](void* p) { operator delete(p); }
 
 #endif  // _WIN32
 
+namespace apache {
+namespace geode {
+namespace client {
+
 int RandGen::operator()(size_t max) {
   unsigned int seed = static_cast<unsigned int>(
       std::chrono::system_clock::now().time_since_epoch().count());


[25/34] geode-native git commit: GEODE-2494: Removed SpinLock.

Posted by jb...@apache.org.
GEODE-2494: Removed SpinLock.



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

Branch: refs/heads/feature/GEODE-2602
Commit: 4dd23356c21a444b2dadfb999d48b65abdd00b3f
Parents: 3dca9db
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Wed Feb 22 21:29:49 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:23 2017 -0700

----------------------------------------------------------------------
 src/cppcache/integration-test/testSpinLock.cpp |  46 ++--
 src/cppcache/src/CacheImpl.hpp                 |   1 -
 src/cppcache/src/EventId.hpp                   |   1 -
 src/cppcache/src/HostAsm.cpp                   |   2 -
 src/cppcache/src/HostAsm.hpp                   | 252 --------------------
 src/cppcache/src/LocalRegion.hpp               |   1 -
 src/cppcache/src/SpinLock.cpp                  |  37 ---
 src/cppcache/src/SpinLock.hpp                  | 122 ----------
 src/cppcache/src/TcrEndpoint.hpp               |   1 -
 src/cppcache/src/hostsolaris.asm               |  83 -------
 10 files changed, 21 insertions(+), 525 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/4dd23356/src/cppcache/integration-test/testSpinLock.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/testSpinLock.cpp b/src/cppcache/integration-test/testSpinLock.cpp
index cfaa810..7c13441 100644
--- a/src/cppcache/integration-test/testSpinLock.cpp
+++ b/src/cppcache/integration-test/testSpinLock.cpp
@@ -20,28 +20,23 @@
 #include "fw_dunit.hpp"
 #include <geode/GeodeCppCache.hpp>
 
+#include <mutex>
+#include <util/concurrent/spinlock_mutex.hpp>
+
 #include <Condition.hpp>
 
 #include <ace/Task.h>
 #include <ace/Time_Value.h>
 #include <ace/Guard_T.h>
 
-namespace apache {
-namespace geode {
-namespace client {
+namespace {
 
-CPPCACHE_EXPORT void* testSpinLockCreate();
-CPPCACHE_EXPORT void testSpinLockAcquire(void* lock);
-CPPCACHE_EXPORT void testSpinLockRelease(void* lock);
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
+using apache::geode::util::concurrent::spinlock_mutex;
 
 DUNIT_TASK(s1p1, Basic)
   {
-    void* lock = apache::geode::client::testSpinLockCreate();
-    apache::geode::client::testSpinLockAcquire(lock);
-    apache::geode::client::testSpinLockRelease(lock);
+    spinlock_mutex s;
+    { std::lock_guard<spinlock_mutex> lk(s); }
   }
 END_TASK(Basic)
 
@@ -49,7 +44,7 @@ perf::Semaphore* triggerA;
 perf::Semaphore* triggerB;
 perf::Semaphore* triggerM;
 
-void* lock;
+spinlock_mutex lock;
 ACE_Time_Value* btime;
 
 class ThreadA : public ACE_Task_Base {
@@ -57,11 +52,12 @@ class ThreadA : public ACE_Task_Base {
   ThreadA() : ACE_Task_Base() {}
 
   int svc() {
-    apache::geode::client::testSpinLockAcquire(lock);
-    LOG("ThreadA: Acquired lock x.");
-    triggerM->release();
-    triggerA->acquire();
-    apache::geode::client::testSpinLockRelease(lock);
+    {
+      std::lock_guard<spinlock_mutex> lk(lock);
+      LOG("ThreadA: Acquired lock x.");
+      triggerM->release();
+      triggerA->acquire();
+    }
     LOG("ThreadA: Released lock.");
     return 0;
   }
@@ -73,11 +69,12 @@ class ThreadB : public ACE_Task_Base {
 
   int svc() {
     triggerB->acquire();
-    apache::geode::client::testSpinLockAcquire(lock);
-    btime = new ACE_Time_Value(ACE_OS::gettimeofday());
-    LOG("ThreadB: Acquired lock.");
-    triggerM->release();
-    apache::geode::client::testSpinLockRelease(lock);  // for cleanly ness.
+    {
+      std::lock_guard<spinlock_mutex> lk(lock);
+      btime = new ACE_Time_Value(ACE_OS::gettimeofday());
+      LOG("ThreadB: Acquired lock.");
+      triggerM->release();
+    }
     return 0;
   }
 };
@@ -88,8 +85,6 @@ DUNIT_TASK(s1p1, TwoThreads)
     triggerB = new perf::Semaphore(0);
     triggerM = new perf::Semaphore(0);
 
-    lock = apache::geode::client::testSpinLockCreate();
-
     ThreadA* threadA = new ThreadA();
     ThreadB* threadB = new ThreadB();
 
@@ -159,3 +154,4 @@ DUNIT_TASK(s1p1, Cond)
     XASSERT(delta.msec() >= (delay.msec() - 50));
   }
 ENDTASK
+}  // namespace

http://git-wip-us.apache.org/repos/asf/geode-native/blob/4dd23356/src/cppcache/src/CacheImpl.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CacheImpl.hpp b/src/cppcache/src/CacheImpl.hpp
index 84dc954..352b79d 100644
--- a/src/cppcache/src/CacheImpl.hpp
+++ b/src/cppcache/src/CacheImpl.hpp
@@ -27,7 +27,6 @@
 #include <geode/CacheAttributes.hpp>
 #include <geode/DistributedSystem.hpp>
 #include "MapWithLock.hpp"
-#include "SpinLock.hpp"
 #include <ace/ACE.h>
 #include <ace/Condition_Recursive_Thread_Mutex.h>
 #include <ace/Time_Value.h>

http://git-wip-us.apache.org/repos/asf/geode-native/blob/4dd23356/src/cppcache/src/EventId.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/EventId.hpp b/src/cppcache/src/EventId.hpp
index 92d17a6..cae6bdd 100644
--- a/src/cppcache/src/EventId.hpp
+++ b/src/cppcache/src/EventId.hpp
@@ -24,7 +24,6 @@
 #include <geode/geode_types.hpp>
 #include <geode/Cacheable.hpp>
 #include "GeodeTypeIdsImpl.hpp"
-#include "SpinLock.hpp"
 #include <geode/DataOutput.hpp>
 
 #include <string>

http://git-wip-us.apache.org/repos/asf/geode-native/blob/4dd23356/src/cppcache/src/HostAsm.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/HostAsm.cpp b/src/cppcache/src/HostAsm.cpp
index 763256b..6a65249 100644
--- a/src/cppcache/src/HostAsm.cpp
+++ b/src/cppcache/src/HostAsm.cpp
@@ -25,8 +25,6 @@
 
 using namespace apache::geode::client;
 
-int32_t HostAsm::m_SpinCount = 0;
-
 // TODO refactor - why do we have our own atomic methods? why not use C++11?
 
 #if defined(_LINUX) || defined(_X86_SOLARIS)

http://git-wip-us.apache.org/repos/asf/geode-native/blob/4dd23356/src/cppcache/src/HostAsm.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/HostAsm.hpp b/src/cppcache/src/HostAsm.hpp
index 770cb5d..3fe59a4 100644
--- a/src/cppcache/src/HostAsm.hpp
+++ b/src/cppcache/src/HostAsm.hpp
@@ -55,37 +55,10 @@ namespace apache {
 namespace geode {
 namespace client {
 
-typedef volatile uint32_t SpinLockField;
-
-/* These should be defined the same as their HOST_LOCK counterparts. */
-#if defined(FLG_SOLARIS_UNIX)
-
-// StaticSpinLock assumes that SpinLock values are initialized to zero!
-
-/* no longer using the ldstub instruction, now using cas */
-/*  Use the high order 4 bytes of the word as the lock */
-enum { SPINLOCK_SET_INT = 0xf0000000 };
-enum { SPINLOCK_SET_BYTE = 0xf0 };
-enum { SPINLOCK_CLEAR_INT = 0 };
-enum { SPINLOCK_CLEAR_BYTE = 0 };
-
-#else
-
-// StaticSpinLock assumes that SpinLock values are initialized to zero!
-
-/* default Windows and x86 Linux */
-enum { SPINLOCK_SET_INT = 1 };
-enum { SPINLOCK_SET_BYTE = 1 };
-enum { SPINLOCK_CLEAR_INT = 0 };
-enum { SPINLOCK_CLEAR_BYTE = 0 };
-
-#endif
 
 #ifdef _SPARC_SOLARIS
 // implemented in hostsolaris.asm
 extern "C" {
-void HostAsmUnlock(int32_t, SpinLockField*);
-bool HostAsmTryLock(SpinLockField*, int32_t, uint32_t);
 int32_t InterlockedExchangeAdd(volatile int32_t*, int32_t);
 // int64_t InterlockedExchangeAddLong(volatile int64_t *, int64_t);
 }
@@ -103,136 +76,6 @@ int32_t InterlockedCompareExchange(volatile LONG*, int32_t, int32_t);
  */
 class CPPCACHE_EXPORT HostAsm {
  public:
-  enum HostSleepConsts {
-    SPIN_MIN_SLEEP = 250,
-    SPIN_SLEEP_LIMIT = 5000,
-    SPIN_COUNT = 3000
-  };
-
-  static void spinLockInit(SpinLockField& lockField) {
-    // StaticSpinLock assumes that SpinLock values are initialized to zero!
-    lockField = SPINLOCK_CLEAR_INT;
-  }
-
-  /**
-   *  Get exclusive access to the lock, return when the lock is granted.
-   */
-  inline static void spinLockAcquire(SpinLockField& lockField) {
-#if defined(_MACOSX)
-    OSSpinLockLock(reinterpret_cast<volatile int32_t*>(&lockField));
-#else
-    uint32_t lockVal = SPINLOCK_SET_INT;
-    int32_t spinCount = HostAsm::getSpinCount();
-    if (!HostAsm::_tryLock(lockField, spinCount, lockVal)) {
-      ACE_OS::thr_yield();
-      if (!HostAsm::_tryLock(lockField, spinCount, lockVal)) {
-        uint32_t lock_sleepTime = SPIN_MIN_SLEEP;
-        do {
-          HostAsm::nanoSleep(lock_sleepTime);
-          if (lock_sleepTime < SPIN_SLEEP_LIMIT) {
-            lock_sleepTime++;
-          }
-        } while (!HostAsm::_tryLock(lockField, spinCount, lockVal));
-      }
-    }
-#endif
-  }
-
-  inline static int32_t getCpuCount() {
-#ifdef _WIN32
-    SYSTEM_INFO si;
-    GetSystemInfo(&si);
-    return si.dwNumberOfProcessors;
-#else
-    return static_cast<int32_t>(sysconf(_SC_NPROCESSORS_ONLN));
-#endif
-  }
-
-  inline static void nanoSleep(uint32_t time) {
-    timespec nanos;
-    nanos.tv_sec = 0;
-    nanos.tv_nsec = time;
-    timespec remaining;
-    remaining.tv_sec = 0;
-    remaining.tv_nsec = 0;
-    ACE_OS::nanosleep(&nanos, &remaining);
-  }
-
-  inline static int64_t currentTimeMs() {
-    return ACE_OS::gettimeofday().msec();
-  }
-
-#if 0  // Unused
-    /**
-     * Try to get exclusive access to the lock in the specified amount of time.
-     * Return whether the lock is granted.
-     */
-    inline static bool spinLockTryAcquire(SpinLockField& lockField,
-        int32_t msTimeout)
-    {
-#if defined(_MACOSX)
-      return OSSpinLockTry((volatile int32_t *) &lockField);
-#else
-      uint32_t lockVal = SPINLOCK_SET_INT;
-      int32_t spinCount = HostAsm::getSpinCount();
-      int64_t startTime = HostAsm::currentTimeMs();
-      if (!HostAsm::_tryLock(lockField, spinCount, lockVal)) {
-	      ACE_OS::thr_yield();
-	      if (!HostAsm::_tryLock(lockField, spinCount, lockVal)) {
-	        uint32_t lock_sleepTime = SPIN_MIN_SLEEP;
-	        do {
-	          HostAsm::nanoSleep(lock_sleepTime);
-            if (lock_sleepTime < SPIN_SLEEP_LIMIT) {
-              lock_sleepTime++;
-            }
-            if (HostAsm::currentTimeMs() - startTime > (int64_t)msTimeout) {
-              return false;
-            }
-          } while (!HostAsm::_tryLock(lockField, spinCount, lockVal));
-        }
-      }
-      return true;
-#endif
-    }
-#endif
-
-  /**
-   * Name - SpinUnlock
-   * Purpose -
-   *      Release the specified spinlock.
-   */
-  inline static void spinLockRelease(SpinLockField& lockField) {
-#ifdef _WIN32
-    InterlockedExchange((volatile LONG*)(&lockField), SPINLOCK_CLEAR_BYTE);
-#elif defined(_LINUX) /*|| defined(_X86_SOLARIS)*/
-
-    int oldval = SPINLOCK_CLEAR_BYTE;
-    __asm__ __volatile__("xchg %0, %1"
-                         : "=q"(oldval), "=m"(lockField)
-                         : "0"(oldval)
-                         : "memory");
-#elif defined(_SPARC_SOLARIS)
-    SpinLockField* lockPtr = &lockField;
-    HostAsmUnlock(SPINLOCK_CLEAR_BYTE, lockPtr);
-#elif defined(_X86_SOLARIS)
-    // atomic_cas_32((volatile uin32_t*)&lockField, 1, 0);
-    atomic_cas_32(&lockField, 1, 0);
-#elif defined(_MACOSX)
-    OSSpinLockUnlock(reinterpret_cast<volatile int32_t*>(&lockField));
-#else
-#error Port incomplete.
-#endif
-  }
-
-  static int32_t m_SpinCount;
-
-  inline static int32_t getSpinCount() {
-    if (HostAsm::m_SpinCount == 0) {
-      HostAsm::m_SpinCount =
-          (HostAsm::getCpuCount() == 1 ? 1 : int32_t(SPIN_COUNT));
-    }
-    return HostAsm::m_SpinCount;
-  }
 
 #if defined(_LINUX) || defined(_X86_SOLARIS)
   inline static int32_t InterlockedExchangeAdd(volatile int32_t* val,
@@ -342,101 +185,6 @@ class CPPCACHE_EXPORT HostAsm {
     return atomicAnd(data, ~mask);
   }
 
- private:
-#if !defined(_MACOSX)
-  inline static bool _tryLock(SpinLockField& lockField, int32_t count,
-                              uint32_t lockVal) {
-    GF_DEV_ASSERT(count > 0);
-#if defined(_LINUX)
-    int oldval = 1;  // Set to 1, since we use 0 as success.
-    do {
-      oldval = 1;
-      __asm__ __volatile__(
-          "lock\n"
-          "xchg %0,%1"
-          : "=q"(oldval), "=m"(lockField)
-          : "0"(SPINLOCK_SET_BYTE)
-          : "memory");
-      if (oldval == 0) {
-        return true;
-      }
-      __asm__ __volatile__("pause");
-      count--;
-    } while (count > 0);
-    if (oldval == 0) {
-      return true;
-    }
-    return false;
-#elif defined(_SPARC_SOLARIS)
-    SpinLockField* lockPtr = &lockField;
-    return HostAsmTryLock(lockPtr, count, lockVal);
-#elif defined(_X86_SOLARIS)
-    SpinLockField* lockPtr = &lockField;
-    do {
-      if (*lockPtr == SPINLOCK_CLEAR_INT) {
-        // if oldValue is zero, then it must have been updated to 1
-        // else if CAS was unsuccessful then it will still be locked i.e. 1
-        if (atomic_cas_32(lockPtr, 0, 1) == 0) {
-          return true;
-        }
-      }
-      // yield the thread if required to avoid tight spin
-      ACE_Thread::yield();
-      count--;
-    } while (count > 0);
-    return false;
-#elif defined(_WIN32)
-    SpinLockField* lockPtr = &lockField;
-    SpinLockField prevValue;
-    // SpinLockField prevCopy;
-    prevValue = *lockPtr;
-    do {
-      if (prevValue == SPINLOCK_CLEAR_INT) {
-        if (InterlockedCompareExchangeAcquire((volatile LONG*)lockPtr, lockVal,
-                                              SPINLOCK_CLEAR_INT) ==
-            SPINLOCK_CLEAR_INT) {
-          return true;
-        }
-      } else {
-#if defined(_MANAGED)
-        Sleep(0);
-#else
-        YieldProcessor();
-        YieldProcessor();
-        YieldProcessor();
-        YieldProcessor();
-        YieldProcessor();
-#endif
-      }
-      // Fancy atomic read, equivalent to prevValue = *lockPtr
-      prevValue = InterlockedExchangeAdd((volatile LONG*)(lockPtr), 0);
-    } while (--count >= 0);
-    return false;
-/*
-if(count--) {
-  return false;
-}
-prevCopy = prevValue;
-if(prevValue == SPINLOCK_CLEAR_INT) {
-  prevValue = InterlockedCompareExchangeAcquire(
-    (volatile LONG*)lockPtr, lockVal, prevValue);
-} else {
-  //Fancy atomic read, equivalent to prevValue = *lockPtr
-  prevValue = InterlockedExchangeAdd((volatile LONG*)(lockPtr), 0);
-
-  //This might be slightly faster
-  //prevValue = InterlockedCompareExchange((volatile LONG*)lockPtr,
-  //                                       prevValue, prevValue);
-}
-} while( prevCopy != prevValue );
-return true;
-*/
-#else
-#error Port impcomplete
-#endif
-    return true;
-  }
-#endif  // !defined(_MACOSX)
 };
 }  // namespace client
 }  // namespace geode

http://git-wip-us.apache.org/repos/asf/geode-native/blob/4dd23356/src/cppcache/src/LocalRegion.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LocalRegion.hpp b/src/cppcache/src/LocalRegion.hpp
index 0d0fa58..0998228 100644
--- a/src/cppcache/src/LocalRegion.hpp
+++ b/src/cppcache/src/LocalRegion.hpp
@@ -45,7 +45,6 @@
 #include "RegionInternal.hpp"
 #include "RegionStats.hpp"
 #include "EntriesMapFactory.hpp"
-#include "SpinLock.hpp"
 #include "SerializationRegistry.hpp"
 #include "MapWithLock.hpp"
 #include "CacheableToken.hpp"

http://git-wip-us.apache.org/repos/asf/geode-native/blob/4dd23356/src/cppcache/src/SpinLock.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/SpinLock.cpp b/src/cppcache/src/SpinLock.cpp
deleted file mode 100644
index 797f0d5..0000000
--- a/src/cppcache/src/SpinLock.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.
- */
-
-#include <geode/geode_globals.hpp>
-
-#include "SpinLock.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-
-void* testSpinLockCreate() { return (void*)new SpinLock(); }
-
-void testSpinLockAcquire(void* lock) {
-  (reinterpret_cast<SpinLock*>(lock))->acquire();
-}
-
-void testSpinLockRelease(void* lock) {
-  (reinterpret_cast<SpinLock*>(lock))->release();
-}
-}  // namespace client
-}  // namespace geode
-}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/4dd23356/src/cppcache/src/SpinLock.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/SpinLock.hpp b/src/cppcache/src/SpinLock.hpp
deleted file mode 100644
index d91b7b3..0000000
--- a/src/cppcache/src/SpinLock.hpp
+++ /dev/null
@@ -1,122 +0,0 @@
-#pragma once
-
-#ifndef GEODE_SPINLOCK_H_
-#define GEODE_SPINLOCK_H_
-
-/*
- * 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.
- */
-
-#include "HostAsm.hpp"
-
-#ifdef DEBUG
-#define GF_SAFELOCK 1
-#else
-#define GF_SAFELOCK 0
-#endif
-
-namespace apache {
-namespace geode {
-namespace client {
-
-/**
- * For an object that needs to be protected by spinlock, declare a field of type
- * SpinLock. To protect the operation, use a SpinLockGuard on the stack to
- * automatically lock and then release when the stack is unwound..
- */
-class CPPCACHE_EXPORT SpinLock {
- public:
-  SpinLock()
-      : m_lockField(0)
-#if GF_SAFELOCK
-        ,
-        m_ownerId(0)
-#endif
-  {
-    HostAsm::spinLockInit(m_lockField);
-  }
-
-  ~SpinLock() {}
-
-  void acquire() {
-#if GF_SAFELOCK
-    int32_t ownerId = (int32_t)ACE_OS::thr_self();
-    GF_R_ASSERT(
-        (ownerId == 0) ||
-        (ownerId !=
-         m_ownerId));  // detect attempt to lock something I already have.
-#endif
-    HostAsm::spinLockAcquire(m_lockField);
-#if GF_SAFELOCK
-    m_ownerId = ownerId;
-#endif
-  }
-
-  void release() {
-#if GF_SAFELOCK
-    m_ownerId = 0;
-#endif
-    HostAsm::spinLockRelease(m_lockField);
-  }
-
- private:
-  SpinLockField m_lockField;
-#if GF_SAFELOCK
-  int32_t m_ownerId;
-#endif
-};
-
-/**
- * Example:
- *  class Foo {
- *    private:
- *
- *    SpinLock m_lock;
- *
- *    public:
- *
- *    Bool doSomething( )
- *    { SpinLockGuard __guard( m_lock );
- *      if ( ?? ) {
- *        return false;
- *      } else {
- *        if ( ?? ) throw ??
- *        return true;
- *      }
- *    }
- *  };
- *
- * The lock is automatically released no matter what return path is taken.
- */
-class SpinLockGuard {
- public:
-  SpinLockGuard(SpinLock& spinlock) : m_lock(spinlock) { m_lock.acquire(); }
-
-  ~SpinLockGuard() { m_lock.release(); }
-
- private:
-  SpinLock& m_lock;
-};
-
-// Test function
-CPPCACHE_EXPORT void* testSpinLockCreate();
-CPPCACHE_EXPORT void testSpinLockAcquire(void* lock);
-CPPCACHE_EXPORT void testSpinLockRelease(void* lock);
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_SPINLOCK_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/4dd23356/src/cppcache/src/TcrEndpoint.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcrEndpoint.hpp b/src/cppcache/src/TcrEndpoint.hpp
index 77ab3ab..61d43d2 100644
--- a/src/cppcache/src/TcrEndpoint.hpp
+++ b/src/cppcache/src/TcrEndpoint.hpp
@@ -30,7 +30,6 @@
 #include "Set.hpp"
 #include "TcrConnection.hpp"
 #include "Task.hpp"
-#include "SpinLock.hpp"
 
 namespace apache {
 namespace geode {

http://git-wip-us.apache.org/repos/asf/geode-native/blob/4dd23356/src/cppcache/src/hostsolaris.asm
----------------------------------------------------------------------
diff --git a/src/cppcache/src/hostsolaris.asm b/src/cppcache/src/hostsolaris.asm
index 03ae101..7a12bde 100644
--- a/src/cppcache/src/hostsolaris.asm
+++ b/src/cppcache/src/hostsolaris.asm
@@ -103,86 +103,3 @@ retryAddLong:                      ! do {
         retl 
         mov     %o3,%o0            ! return old value of *ctrPtr in %o0
 
-/*========================================================================
- *
- * Name - HostAsmUnlock
- *
- * Purpose -
- *      Unlock the specified lock.
- *
- *========================================================================
- */
-        .proc   16
-        .global HostAsmUnlock
-        .type HostAsmUnlock, #function
-HostAsmUnlock:
-        membar  #StoreStore | #LoadStore | #StoreLoad |  #LoadLoad
-        retl
-        st      %o0,[%o1]  ! store word, 32 bit
-!        st      %g0,[%o0]  ! store word, 32 bit
-
-/*========================================================================
- *
- * Name - HostAsmTryLock
- *
- * bool HostAsmTryLock(SpinLockField *lockPtr, int32_t count, uint32_t lockVal);
- * Purpose -
- *      Try to get access to the specified lock.  If it succeeds in getting
- *      the lock in the number of tries specified in by count,
- *      TRUE is returned.  If the lock is not available with the count
- *      tries, it returns FALSE.
- *
- *========================================================================
- */
-        .seg    "text"
-        .proc   16
-        .global HostAsmTryLock
-        .type HostAsmTryLock, #function
-HostAsmTryLock:
-                                        ! %o0 = lockPtr
-                                        ! %o1 = count
-                                        ! %o2 = lock value to store
-
-        ld      [%o0],%o3               ! load *lockPtr
-        tst     %o3                     ! test if 0
-        bne     spinLoop                ! if not 0 we must spin
-        mov     %o2, %o3                ! branch delay slot, new value into o3
-tryLock:
-                                   ! %o0 = memPtr
-                                   ! %g0 = oldValue (zero)
-                                   ! %o3 = newValue
-                                   ! if (%g0 == *memPtr)
-                                   !   tmp = *memPtr, *memPtr = %o3, %o3 = tmp
-                                   ! else
-                                   !   %o3 = *memPtr
-        cas     [%o0], %g0, %o3
-
-        tst     %o3                     ! what was value in lock word
-        be,a    return                  ! if 0 go to return
-        mov     1,%o3                   ! set return value
-
-
-
-spinLoop:
-        ld      [%o0],%o3               ! load *lockPtr
-        tst     %o3                     ! test if 0
-        be      tryLock                 ! if 0 we can retry the atomic swap
-        mov     %o2, %o3                ! branch delay slot, new value into o3
-
-        nop                             !  delay to limit frequency of probing
-        nop                             !    shared memory
-        nop
-        nop
-        nop
-
-        dec     %o1                     ! count--
-        tst     %o1                     ! test count
-        bg      spinLoop                ! count > 0 go to spinLoop
-        nop                             ! branch delay slot
-
-        mov     0,%o3                   ! fail because count ran out
-
-return:
-        membar  #LoadLoad | #LoadStore |  #StoreStore  | #StoreLoad
-        retl
-        add     %g0,%o3,%o0             ! move result to %o0 for return


[27/34] geode-native git commit: GEODE-2494: Remove dead code.

Posted by jb...@apache.org.
GEODE-2494: Remove dead code.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 09837a09c003c2b1dd5805016dca56596d545a67
Parents: c6a23f3
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Tue Feb 28 08:41:34 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:23 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/LRUList.cpp    | 3 ---
 src/cppcache/src/MapSegment.cpp | 5 -----
 2 files changed, 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/09837a09/src/cppcache/src/LRUList.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUList.cpp b/src/cppcache/src/LRUList.cpp
index 92b32f9..52cf22f 100644
--- a/src/cppcache/src/LRUList.cpp
+++ b/src/cppcache/src/LRUList.cpp
@@ -25,9 +25,6 @@ namespace client {
 
 using util::concurrent::spinlock_mutex;
 
-//#define LOCK_HEAD SpinLockGuard headLockGuard(m_headLock)
-//#define LOCK_TAIL SpinLockGuard tailLockGuard(m_tailLock)
-
 template <typename TEntry, typename TCreateEntry>
 LRUList<TEntry, TCreateEntry>::LRUList() : m_headLock(), m_tailLock() {
   LRUListEntryPtr headEntry(TCreateEntry::create(NULLPTR));

http://git-wip-us.apache.org/repos/asf/geode-native/blob/09837a09/src/cppcache/src/MapSegment.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/MapSegment.cpp b/src/cppcache/src/MapSegment.cpp
index 6396062..28a6890 100644
--- a/src/cppcache/src/MapSegment.cpp
+++ b/src/cppcache/src/MapSegment.cpp
@@ -320,7 +320,6 @@ GfErrType MapSegment::remove(const CacheableKeyPtr& key, CacheablePtr& oldValue,
                              MapEntryImplPtr& me, int updateCount,
                              VersionTagPtr versionTag, bool afterRemote,
                              bool& isEntryFound) {
-  //  std::lock_guard<spinlock_mutex> lk(m_spinlock);
   int status;
   MapEntryPtr entry;
   if (m_concurrencyChecksEnabled) {
@@ -330,13 +329,11 @@ GfErrType MapSegment::remove(const CacheableKeyPtr& key, CacheablePtr& oldValue,
     GfErrType err;
     {
       std::lock_guard<spinlock_mutex> lk(m_spinlock);
-      // if (m_concurrencyChecksEnabled)
       err = removeWhenConcurrencyEnabled(key, oldValue, me, updateCount,
                                          versionTag, afterRemote, isEntryFound,
                                          id, handler, expTaskSet);
     }
 
-    // if (m_concurrencyChecksEnabled){
     if (!expTaskSet) {
       CacheImpl::expiryTaskManager->cancelTask(id);
       delete handler;
@@ -461,8 +458,6 @@ void MapSegment::keys(VectorOfCacheableKey& result) {
  */
 void MapSegment::entries(VectorOfRegionEntry& result) {
   std::lock_guard<spinlock_mutex> lk(m_spinlock);
-  // printf("total_size)=%u, current_size=%u\n",
-  //  m_map->total_size(), m_map->current_size());
   for (CacheableKeyHashMap::iterator iter = m_map->begin();
        iter != m_map->end(); iter++) {
     CacheableKeyPtr keyPtr;


[17/34] geode-native git commit: GEODE-2494: Replace SpinLock with spinlock_mutex.

Posted by jb...@apache.org.
GEODE-2494: Replace SpinLock with spinlock_mutex.


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

Branch: refs/heads/feature/GEODE-2602
Commit: e1d9d0ce239eae89b029a903e003eae485105216
Parents: 2e6a5bc
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Mon Feb 20 13:42:19 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:22 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/LRUList.cpp | 47 ++++++++++++++++++++++++---------------
 src/cppcache/src/LRUList.hpp | 38 ++++++++++++++++---------------
 2 files changed, 49 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/e1d9d0ce/src/cppcache/src/LRUList.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUList.cpp b/src/cppcache/src/LRUList.cpp
index c752faa..00879c9 100644
--- a/src/cppcache/src/LRUList.cpp
+++ b/src/cppcache/src/LRUList.cpp
@@ -15,12 +15,18 @@
  * limitations under the License.
  */
 #include "LRUList.hpp"
-#include "SpinLock.hpp"
+#include "util/concurrent/spinlock_mutex.hpp"
 
-using namespace apache::geode::client;
+#include <mutex>
 
-#define LOCK_HEAD SpinLockGuard headLockGuard(m_headLock)
-#define LOCK_TAIL SpinLockGuard tailLockGuard(m_tailLock)
+namespace apache {
+namespace geode {
+namespace client {
+
+using util::concurrent::spinlock_mutex;
+
+//#define LOCK_HEAD SpinLockGuard headLockGuard(m_headLock)
+//#define LOCK_TAIL SpinLockGuard tailLockGuard(m_tailLock)
 
 template <typename TEntry, typename TCreateEntry>
 LRUList<TEntry, TCreateEntry>::LRUList() : m_headLock(), m_tailLock() {
@@ -32,9 +38,9 @@ LRUList<TEntry, TCreateEntry>::LRUList() : m_headLock(), m_tailLock() {
 
 template <typename TEntry, typename TCreateEntry>
 LRUList<TEntry, TCreateEntry>::~LRUList() {
-  m_tailNode = NULL;
+  m_tailNode = nullptr;
   LRUListNode* next;
-  while (m_headNode != NULL) {
+  while (m_headNode != nullptr) {
     next = m_headNode->getNextLRUListNode();
     delete m_headNode;
     m_headNode = next;
@@ -43,7 +49,7 @@ LRUList<TEntry, TCreateEntry>::~LRUList() {
 
 template <typename TEntry, typename TCreateEntry>
 void LRUList<TEntry, TCreateEntry>::appendEntry(const LRUListEntryPtr& entry) {
-  LOCK_TAIL;
+  std::lock_guard<spinlock_mutex> lk(m_tailLock);
 
   LRUListNode* aNode = new LRUListNode(entry);
   m_tailNode->setNextLRUListNode(aNode);
@@ -52,9 +58,9 @@ void LRUList<TEntry, TCreateEntry>::appendEntry(const LRUListEntryPtr& entry) {
 
 template <typename TEntry, typename TCreateEntry>
 void LRUList<TEntry, TCreateEntry>::appendNode(LRUListNode* aNode) {
-  LOCK_TAIL;
+  std::lock_guard<spinlock_mutex> lk(m_tailLock);
 
-  GF_D_ASSERT(aNode != NULL);
+  GF_D_ASSERT(aNode != nullptr);
 
   aNode->clearNextLRUListNode();
   m_tailNode->setNextLRUListNode(aNode);
@@ -66,8 +72,8 @@ void LRUList<TEntry, TCreateEntry>::getLRUEntry(LRUListEntryPtr& result) {
   bool isLast = false;
   LRUListNode* aNode;
   while (true) {
-    aNode = getHeadNode(isLast);
-    if (aNode == NULL) {
+    aNode = getHeadNode(&isLast);
+    if (aNode == nullptr) {
       result = NULLPTR;
       break;
     }
@@ -96,23 +102,24 @@ void LRUList<TEntry, TCreateEntry>::getLRUEntry(LRUListEntryPtr& result) {
 
 template <typename TEntry, typename TCreateEntry>
 typename LRUList<TEntry, TCreateEntry>::LRUListNode*
-LRUList<TEntry, TCreateEntry>::getHeadNode(bool& isLast) {
-  LOCK_HEAD;
+LRUList<TEntry, TCreateEntry>::getHeadNode(bool* isLast) {
+  std::lock_guard<spinlock_mutex> lk(m_headLock);
 
   LRUListNode* result = m_headNode;
   LRUListNode* nextNode;
 
   {
-    LOCK_TAIL;
+    std::lock_guard<spinlock_mutex> lk(m_tailLock);
+
     nextNode = m_headNode->getNextLRUListNode();
-    if (nextNode == NULL) {
+    if (nextNode == nullptr) {
       // last one in the list...
-      isLast = true;
+      *isLast = true;
       LRUListEntryPtr entry;
       result->getEntry(entry);
       if (entry->getLRUProperties().testEvicted()) {
         // list is empty.
-        return NULL;
+        return nullptr;
       } else {
         entry->getLRUProperties().setEvicted();
         return result;
@@ -120,9 +127,13 @@ LRUList<TEntry, TCreateEntry>::getHeadNode(bool& isLast) {
     }
   }
 
-  isLast = false;
+  *isLast = false;
   // advance head node, and return old value.
   m_headNode = nextNode;
 
   return result;
 }
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/e1d9d0ce/src/cppcache/src/LRUList.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUList.hpp b/src/cppcache/src/LRUList.hpp
index 3e1d30a..fc18fcd 100644
--- a/src/cppcache/src/LRUList.hpp
+++ b/src/cppcache/src/LRUList.hpp
@@ -20,32 +20,32 @@
  * limitations under the License.
  */
 
+#include <atomic>
+
 #include <geode/geode_globals.hpp>
 #include <geode/SharedPtr.hpp>
-#include "SpinLock.hpp"
+
+#include "util/concurrent/spinlock_mutex.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
+
 // Bit mask for recently used
-#define RECENTLY_USED_BITS 1ul
+#define RECENTLY_USED_BITS 1u
 // Bit mask for evicted
-#define EVICTED_BITS 2ul
+#define EVICTED_BITS 2u
 
 /**
  * @brief This class encapsulates LRU specific properties for a LRUList node.
  */
 class CPPCACHE_EXPORT LRUEntryProperties {
  public:
-  inline LRUEntryProperties() : m_bits(0), m_persistenceInfo(NULL) {}
+  inline LRUEntryProperties() : m_bits(0), m_persistenceInfo(nullptr) {}
 
-  inline void setRecentlyUsed() {
-    HostAsm::atomicSetBits(m_bits, RECENTLY_USED_BITS);
-  }
+  inline void setRecentlyUsed() { m_bits |= RECENTLY_USED_BITS; }
 
-  inline void clearRecentlyUsed() {
-    HostAsm::atomicClearBits(m_bits, RECENTLY_USED_BITS);
-  }
+  inline void clearRecentlyUsed() { m_bits &= ~RECENTLY_USED_BITS; }
 
   inline bool testRecentlyUsed() const {
     return (m_bits & RECENTLY_USED_BITS) == RECENTLY_USED_BITS;
@@ -55,9 +55,9 @@ class CPPCACHE_EXPORT LRUEntryProperties {
     return (m_bits & EVICTED_BITS) == EVICTED_BITS;
   }
 
-  inline void setEvicted() { HostAsm::atomicSetBits(m_bits, EVICTED_BITS); }
+  inline void setEvicted() { m_bits |= EVICTED_BITS; }
 
-  inline void clearEvicted() { HostAsm::atomicClearBits(m_bits, EVICTED_BITS); }
+  inline void clearEvicted() { m_bits &= ~EVICTED_BITS; }
 
   inline void* getPersistenceInfo() const { return m_persistenceInfo; }
 
@@ -70,10 +70,12 @@ class CPPCACHE_EXPORT LRUEntryProperties {
   inline LRUEntryProperties(bool noInit) {}
 
  private:
-  volatile uint32_t m_bits;
+  std::atomic<uint32_t> m_bits;
   void* m_persistenceInfo;
 };
 
+using util::concurrent::spinlock_mutex;
+
 /**
  * @brief Maintains a list of entries returning them through head in
  * approximate LRU order. The <code>TEntry</code> template argument
@@ -92,7 +94,7 @@ class LRUList {
   class LRUListNode {
    public:
     inline LRUListNode(const LRUListEntryPtr& entry)
-        : m_entry(entry), m_nextLRUListNode(NULL) {}
+        : m_entry(entry), m_nextLRUListNode(nullptr) {}
 
     inline ~LRUListNode() {}
 
@@ -104,7 +106,7 @@ class LRUList {
       m_nextLRUListNode = next;
     }
 
-    inline void clearNextLRUListNode() { m_nextLRUListNode = NULL; }
+    inline void clearNextLRUListNode() { m_nextLRUListNode = nullptr; }
 
    private:
     LRUListEntryPtr m_entry;
@@ -140,10 +142,10 @@ class LRUList {
    * @brief return the head entry in the list,
    * and removing it from the list.
    */
-  LRUListNode* getHeadNode(bool& isLast);
+  LRUListNode* getHeadNode(bool* isLast);
 
-  SpinLock m_headLock;
-  SpinLock m_tailLock;
+  spinlock_mutex m_headLock;
+  spinlock_mutex m_tailLock;
 
   LRUListNode* m_headNode;
   LRUListNode* m_tailNode;


[28/34] geode-native git commit: GEODE-2531: Replace HostAsm::atomic with std::atomic.

Posted by jb...@apache.org.
GEODE-2531: Replace HostAsm::atomic with std::atomic.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 1379afe284830cda0b2fc17fb076a9190709386b
Parents: 19c6171
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Wed Feb 22 22:38:03 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:23 2017 -0700

----------------------------------------------------------------------
 src/cppcache/include/geode/CacheStatistics.hpp  |   4 +-
 src/cppcache/include/geode/SharedBase.hpp       |   4 +-
 src/cppcache/include/geode/geode_globals.hpp    |   2 +-
 src/cppcache/integration-test/testSharedPtr.cpp |  38 ----
 src/cppcache/src/AtomicInc.hpp                  |  90 ---------
 src/cppcache/src/CMakeLists.txt                 |   8 -
 src/cppcache/src/CacheStatistics.cpp            |   5 +-
 src/cppcache/src/ConcurrentEntriesMap.cpp       |   7 +-
 src/cppcache/src/ConcurrentEntriesMap.hpp       |   7 +-
 src/cppcache/src/HostAsm.cpp                    | 136 -------------
 src/cppcache/src/HostAsm.hpp                    | 197 -------------------
 src/cppcache/src/LRUEntriesMap.cpp              |   2 +-
 src/cppcache/src/LRUEntriesMap.hpp              |   5 +-
 src/cppcache/src/MapEntry.hpp                   |  16 +-
 src/cppcache/src/MapSegment.cpp                 |   2 +-
 src/cppcache/src/MapSegment.hpp                 |   4 +-
 src/cppcache/src/PooledBase.cpp                 |   6 +-
 src/cppcache/src/PooledBase.hpp                 |   3 +-
 src/cppcache/src/SharedBase.cpp                 |   7 +-
 src/cppcache/src/TXId.cpp                       |   2 +-
 src/cppcache/src/TXId.hpp                       |   4 +-
 src/cppcache/src/TcrConnection.cpp              |   8 +-
 src/cppcache/src/TcrConnection.hpp              |   3 +-
 src/cppcache/src/TcrEndpoint.hpp                |   7 +-
 src/cppcache/src/TcrMessage.hpp                 |   4 +-
 src/cppcache/src/ThinClientPoolDM.cpp           |  41 ++--
 src/cppcache/src/ThinClientPoolDM.hpp           |   4 +-
 src/cppcache/src/hostsolaris.asm                | 105 ----------
 .../src/statistics/AtomicStatisticsImpl.cpp     |  41 ++--
 .../src/statistics/AtomicStatisticsImpl.hpp     |  14 +-
 src/cppcache/src/statistics/HostStatHelper.cpp  |   2 +-
 .../src/statistics/StatisticsManager.cpp        |  15 +-
 src/tests/cpp/fwklib/ClientTask.hpp             |  18 +-
 src/tests/cpp/fwklib/PerfFwk.hpp                |   1 -
 src/tests/cpp/fwklib/PoolHelper.hpp             |   2 +-
 src/tests/cpp/fwklib/RegionHelper.hpp           |   2 +-
 src/tests/cpp/fwklib/Service.cpp                |   2 +-
 src/tests/cpp/fwklib/Service.hpp                |  12 +-
 src/tests/cpp/fwklib/UDPIpc.hpp                 |  20 +-
 39 files changed, 136 insertions(+), 714 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/include/geode/CacheStatistics.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/CacheStatistics.hpp b/src/cppcache/include/geode/CacheStatistics.hpp
index a646c16..b7fbcfc 100644
--- a/src/cppcache/include/geode/CacheStatistics.hpp
+++ b/src/cppcache/include/geode/CacheStatistics.hpp
@@ -102,8 +102,8 @@ class CPPCACHE_EXPORT CacheStatistics : public SharedBase {
   virtual void setLastAccessedTime(uint32_t lat);
   virtual void setLastModifiedTime(uint32_t lmt);
 
-  volatile uint32_t m_lastAccessTime;
-  volatile uint32_t m_lastModifiedTime;
+  std::atomic<uint32_t> m_lastAccessTime;
+  std::atomic<uint32_t> m_lastModifiedTime;
 
   friend class LocalRegion;
 };

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/include/geode/SharedBase.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/SharedBase.hpp b/src/cppcache/include/geode/SharedBase.hpp
index 97cb0ae..2528278 100644
--- a/src/cppcache/include/geode/SharedBase.hpp
+++ b/src/cppcache/include/geode/SharedBase.hpp
@@ -22,6 +22,7 @@
  * limitations under the License.
  */
 
+#include <atomic>
 #include "geode_globals.hpp"
 
 /** @file
@@ -56,11 +57,12 @@ class CPPCACHE_EXPORT SharedBase {
 
  protected:
   inline SharedBase(bool noInit) {}
+  inline SharedBase(const SharedBase&) {}
 
   virtual ~SharedBase() {}
 
  private:
-  mutable volatile int32_t m_refCount;
+  std::atomic<int32_t> m_refCount;
 
   void operator=(const SharedBase& rhs);
 };

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/include/geode/geode_globals.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/geode_globals.hpp b/src/cppcache/include/geode/geode_globals.hpp
index 76fd28e..2ca7e3d 100644
--- a/src/cppcache/include/geode/geode_globals.hpp
+++ b/src/cppcache/include/geode/geode_globals.hpp
@@ -96,7 +96,7 @@
 #define __has_cpp_attribute(x) 0
 #endif
 
-#if __has_cpp_attribute(deprecated)
+#if __cplusplus >= 201402L && __has_cpp_attribute(deprecated)
 // C++14 standard deprecated attribute
 #define __DEPRECATED__(msg) [[deprecated(msg)]]
 #elif defined(__GNUC__)

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/integration-test/testSharedPtr.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/testSharedPtr.cpp b/src/cppcache/integration-test/testSharedPtr.cpp
index a8753ad..67eb0fe 100644
--- a/src/cppcache/integration-test/testSharedPtr.cpp
+++ b/src/cppcache/integration-test/testSharedPtr.cpp
@@ -20,46 +20,8 @@
 #include "fw_dunit.hpp"
 #include <geode/GeodeCppCache.hpp>
 
-#include <HostAsm.hpp>
-
 using namespace apache::geode::client;
 
-// Test some HostAsm code first..
-DUNIT_TASK(s1p1, HostAsm)
-  {
-    volatile int32_t counter = 0;
-    XASSERT(counter == 0);
-    HostAsm::atomicAdd(counter, 1);
-    XASSERT(counter == 1);
-    HostAsm::atomicAdd(counter, 3);
-    XASSERT(counter == 4);
-
-    HostAsm::atomicAdd(counter, -1);
-    XASSERT(counter == 3);
-  }
-END_TASK(HostAsm)
-
-// Test Or and And.
-DUNIT_TASK(s1p1, AndOr)
-  {
-    volatile uint32_t bits = 0;
-    uint32_t mask1 = 0x00000001ul;
-    uint32_t mask2 = 0x00000002ul;
-
-    HostAsm::atomicOr(bits, mask1);
-    XASSERT(bits == 1);
-    HostAsm::atomicAnd(bits, ~mask1);
-    XASSERT(bits == 0);
-    HostAsm::atomicOr(bits, mask1);
-    HostAsm::atomicOr(bits, mask2);
-    XASSERT(bits == 3);
-    HostAsm::atomicAnd(bits, ~mask1);
-    XASSERT(bits == 2);
-    HostAsm::atomicAnd(bits, ~mask2);
-    XASSERT(bits == 0);
-  }
-END_TASK(AndOr)
-
 bool deleted = false;
 
 class TestObj : public SharedBase {

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/AtomicInc.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/AtomicInc.hpp b/src/cppcache/src/AtomicInc.hpp
deleted file mode 100644
index 36ce2c2..0000000
--- a/src/cppcache/src/AtomicInc.hpp
+++ /dev/null
@@ -1,90 +0,0 @@
-#pragma once
-
-#ifndef GEODE_ATOMICINC_H_
-#define GEODE_ATOMICINC_H_
-
-/*
- * 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.
- */
-
-#include <geode/geode_globals.hpp>
-
-#include "HostAsm.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-
-/**
- * @brief Atomic type wrapper for thread safe arithmetic limited to addition.
- */
-class CPPCACHE_EXPORT AtomicInc {
- private:
-  volatile int32_t m_value;
-
- public:
-  /** @brief Initialize m_value to c. */
-  AtomicInc(const int32_t c = 0) : m_value(c) {}
-  /** @brief reset m_value to c. */
-  void resetValue(const int32_t c = 0) { m_value = c; }
-
-  /** @brief  Atomically pre-increment m_value. */
-  int32_t operator++(void) {
-    // return ++m_value;
-    return HostAsm::atomicAdd(m_value, 1);
-  }
-
-  /** @brief  Atomically post-increment m_value. */
-  int32_t operator++(int) {
-    // return m_value++;
-    return HostAsm::atomicAddPostfix(m_value, 1);
-  }
-
-  /** @brief  Atomically increment m_value by rhs. */
-  int32_t operator+=(const int32_t &rhs) {
-    // return m_value += rhs;
-    return HostAsm::atomicAdd(m_value, rhs);
-  }
-
-  /** @brief  Atomically pre-decrement m_value. */
-  int32_t operator--(void) {
-    // return --m_value;
-    return HostAsm::atomicAdd(m_value, -1);
-  }
-
-  /** @brief  Atomically post-decrement m_value. */
-  int32_t operator--(int) {
-    // return m_value--;
-    return HostAsm::atomicAddPostfix(m_value, -1);
-  }
-
-  /** @brief  Atomically decrement m_value by rhs. */
-  int32_t operator-=(const int32_t &rhs) {
-    // return m_value -= rhs;
-    return HostAsm::atomicAdd(m_value, -1 * rhs);
-  }
-
-  /** @brief  Explicitly return m_value. */
-  int32_t value(void) const {
-    // return m_value;
-    return m_value;
-  }
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_ATOMICINC_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CMakeLists.txt b/src/cppcache/src/CMakeLists.txt
index 5a64d8a..07c6ad9 100644
--- a/src/cppcache/src/CMakeLists.txt
+++ b/src/cppcache/src/CMakeLists.txt
@@ -83,14 +83,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
     demangle
     kstat
   )
-  if (CMAKE_SYSTEM_PROCESSOR STREQUAL "sparc")
-    set(CMAKE_ASM_COMPILER fbe)
-    set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm)
-    set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -m64 -K PIC -L -s -P -o <OBJECT> <SOURCE>")
-    enable_language(ASM)
-    add_library(gfcppasm OBJECT impl/hostsolaris.asm)
-    set(SOURCES ${SOURCES} $<TARGET_OBJECTS:gfcppasm>)
-  endif()
 endif()
 if (${WIN32})
   target_link_libraries(_apache-geode INTERFACE

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/CacheStatistics.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CacheStatistics.cpp b/src/cppcache/src/CacheStatistics.cpp
index 994346b..d825946 100644
--- a/src/cppcache/src/CacheStatistics.cpp
+++ b/src/cppcache/src/CacheStatistics.cpp
@@ -16,7 +16,6 @@
  */
 
 #include <geode/CacheStatistics.hpp>
-#include <HostAsm.hpp>
 
 using namespace apache::geode::client;
 
@@ -28,11 +27,11 @@ CacheStatistics::CacheStatistics() {
 CacheStatistics::~CacheStatistics() {}
 
 void CacheStatistics::setLastModifiedTime(uint32_t lmt) {
-  HostAsm::atomicSet(m_lastModifiedTime, lmt);
+  m_lastModifiedTime = lmt;
 }
 
 void CacheStatistics::setLastAccessedTime(uint32_t lat) {
-  HostAsm::atomicSet(m_lastAccessTime, lat);
+  m_lastAccessTime = lat;
 }
 
 uint32_t CacheStatistics::getLastModifiedTime() const {

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/ConcurrentEntriesMap.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/ConcurrentEntriesMap.cpp b/src/cppcache/src/ConcurrentEntriesMap.cpp
index d988026..cabc669 100644
--- a/src/cppcache/src/ConcurrentEntriesMap.cpp
+++ b/src/cppcache/src/ConcurrentEntriesMap.cpp
@@ -17,7 +17,6 @@
 #include "ConcurrentEntriesMap.hpp"
 #include "RegionInternal.hpp"
 #include "TableOfPrimes.hpp"
-#include "HostAsm.hpp"
 
 #include <algorithm>
 
@@ -170,7 +169,7 @@ void ConcurrentEntriesMap::values(VectorOfCacheable& result) const {
   }
 }
 
-uint32_t ConcurrentEntriesMap::size() const { return m_size.value(); }
+uint32_t ConcurrentEntriesMap::size() const { return m_size; }
 
 int ConcurrentEntriesMap::addTrackerForEntry(const CacheableKeyPtr& key,
                                              CacheablePtr& oldValue,
@@ -200,7 +199,7 @@ int ConcurrentEntriesMap::addTrackerForAllEntries(
     m_segments[index].addTrackerForAllEntries(updateCounterMap);
   }
   if (addDestroyTracking) {
-    return HostAsm::atomicAdd(m_numDestroyTrackers, 1);
+    return ++m_numDestroyTrackers;
   }
   return 0;
 }
@@ -209,7 +208,7 @@ void ConcurrentEntriesMap::removeDestroyTracking() {
   // This function is disabled if concurrency checks are enabled. The versioning
   // changes takes care of the version and no need for tracking the entry
   if (m_concurrencyChecksEnabled) return;
-  if (HostAsm::atomicAdd(m_numDestroyTrackers, -1) == 0) {
+  if (--m_numDestroyTrackers == 0) {
     for (int index = 0; index < m_concurrency; ++index) {
       m_segments[index].removeDestroyTracking();
     }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/ConcurrentEntriesMap.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/ConcurrentEntriesMap.hpp b/src/cppcache/src/ConcurrentEntriesMap.hpp
index 7bceedd..376b801 100644
--- a/src/cppcache/src/ConcurrentEntriesMap.hpp
+++ b/src/cppcache/src/ConcurrentEntriesMap.hpp
@@ -20,10 +20,11 @@
  * limitations under the License.
  */
 
+#include <atomic>
 #include <geode/geode_globals.hpp>
 #include "EntriesMap.hpp"
 #include "MapSegment.hpp"
-#include "AtomicInc.hpp"
+
 #include "ExpMapEntry.hpp"
 #include <geode/RegionEntry.hpp>
 
@@ -39,9 +40,9 @@ class CPPCACHE_EXPORT ConcurrentEntriesMap : public EntriesMap {
  protected:
   uint8_t m_concurrency;
   MapSegment* m_segments;
-  AtomicInc m_size;
+  std::atomic<uint32_t> m_size;
   RegionInternal* m_region;
-  volatile int m_numDestroyTrackers;
+  std::atomic<int32_t> m_numDestroyTrackers;
   bool m_concurrencyChecksEnabled;
   // TODO:  hashcode() is invoked 3-4 times -- need a better
   // implementation (STLport hash_map?) that will invoke it only once

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/HostAsm.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/HostAsm.cpp b/src/cppcache/src/HostAsm.cpp
deleted file mode 100644
index 6a65249..0000000
--- a/src/cppcache/src/HostAsm.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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.
- */
-
-#include "HostAsm.hpp"
-#include <ace/Atomic_Op_T.h>
-#include <ace/Recursive_Thread_Mutex.h>
-#ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-#endif
-
-using namespace apache::geode::client;
-
-// TODO refactor - why do we have our own atomic methods? why not use C++11?
-
-#if defined(_LINUX) || defined(_X86_SOLARIS)
-
-typedef long LONG;
-
-inline uint32_t InterlockedCompareExchange(volatile LONG* dest, uint32_t exch,
-                                           uint32_t comp) {
-#if defined(_LINUX)
-  uint32_t old;
-
-  __asm__ __volatile__("lock; cmpxchgl %2, %0"
-                       : "=m"(*dest), "=a"(old)
-                       : "r"(exch), "m"(*dest), "a"(comp));
-  return (old);
-#endif
-#if defined(_X86_SOLARIS)
-  uint32_t old;
-  old = atomic_cas_32((volatile uint32_t*)dest, comp, exch);
-  return (old);
-#endif
-}
-
-#endif
-
-#ifdef _SPARC_SOLARIS
-typedef long LONG;
-extern "C" {
-int32_t InterlockedCompareExchange(volatile LONG*, int32_t, int32_t);
-}
-#endif
-
-void HostAsm::atomicAnd(volatile uint32_t& ctr, uint32_t mask) {
-#if defined(_MACOSX)
-  OSAtomicAnd32Barrier(mask, &ctr);
-#else
-  bool success = false;
-  while (!success) {
-    uint32_t oldValue = ctr;
-    uint32_t newValue = oldValue & mask;
-    volatile LONG* signedctr = (volatile LONG*)&ctr;
-    if (InterlockedCompareExchange(signedctr, newValue, oldValue) == oldValue) {
-      return;
-    }
-  }
-#endif
-}
-// if return value is same as valuetoCompare that means you succeed, otherwise
-// some other thread change this value
-uint32_t HostAsm::atomicCompareAndExchange(volatile uint32_t& oldValue,
-                                           uint32_t newValue,
-                                           uint32_t valueToCompare) {
-#if defined(_MACOSX)
-  if (OSAtomicCompareAndSwap32Barrier(
-          valueToCompare, newValue,
-          reinterpret_cast<volatile int32_t*>(&oldValue))) {
-    return valueToCompare;
-  } else {
-    return oldValue;
-  }
-#else
-  volatile LONG* signedctr = (volatile LONG*)&oldValue;
-  uint32_t retVal =
-      InterlockedCompareExchange(signedctr, newValue, valueToCompare);
-
-  return retVal;
-#endif
-}
-
-void HostAsm::atomicOr(volatile uint32_t& ctr, uint32_t mask) {
-#if defined(_MACOSX)
-  OSAtomicOr32Barrier(mask, &ctr);
-#else
-  bool success = false;
-  while (!success) {
-    uint32_t oldValue = ctr;
-    uint32_t newValue = oldValue | mask;
-    volatile LONG* signedctr = (volatile LONG*)&ctr;
-    if (InterlockedCompareExchange(signedctr, newValue, oldValue) == oldValue) {
-      return;
-    }
-  }
-#endif
-}
-
-void HostAsm::atomicSet(volatile uint32_t& data, uint32_t newValue) {
-// TODO MACOSX this entire function makes no sense unless it is just to force
-// memory barriers
-#if defined(_MACOSX)
-  uint32_t oldValue;
-  do {
-    oldValue = data;
-  } while (!OSAtomicCompareAndSwap32Barrier(
-      oldValue, newValue, reinterpret_cast<volatile int32_t*>(&data)));
-
-#else
-  bool success = false;
-  while (!success) {
-    uint32_t oldValue = data;
-    volatile LONG* longData = (volatile LONG*)&data;
-    if (InterlockedCompareExchange(longData, newValue, oldValue) == oldValue) {
-      return;
-    }
-  }
-#endif
-}
-#ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
-#pragma clang diagnostic pop
-#endif

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/HostAsm.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/HostAsm.hpp b/src/cppcache/src/HostAsm.hpp
deleted file mode 100644
index 3fe59a4..0000000
--- a/src/cppcache/src/HostAsm.hpp
+++ /dev/null
@@ -1,197 +0,0 @@
-#pragma once
-
-#ifndef GEODE_HOSTASM_H_
-#define GEODE_HOSTASM_H_
-
-#ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-#endif
-
-/*
- * 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.
- */
-
-/*
-
-This file wraps the assembly spinlock routines, and related atomic update
-routines in the class apache::geode::client::util::util_impl::Host. Some ace is
-included.
-
-*/
-
-#include "config.h"
-#include <geode/geode_globals.hpp>
-#include <ace/ACE.h>
-#include <ace/Time_Value.h>
-#include <ace/OS_NS_time.h>
-#include <ace/OS_NS_sys_time.h>
-#include <ace/Thread.h>
-#ifdef _X86_SOLARIS
-#include <ace/Thread.h>
-#include <sys/atomic.h>
-#endif
-#if defined(_MACOSX)
-#include <libkern/OSAtomic.h>
-#endif
-/**
- * @file
- */
-
-namespace apache {
-namespace geode {
-namespace client {
-
-
-#ifdef _SPARC_SOLARIS
-// implemented in hostsolaris.asm
-extern "C" {
-int32_t InterlockedExchangeAdd(volatile int32_t*, int32_t);
-// int64_t InterlockedExchangeAddLong(volatile int64_t *, int64_t);
-}
-#endif
-/*
-#ifdef _X86_SOLARIS
-  extern "C" {
-typedef long LONG;
-  int32_t InterlockedExchangeAdd(volatile int32_t *, int32_t);
-int32_t InterlockedCompareExchange(volatile LONG*, int32_t, int32_t);
-}
-#endif*/
-/**
- *  hold static wrappers for spinlocks and atomic updates..
- */
-class CPPCACHE_EXPORT HostAsm {
- public:
-
-#if defined(_LINUX) || defined(_X86_SOLARIS)
-  inline static int32_t InterlockedExchangeAdd(volatile int32_t* val,
-                                               int32_t add) {
-#if defined(_LINUX)
-    int32_t ret;
-    __asm__ __volatile__("lock; xaddl %0, %1"
-                         : "=r"(ret), "=m"(*val)
-                         : "0"(add), "m"(*val));
-
-    return (ret);
-#endif
-#if defined(_X86_SOLARIS)
-    int32_t ret = *val;
-    atomic_add_32((volatile uint32_t*)val, add);
-    return ret + add;
-#endif
-  }
-// _SOLARIS case is handled in hostsolaris.asm
-#endif
-
-  // _SOLARIS case is handled in hostsolaris.asm
-
-  /**
-   * Name - atomicAdd
-   * Purpose -
-   *   Add 'increment' to  the counter pointed to be 'ctrPtr'.
-   *   Returns the value of the counter after the addition
-   */
-  inline static int32_t atomicAdd(volatile int32_t& counter, int32_t delta) {
-#ifdef _WIN32
-    return InterlockedExchangeAdd((volatile LONG*)(&counter), delta) + delta;
-#endif
-
-#ifdef _X86_SOLARIS
-    int32_t ret = counter;
-    atomic_add_32((volatile uint32_t*)&counter, delta);
-    return ret + delta;
-#endif
-
-#if defined(_LINUX) || defined(_SPARC_SOLARIS)
-    return InterlockedExchangeAdd(&counter, delta) + delta;
-#endif
-
-#if defined(_MACOSX)
-    return OSAtomicAdd32Barrier(delta, &counter);
-#endif
-  }
-
-  /**
-   * Name - atomicAddPostfix
-   * Purpose -
-   *   Add 'increment' to  the counter pointed to be 'ctrPtr'.
-   *   Returns the value of the counter before the addition
-   */
-  inline static int32_t atomicAddPostfix(volatile int32_t& counter,
-                                         int32_t delta) {
-#if defined(_WIN32)
-    return InterlockedExchangeAdd((volatile LONG*)(&counter), delta);
-#elif defined(_X86_SOLARIS)
-    int32_t ret = counter;
-    atomic_add_32((volatile uint32_t*)(&counter), delta);
-    return ret;
-#elif defined(_LINUX) || defined(_SPARC_SOLARIS)
-    return InterlockedExchangeAdd(&counter, delta);
-#elif defined(_MACOSX)
-    int32_t ret = counter;
-    OSAtomicAdd32Barrier(delta, &counter);
-    return ret;
-#else
-#error Port incomplete
-#endif
-  }
-
-  /**
-   * Name - AtomicAnd
-   *   Atomically AND the mask value into the given address
-   */
-  static void atomicAnd(volatile uint32_t& ctrField, uint32_t mask);
-
-  static uint32_t atomicCompareAndExchange(volatile uint32_t& oldValue,
-                                           uint32_t newValue,
-                                           uint32_t valueToCompare);
-
-  /**
-   * Name - AtomicOr
-   *  Atomically OR the mask value into the given address
-   */
-  static void atomicOr(volatile uint32_t& ctrField, uint32_t mask);
-
-  /**
-   * Atomically set masked bits to 1 in data.
-   */
-  inline static void atomicSetBits(volatile uint32_t& data, uint32_t mask) {
-    return atomicOr(data, mask);
-  }
-
-  /**
-   * Atomically set value of data to the given value.
-   */
-  static void atomicSet(volatile uint32_t& data, uint32_t newValue);
-
-  /**
-   * Atomically set masked bits to 0 in data.
-   */
-  inline static void atomicClearBits(volatile uint32_t& data, uint32_t mask) {
-    return atomicAnd(data, ~mask);
-  }
-
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
-#pragma clang diagnostic pop
-#endif
-
-#endif  // GEODE_HOSTASM_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/LRUEntriesMap.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUEntriesMap.cpp b/src/cppcache/src/LRUEntriesMap.cpp
index 154a1bd..b5906cf 100644
--- a/src/cppcache/src/LRUEntriesMap.cpp
+++ b/src/cppcache/src/LRUEntriesMap.cpp
@@ -182,7 +182,7 @@ GfErrType LRUEntriesMap::evictionHelper() {
 void LRUEntriesMap::processLRU(int32_t numEntriesToEvict) {
   int32_t evicted = 0;
   for (int32_t i = 0; i < numEntriesToEvict; i++) {
-    if (m_validEntries.value() > 0 && static_cast<int32_t>(size()) > 0) {
+    if (m_validEntries > 0 && size() > 0) {
       if (evictionHelper() == GF_NOERR) {
         evicted++;
       }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/LRUEntriesMap.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUEntriesMap.hpp b/src/cppcache/src/LRUEntriesMap.hpp
index 074bb1e..78b5b98 100644
--- a/src/cppcache/src/LRUEntriesMap.hpp
+++ b/src/cppcache/src/LRUEntriesMap.hpp
@@ -20,6 +20,7 @@
 #ifndef GEODE_LRUENTRIESMAP_H_
 #define GEODE_LRUENTRIESMAP_H_
 
+#include <atomic>
 #include <geode/geode_globals.hpp>
 #include <geode/Cache.hpp>
 #include "ConcurrentEntriesMap.hpp"
@@ -68,7 +69,7 @@ class CPPCACHE_EXPORT LRUEntriesMap : public ConcurrentEntriesMap,
   int64_t m_currentMapSize;
   spinlock_mutex m_mapInfoLock;
   std::string m_name;
-  AtomicInc m_validEntries;
+  std::atomic<uint32_t> m_validEntries;
   bool m_heapLRUEnabled;
 
  public:
@@ -127,7 +128,7 @@ class CPPCACHE_EXPORT LRUEntriesMap : public ConcurrentEntriesMap,
     }
   }
 
-  inline uint32_t validEntriesSize() const { return m_validEntries.value(); }
+  inline uint32_t validEntriesSize() const { return m_validEntries; }
 
   inline void adjustLimit(uint32_t limit) { m_limit = limit; }
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/MapEntry.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/MapEntry.hpp b/src/cppcache/src/MapEntry.hpp
index 4e05652..f1f10d0 100644
--- a/src/cppcache/src/MapEntry.hpp
+++ b/src/cppcache/src/MapEntry.hpp
@@ -20,12 +20,14 @@
  * limitations under the License.
  */
 
+#include <atomic>
+
 #include <geode/geode_globals.hpp>
 #include <geode/Cacheable.hpp>
 #include <geode/CacheableKey.hpp>
 #include <geode/SharedPtr.hpp>
 #include <geode/ExceptionTypes.hpp>
-#include "HostAsm.hpp"
+
 #include "CacheImpl.hpp"
 #include "ExpiryTaskManager.hpp"
 #include "RegionInternal.hpp"
@@ -65,16 +67,16 @@ class CPPCACHE_EXPORT ExpEntryProperties {
   // the costly gettimeofday call in MapSegment spinlock
   inline void initStartTime() {
     uint32_t currTime = static_cast<uint32_t>(ACE_OS::gettimeofday().sec());
-    HostAsm::atomicSet(m_lastModifiedTime, currTime);
-    HostAsm::atomicSet(m_lastAccessTime, currTime);
+    m_lastModifiedTime = currTime;
+    m_lastAccessTime = currTime;
   }
 
   inline void updateLastAccessTime(uint32_t currTime) {
-    HostAsm::atomicSet(m_lastAccessTime, currTime);
+    m_lastAccessTime = currTime;
   }
 
   inline void updateLastModifiedTime(uint32_t currTime) {
-    HostAsm::atomicSet(m_lastModifiedTime, currTime);
+    m_lastModifiedTime = currTime;
   }
 
   inline void setExpiryTaskId(long id) { m_expiryTaskId = id; }
@@ -93,9 +95,9 @@ class CPPCACHE_EXPORT ExpEntryProperties {
 
  private:
   /** last access time in secs, 32bit.. */
-  volatile uint32_t m_lastAccessTime;
+  std::atomic<uint32_t> m_lastAccessTime;
   /** last modified time in secs, 32bit.. */
-  volatile uint32_t m_lastModifiedTime;
+  std::atomic<uint32_t> m_lastModifiedTime;
   /** The expiry task id for this particular entry.. **/
   long m_expiryTaskId;
 };

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/MapSegment.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/MapSegment.cpp b/src/cppcache/src/MapSegment.cpp
index 28a6890..d9acd4c 100644
--- a/src/cppcache/src/MapSegment.cpp
+++ b/src/cppcache/src/MapSegment.cpp
@@ -42,7 +42,7 @@ MapSegment::~MapSegment() {
 }
 
 void MapSegment::open(RegionInternal* region, const EntryFactory* entryFactory,
-                      uint32_t size, volatile int* destroyTrackers,
+                      uint32_t size, std::atomic<int32_t>* destroyTrackers,
                       bool concurrencyChecksEnabled) {
   m_map = new CacheableKeyHashMap();
   uint32_t mapSize = TableOfPrimes::nextLargerPrime(size, m_primeIndex);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/MapSegment.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/MapSegment.hpp b/src/cppcache/src/MapSegment.hpp
index 97dbe77..fc7b52c 100644
--- a/src/cppcache/src/MapSegment.hpp
+++ b/src/cppcache/src/MapSegment.hpp
@@ -92,7 +92,7 @@ class CPPCACHE_EXPORT MapSegment {
   // number of operations that are tracking destroys
   // the m_destroyedKeys contains the set for which destroys
   // have been received as long as this number is greater than zero
-  volatile int* m_numDestroyTrackers;
+  std::atomic<int32_t>* m_numDestroyTrackers;
   MapOfUpdateCounters m_destroyedKeys;
 
   uint32_t m_rehashCount;
@@ -217,7 +217,7 @@ class CPPCACHE_EXPORT MapSegment {
    * Used when allocated in arrays by EntriesMap implementations.
    */
   void open(RegionInternal* region, const EntryFactory* entryFactory,
-            uint32_t size, volatile int* destroyTrackers,
+            uint32_t size, std::atomic<int32_t>* destroyTrackers,
             bool concurrencyChecksEnabled);
 
   void close();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/PooledBase.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/PooledBase.cpp b/src/cppcache/src/PooledBase.cpp
index c892eb3..fea95f4 100644
--- a/src/cppcache/src/PooledBase.cpp
+++ b/src/cppcache/src/PooledBase.cpp
@@ -20,7 +20,7 @@
  */
 
 #include "PooledBase.hpp"
-#include "HostAsm.hpp"
+
 #include "PooledBasePool.hpp"
 
 #include <typeinfo>
@@ -37,12 +37,12 @@ PooledBase::~PooledBase() { m_pool = NULL; }
 
 void PooledBase::preserveSB() const {
   PooledBase* self = const_cast<PooledBase*>(this);
-  HostAsm::atomicAdd(self->m_refCount, 1);
+  ++(self->m_refCount);
 }
 
 void PooledBase::releaseSB() const {
   PooledBase* self = const_cast<PooledBase*>(this);
-  if (HostAsm::atomicAdd(self->m_refCount, -1) == 0) {
+  if (--(self->m_refCount) == 0) {
     m_pool->returnToPool(self);
   }
 }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/PooledBase.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/PooledBase.hpp b/src/cppcache/src/PooledBase.hpp
index efdb7f4..2739b64 100644
--- a/src/cppcache/src/PooledBase.hpp
+++ b/src/cppcache/src/PooledBase.hpp
@@ -20,6 +20,7 @@
  * limitations under the License.
  */
 
+#include <atomic>
 #include <geode/geode_globals.hpp>
 
 namespace apache {
@@ -52,7 +53,7 @@ class CPPCACHE_EXPORT PooledBase {
   virtual void postPool();
 
  private:
-  volatile int32_t m_refCount;
+  std::atomic<int32_t> m_refCount;
   PooledBasePool* m_pool;
 
   void operator=(const PooledBase& rhs);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/SharedBase.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/SharedBase.cpp b/src/cppcache/src/SharedBase.cpp
index 976942d..c1d9f0c 100644
--- a/src/cppcache/src/SharedBase.cpp
+++ b/src/cppcache/src/SharedBase.cpp
@@ -16,7 +16,6 @@
  */
 
 #include <geode/SharedBase.hpp>
-#include <HostAsm.hpp>
 
 #include <typeinfo>
 
@@ -24,10 +23,12 @@ namespace apache {
 namespace geode {
 namespace client {
 
-void SharedBase::preserveSB() const { HostAsm::atomicAdd(m_refCount, 1); }
+void SharedBase::preserveSB() const {
+  ++const_cast<SharedBase*>(this)->m_refCount;
+}
 
 void SharedBase::releaseSB() const {
-  if (HostAsm::atomicAdd(m_refCount, -1) == 0) {
+  if (--const_cast<SharedBase*>(this)->m_refCount == 0) {
     delete this;
   }
 }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/TXId.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TXId.cpp b/src/cppcache/src/TXId.cpp
index e300465..57703f7 100644
--- a/src/cppcache/src/TXId.cpp
+++ b/src/cppcache/src/TXId.cpp
@@ -27,7 +27,7 @@ namespace apache {
 namespace geode {
 namespace client {
 
-AtomicInc TXId::m_transactionId = 1;
+std::atomic<int32_t> TXId::m_transactionId(1);
 
 TXId::TXId() : m_TXId(m_transactionId++) {}
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/TXId.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TXId.hpp b/src/cppcache/src/TXId.hpp
index de811b9..54aa2cc 100644
--- a/src/cppcache/src/TXId.hpp
+++ b/src/cppcache/src/TXId.hpp
@@ -29,7 +29,7 @@
 #include <geode/geode_types.hpp>
 #include <geode/TransactionId.hpp>
 #include <geode/DataOutput.hpp>
-#include "AtomicInc.hpp"
+#include <atomic>
 
 namespace apache {
 namespace geode {
@@ -46,7 +46,7 @@ class TXId : public apache::geode::client::TransactionId {
 
  private:
   const int32_t m_TXId;
-  static AtomicInc m_transactionId;
+  static std::atomic<int32_t> m_transactionId;
   TXId& operator=(const TXId&);
   TXId(const TXId&);
 };

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/TcrConnection.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcrConnection.cpp b/src/cppcache/src/TcrConnection.cpp
index 874ba42..87a865a 100644
--- a/src/cppcache/src/TcrConnection.cpp
+++ b/src/cppcache/src/TcrConnection.cpp
@@ -1574,8 +1574,7 @@ bool TcrConnection::setAndGetBeingUsed(volatile bool isBeingUsed,
   if (!forTransaction) {
     if (isBeingUsed) {
       if (m_isUsed == 1 || m_isUsed == 2) return false;
-      retVal = HostAsm::atomicCompareAndExchange(m_isUsed, 1, currentValue);
-      if (retVal == currentValue) return true;
+      if (m_isUsed.compare_exchange_strong(currentValue, 1)) return true;
       return false;
     } else {
       m_isUsed = 0;
@@ -1589,9 +1588,8 @@ bool TcrConnection::setAndGetBeingUsed(volatile bool isBeingUsed,
       if (m_isUsed == 2) {  // transaction thread has set, reused it
         return true;
       }
-      retVal = HostAsm::atomicCompareAndExchange(
-          m_isUsed, 2 /*for transaction*/, currentValue);
-      if (retVal == currentValue) return true;
+      if (m_isUsed.compare_exchange_strong(currentValue, 2 /*for transaction*/))
+        return true;
       return false;
     } else {
       // m_isUsed = 0;//this will done by releasing the connection by

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/TcrConnection.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcrConnection.hpp b/src/cppcache/src/TcrConnection.hpp
index 5cd5aa5..3f215bc 100644
--- a/src/cppcache/src/TcrConnection.hpp
+++ b/src/cppcache/src/TcrConnection.hpp
@@ -20,6 +20,7 @@
  * limitations under the License.
  */
 
+#include <atomic>
 #include <ace/Semaphore.h>
 #include <geode/geode_globals.hpp>
 #include <geode/ExceptionTypes.hpp>
@@ -399,7 +400,7 @@ class CPPCACHE_EXPORT TcrConnection {
   TcrConnection(const TcrConnection&);
   TcrConnection& operator=(const TcrConnection&);
   volatile bool m_isBeingUsed;
-  volatile uint32_t m_isUsed;
+  std::atomic<uint32_t> m_isUsed;
   ThinClientPoolDM* m_poolDM;
 };
 }  // namespace client

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/TcrEndpoint.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcrEndpoint.hpp b/src/cppcache/src/TcrEndpoint.hpp
index 61d43d2..8959c60 100644
--- a/src/cppcache/src/TcrEndpoint.hpp
+++ b/src/cppcache/src/TcrEndpoint.hpp
@@ -23,6 +23,7 @@
 #include <geode/geode_globals.hpp>
 #include <string>
 #include <list>
+#include <atomic>
 #include <ace/Recursive_Thread_Mutex.h>
 #include <ace/Semaphore.h>
 #include <geode/geode_base.hpp>
@@ -173,9 +174,7 @@ class CPPCACHE_EXPORT TcrEndpoint {
 
   int32_t numberOfTimesFailed() { return m_numberOfTimesFailed; }
 
-  void addConnRefCounter(int count) {
-    HostAsm::atomicAdd(m_noOfConnRefs, count);
-  }
+  void addConnRefCounter(int count) { m_noOfConnRefs += count; }
 
   int getConnRefCounter() { return m_noOfConnRefs; }
   virtual uint16_t getDistributedMemberID() { return m_distributedMemId; }
@@ -256,7 +255,7 @@ class CPPCACHE_EXPORT TcrEndpoint {
   TcrEndpoint(const TcrEndpoint&);
   TcrEndpoint& operator=(const TcrEndpoint&);
   // number of connections to this endpoint
-  volatile int32_t m_noOfConnRefs;
+  std::atomic<int32_t> m_noOfConnRefs;
   uint16_t m_distributedMemId;
 
  protected:

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/TcrMessage.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcrMessage.hpp b/src/cppcache/src/TcrMessage.hpp
index 1e3cc8b..2f81c76 100644
--- a/src/cppcache/src/TcrMessage.hpp
+++ b/src/cppcache/src/TcrMessage.hpp
@@ -21,7 +21,7 @@
  */
 
 #include <geode/geode_globals.hpp>
-#include "AtomicInc.hpp"
+#include <atomic>
 #include <geode/Cacheable.hpp>
 #include <geode/CacheableKey.hpp>
 #include <geode/CacheableString.hpp>
@@ -513,7 +513,7 @@ class CPPCACHE_EXPORT TcrMessage {
   SerializablePtr readCacheableBytes(DataInput& input, int lenObj);
   SerializablePtr readCacheableString(DataInput& input, int lenObj);
 
-  static AtomicInc m_transactionId;
+  static std::atomic<int32_t> m_transactionId;
   static TcrMessagePing* m_pingMsg;
   static TcrMessage* m_closeConnMsg;
   static TcrMessage* m_allEPDisconnected;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/ThinClientPoolDM.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/ThinClientPoolDM.cpp b/src/cppcache/src/ThinClientPoolDM.cpp
index f6fc356..3a3c572 100644
--- a/src/cppcache/src/ThinClientPoolDM.cpp
+++ b/src/cppcache/src/ThinClientPoolDM.cpp
@@ -477,7 +477,7 @@ void ThinClientPoolDM::cleanStaleConnections(volatile bool& isRunning) {
               _nextIdle.sec() + 1);
   }
 
-  LOGDEBUG("Pool size is %d, pool counter is %d", size(), m_poolSize);
+  LOGDEBUG("Pool size is %d, pool counter is %d", size(), m_poolSize.load());
 }
 void ThinClientPoolDM::cleanStickyConnections(volatile bool& isRunning) {}
 
@@ -510,7 +510,7 @@ void ThinClientPoolDM::restoreMinConnections(volatile bool& isRunning) {
   }
 
   LOGDEBUG("Restored %d connections", restored);
-  LOGDEBUG("Pool size is %d, pool counter is %d", size(), m_poolSize);
+  LOGDEBUG("Pool size is %d, pool counter is %d", size(), m_poolSize.load());
 }
 
 int ThinClientPoolDM::manageConnectionsInternal(volatile bool& isRunning) {
@@ -606,8 +606,7 @@ GfErrType ThinClientPoolDM::sendRequestToAllServers(
     ResultCollectorPtr& rs, CacheableStringPtr& exceptionPtr) {
   GfErrType err = GF_NOERR;
 
-  HostAsm::atomicAdd(m_clientOps, 1);
-  getStats().setCurClientOps(m_clientOps);
+  getStats().setCurClientOps(++m_clientOps);
 
   ACE_Recursive_Thread_Mutex resultCollectorLock;
 
@@ -679,8 +678,7 @@ GfErrType ThinClientPoolDM::sendRequestToAllServers(
     rs->endResults();
   }
 
-  HostAsm::atomicAdd(m_clientOps, -1);
-  getStats().setCurClientOps(m_clientOps);
+  getStats().setCurClientOps(--m_clientOps);
   getStats().incSucceedClientOps();
 
   delete[] fePtrList;
@@ -813,7 +811,7 @@ void ThinClientPoolDM::destroy(bool keepAlive) {
     }
     // closing all the thread local connections ( sticky).
     LOGDEBUG("ThinClientPoolDM::destroy( ): closing FairQueue, pool size = %d",
-             m_poolSize);
+             m_poolSize.load());
     close();
     LOGDEBUG("ThinClientPoolDM::destroy( ): after close ");
 
@@ -843,7 +841,7 @@ void ThinClientPoolDM::destroy(bool keepAlive) {
              m_isDestroyed);
   }
   if (m_poolSize != 0) {
-    LOGFINE("Pool connection size is not zero %d", m_poolSize);
+    LOGFINE("Pool connection size is not zero %d", m_poolSize.load());
   }
 }
 
@@ -1321,8 +1319,7 @@ GfErrType ThinClientPoolDM::sendSyncRequest(
   LOGDEBUG("ThinClientPoolDM::sendSyncRequest: ....%d %s",
            request.getMessageType(), m_poolName.c_str());
   // Increment clientOps
-  HostAsm::atomicAdd(m_clientOps, 1);
-  getStats().setCurClientOps(m_clientOps);
+  getStats().setCurClientOps(++m_clientOps);
 
   GfErrType error = GF_NOTCON;
 
@@ -1444,8 +1441,7 @@ GfErrType ThinClientPoolDM::sendSyncRequest(
       // lets assume all connection are in use will happen
       if (queueErr == GF_NOERR) {
         queueErr = GF_ALL_CONNECTIONS_IN_USE_EXCEPTION;
-        HostAsm::atomicAdd(m_clientOps, -1);
-        getStats().setCurClientOps(m_clientOps);
+        getStats().setCurClientOps(--m_clientOps);
         getStats().incFailedClientOps();
         return queueErr;
       } else if (queueErr == GF_IOERR) {
@@ -1572,8 +1568,7 @@ GfErrType ThinClientPoolDM::sendSyncRequest(
     }
 
     if (!attemptFailover || error == GF_NOERR) {
-      HostAsm::atomicAdd(m_clientOps, -1);
-      getStats().setCurClientOps(m_clientOps);
+      getStats().setCurClientOps(--m_clientOps);
       if (error == GF_NOERR) {
         getStats().incSucceedClientOps(); /*inc Id for clientOs stat*/
       } else if (error == GF_TIMOUT) {
@@ -1592,8 +1587,7 @@ GfErrType ThinClientPoolDM::sendSyncRequest(
     firstTry = false;
   }  // While
 
-  HostAsm::atomicAdd(m_clientOps, -1);
-  getStats().setCurClientOps(m_clientOps);
+  getStats().setCurClientOps(--m_clientOps);
 
   if (error == GF_NOERR) {
     getStats().incSucceedClientOps();
@@ -1724,7 +1718,7 @@ GfErrType ThinClientPoolDM::createPoolConnectionToAEndPoint(
       LOGFINER(
           "ThinClientPoolDM::createPoolConnectionToAEndPoint( ): current pool "
           "size has reached limit %d, %d",
-          m_poolSize, max);
+          m_poolSize.load(), max);
       return error;
     }
   }
@@ -1757,9 +1751,9 @@ GfErrType ThinClientPoolDM::createPoolConnectionToAEndPoint(
 }
 
 void ThinClientPoolDM::reducePoolSize(int num) {
-  LOGFINE("removing connection %d ,  pool-size =%d", num, m_poolSize);
-  HostAsm::atomicAdd(m_poolSize, -1 * num);
-  if (m_poolSize == 0) {
+  LOGFINE("removing connection %d ,  pool-size =%d", num, m_poolSize.load());
+  m_poolSize -= num;
+  if (m_poolSize <= 0) {
     if (m_cliCallbackTask != NULL) m_cliCallbackSema.release();
   }
 }
@@ -1777,7 +1771,7 @@ GfErrType ThinClientPoolDM::createPoolConnection(
   LOGDEBUG(
       "ThinClientPoolDM::createPoolConnection( ): current pool size has "
       "reached limit %d, %d, %d",
-      m_poolSize, max, min);
+      m_poolSize.load(), max, min);
 
   conn = NULL;
   {
@@ -1785,7 +1779,7 @@ GfErrType ThinClientPoolDM::createPoolConnection(
       LOGDEBUG(
           "ThinClientPoolDM::createPoolConnection( ): current pool size has "
           "reached limit %d, %d",
-          m_poolSize, max);
+          m_poolSize.load(), max);
       maxConnLimit = true;
       return error;
     }
@@ -1840,8 +1834,7 @@ GfErrType ThinClientPoolDM::createPoolConnection(
       }
     } else {
       ep->setConnected();
-      ++m_poolSize;  // already increased
-      if (m_poolSize > min) {
+      if (++m_poolSize > min) {
         getStats().incLoadCondConnects();
       }
       // Update Stats

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/ThinClientPoolDM.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/ThinClientPoolDM.hpp b/src/cppcache/src/ThinClientPoolDM.hpp
index a4e1713..3704e5b 100644
--- a/src/cppcache/src/ThinClientPoolDM.hpp
+++ b/src/cppcache/src/ThinClientPoolDM.hpp
@@ -397,7 +397,7 @@ class ThinClientPoolDM
 
   volatile ThinClientLocatorHelper* m_locHelper;
 
-  volatile int32_t m_poolSize;  // Actual Size of Pool
+  std::atomic<int32_t> m_poolSize;  // Actual Size of Pool
   int m_numRegions;
 
   // for selectEndpoint
@@ -419,7 +419,7 @@ class ThinClientPoolDM
   int manageConnectionsInternal(volatile bool& isRunning);
   void cleanStaleConnections(volatile bool& isRunning);
   void restoreMinConnections(volatile bool& isRunning);
-  volatile int32_t m_clientOps;  // Actual Size of Pool
+  std::atomic<int32_t> m_clientOps;  // Actual Size of Pool
   statistics::PoolStatsSampler* m_PoolStatsSampler;
   ClientMetadataService* m_clientMetadataService;
   friend class CacheImpl;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/hostsolaris.asm
----------------------------------------------------------------------
diff --git a/src/cppcache/src/hostsolaris.asm b/src/cppcache/src/hostsolaris.asm
deleted file mode 100644
index 7a12bde..0000000
--- a/src/cppcache/src/hostsolaris.asm
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * 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.
- */
-
-/*========================================================================
- *
- * Name - InterlockedCompareExchange -- 
- *
- * Purpose -
- * The function returns the initial value of the Destination parameter.
- * The function compares the Destination value with the Comparand value. 
- * If the Destination value is equal to the Comparand value, the Exchange 
- * value is stored in the address specified by Destination. 
- * Otherwise, no operation is performed.
- *
- * membar not used
- *
- *========================================================================
- */
-      .seg    "text"
-      .proc   12
-      .global InterlockedCompareExchange
-      .type InterlockedCompareExchange, #function
-InterlockedCompareExchange:
-
-       cas     [%o0],%o2,%o1   ! /* atomic CAS, with read value -> retval */
-       retl
-       mov     %o1,%o0         ! /* retval = 1 IFF tmp == 0 */
-
-/*========================================================================
- *
- * Name - InterlockedExchangeAdd -- Gemfire name was HostAsmAtomicAdd
- *
- * Purpose -
- * Add 'increment' to  the counter pointed to be 'ctrPtr'.
- * Returns the old value.
- *
- * membar not used
- *
- *========================================================================
- */
-      .proc   12
-      .global InterlockedExchangeAdd 
-      .type InterlockedExchangeAdd, #function
-InterlockedExchangeAdd: 
-                                   ! %o0 = ctrPtr 
-                                   ! %o1 = increment
-retryAdd:                          ! do {
-        ld      [%o0],%o2          ! %o2 = *ctrPtr
-        add     %o2,%o1,%o3        ! %o3 = %o2 + increment
-        cas     [%o0],%o2,%o3      ! if (%o2 == *ctrPtr)
-                                   !   tmp = *ctrPtr, *ctrPtr = %o3, %o3 = tmp
-                                   ! else
-                                   !   %o3 = *ctrPtr
-        cmp     %o2,%o3            !
-        bne     retryAdd           ! } while (%o2 != %o3)
-        nop                        ! fix for bug 22851
-        retl 
-        mov     %o3,%o0            ! return old value of *ctrPtr in %o0
-
-/*========================================================================
- *
- * Name - InterlockedExchangeAddLong -- Gemfire name was HostAsmAtomicAddLong
- *
- * Purpose -
- * Handels 64 bit Pointer for v9 architecture
- * Add 'increment' to  the counter pointed to be 'ctrPtr'.
- * Returns the old value.
- *
- * membar not used
- *
- *========================================================================
- */
-      .proc   12
-      .global InterlockedExchangeAddLong
-      .type InterlockedExchangeAddLong, #function
-InterlockedExchangeAddLong: 
-                                   ! %o0 = ctrPtr 
-                                   ! %o1 = increment
-retryAddLong:                      ! do {
-        ldx     [%o0],%o2          ! %o2 = *ctrPtr
-        add     %o2,%o1,%o3        ! %o3 = %o2 + increment
-        casx    [%o0],%o2,%o3      ! if (%o2 == *ctrPtr)
-                                   !   tmp = *ctrPtr, *ctrPtr = %o3, %o3 = tmp
-                                   ! else
-                                   !   %o3 = *ctrPtr
-        cmp     %o2,%o3            !
-        bne     retryAddLong       ! } while (%o2 != %o3)
-        nop                        ! fix for bug 22851
-        retl 
-        mov     %o3,%o0            ! return old value of *ctrPtr in %o0
-

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/statistics/AtomicStatisticsImpl.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/statistics/AtomicStatisticsImpl.cpp b/src/cppcache/src/statistics/AtomicStatisticsImpl.cpp
index adf982c..bf86668 100644
--- a/src/cppcache/src/statistics/AtomicStatisticsImpl.cpp
+++ b/src/cppcache/src/statistics/AtomicStatisticsImpl.cpp
@@ -17,14 +17,16 @@
 
 #include <geode/geode_globals.hpp>
 
-#include <ace/Atomic_Op_T.h>
-#include <ace/Recursive_Thread_Mutex.h>
+#include <atomic>
+
 #include <ace/OS_NS_stdio.h>
 #include "AtomicStatisticsImpl.hpp"
 #include "StatisticsTypeImpl.hpp"
 #include "StatisticDescriptorImpl.hpp"
 
-using namespace apache::geode::statistics;
+namespace apache {
+namespace geode {
+namespace statistics {
 /**
  * An implementation of {@link Statistics} that stores its statistics
  * in local  memory and supports atomic operations.
@@ -33,7 +35,7 @@ using namespace apache::geode::statistics;
 //////////////////////  Static Methods  //////////////////////
 
 int64_t AtomicStatisticsImpl::calcNumericId(StatisticsFactory* system,
-                                          int64_t userValue) {
+                                            int64_t userValue) {
   int64_t result;
   if (userValue != 0) {
     result = userValue;
@@ -94,8 +96,7 @@ AtomicStatisticsImpl::AtomicStatisticsImpl(StatisticsType* typeArg,
     int32_t doubleCount = statsType->getDoubleStatCount();
 
     if (intCount > 0) {
-      intStorage =
-          new ACE_Atomic_Op<ACE_Recursive_Thread_Mutex, int32_t>[ intCount ];
+      intStorage = new std::atomic<int32_t>[ intCount ];
       for (int32_t i = 0; i < intCount; i++) {
         intStorage[i] = 0;  // Un-initialized state
       }
@@ -104,8 +105,7 @@ AtomicStatisticsImpl::AtomicStatisticsImpl(StatisticsType* typeArg,
       intStorage = NULL;
     }
     if (longCount > 0) {
-      longStorage =
-          new ACE_Atomic_Op<ACE_Recursive_Thread_Mutex, int64_t>[ longCount ];
+      longStorage = new std::atomic<int64_t>[ longCount ];
       for (int32_t i = 0; i < longCount; i++) {
         longStorage[i] = 0;  // Un-initialized state
       }
@@ -114,8 +114,7 @@ AtomicStatisticsImpl::AtomicStatisticsImpl(StatisticsType* typeArg,
       longStorage = NULL;
     }
     if (doubleCount > 0) {
-      doubleStorage =
-          new ACE_Atomic_Op<ACE_Recursive_Thread_Mutex, double>[ doubleCount ];
+      doubleStorage = new std::atomic<double>[ doubleCount ];
       for (int32_t i = 0; i < doubleCount; i++) {
         doubleStorage[i] = 0;  // Un-initialized state
       }
@@ -221,7 +220,7 @@ int32_t AtomicStatisticsImpl::_getInt(int32_t offset) {
     throw IllegalArgumentException(s);
   }
 
-  return intStorage[offset].value();
+  return intStorage[offset];
 }
 
 int64_t AtomicStatisticsImpl::_getLong(int32_t offset) {
@@ -232,7 +231,7 @@ int64_t AtomicStatisticsImpl::_getLong(int32_t offset) {
         offset);
     throw IllegalArgumentException(s);
   }
-  return longStorage[offset].value();
+  return longStorage[offset];
 }
 
 double AtomicStatisticsImpl::_getDouble(int32_t offset) {
@@ -244,7 +243,7 @@ double AtomicStatisticsImpl::_getDouble(int32_t offset) {
         offset);
     throw IllegalArgumentException(s);
   }
-  return doubleStorage[offset].value();
+  return doubleStorage[offset];
 }
 
 int64_t AtomicStatisticsImpl::_getRawBits(StatisticDescriptor* statDscp) {
@@ -330,7 +329,13 @@ double AtomicStatisticsImpl::_incDouble(int32_t offset, double delta) {
     throw IllegalArgumentException(s);
   }
 
-  return (doubleStorage[offset] += delta);
+  double expected = doubleStorage[offset];
+  double value;
+  do {
+    value = expected + delta;
+  } while (!doubleStorage[offset].compare_exchange_weak(expected, value));
+
+  return value;
 }
 
 /**************************Base class methods ********************/
@@ -472,7 +477,7 @@ int32_t AtomicStatisticsImpl::incInt(char* name, int32_t delta) {
 }
 
 int32_t AtomicStatisticsImpl::incInt(StatisticDescriptor* descriptor,
-                                   int32_t delta) {
+                                     int32_t delta) {
   int32_t id = getIntId(descriptor);
   return incInt(id, delta);
 }
@@ -494,7 +499,7 @@ int64_t AtomicStatisticsImpl::incLong(char* name, int64_t delta) {
 }
 
 int64_t AtomicStatisticsImpl::incLong(StatisticDescriptor* descriptor,
-                                    int64_t delta) {
+                                      int64_t delta) {
   return incLong(getLongId(descriptor), delta);
 }
 
@@ -544,3 +549,7 @@ int32_t AtomicStatisticsImpl::getDoubleId(StatisticDescriptor* descriptor) {
       dynamic_cast<StatisticDescriptorImpl*>(descriptor);
   return realDescriptor->checkDouble();
 }
+
+}  // namespace statistics
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/statistics/AtomicStatisticsImpl.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/statistics/AtomicStatisticsImpl.hpp b/src/cppcache/src/statistics/AtomicStatisticsImpl.hpp
index 6ea6fbd..ec0ca07 100644
--- a/src/cppcache/src/statistics/AtomicStatisticsImpl.hpp
+++ b/src/cppcache/src/statistics/AtomicStatisticsImpl.hpp
@@ -21,9 +21,9 @@
  */
 
 #include <geode/geode_globals.hpp>
-#include <ace/Atomic_Op_T.h>
-#include <ace/Recursive_Thread_Mutex.h>
-#include <HostAsm.hpp>
+
+#include <atomic>
+
 #include <geode/statistics/Statistics.hpp>
 #include "StatisticsTypeImpl.hpp"
 #include <geode/statistics/StatisticsFactory.hpp>
@@ -82,13 +82,13 @@ class AtomicStatisticsImpl : public Statistics, private NonCopyable {
 
   /****************************************************************************/
   /** An array containing the values of the int32_t statistics */
-  ACE_Atomic_Op<ACE_Recursive_Thread_Mutex, int32_t>* intStorage;
+  std::atomic<int32_t>* intStorage;
 
   /** An array containing the values of the int64_t statistics */
-  ACE_Atomic_Op<ACE_Recursive_Thread_Mutex, int64_t>* longStorage;
+  std::atomic<int64_t>* longStorage;
 
   /** An array containing the values of the double statistics */
-  ACE_Atomic_Op<ACE_Recursive_Thread_Mutex, double>* doubleStorage;
+  std::atomic<double>* doubleStorage;
 
   ///////////////////////Private Methods//////////////////////////
   bool isOpen();
@@ -245,7 +245,7 @@ class AtomicStatisticsImpl : public Statistics, private NonCopyable {
 
 };  // class
 
-}  // namespace client
+}  // namespace statistics
 }  // namespace geode
 }  // namespace apache
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/statistics/HostStatHelper.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/statistics/HostStatHelper.cpp b/src/cppcache/src/statistics/HostStatHelper.cpp
index ff5437c..635f56c 100644
--- a/src/cppcache/src/statistics/HostStatHelper.cpp
+++ b/src/cppcache/src/statistics/HostStatHelper.cpp
@@ -16,7 +16,7 @@
  */
 
 #include <geode/geode_globals.hpp>
-
+#include "config.h"
 #include <ace/OS_NS_sys_utsname.h>
 #include "HostStatHelper.hpp"
 #include "GeodeStatisticsFactory.hpp"

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/cppcache/src/statistics/StatisticsManager.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/statistics/StatisticsManager.cpp b/src/cppcache/src/statistics/StatisticsManager.cpp
index 9a52177..1be74e9 100644
--- a/src/cppcache/src/statistics/StatisticsManager.cpp
+++ b/src/cppcache/src/statistics/StatisticsManager.cpp
@@ -18,8 +18,6 @@
 
 #include <geode/geode_globals.hpp>
 
-#include <ace/Atomic_Op_T.h>
-#include <ace/Recursive_Thread_Mutex.h>
 #include <ace/OS.h>
 #include <ace/Thread_Mutex.h>
 #include <ace/Time_Value.h>
@@ -40,8 +38,9 @@ using namespace apache::geode::statistics;
  */
 StatisticsManager* StatisticsManager::s_singleton = NULL;
 
-StatisticsManager::StatisticsManager(const char* filePath, int64_t sampleInterval,
-                                     bool enabled, int64_t statFileLimit,
+StatisticsManager::StatisticsManager(const char* filePath,
+                                     int64_t sampleInterval, bool enabled,
+                                     int64_t statFileLimit,
                                      int64_t statDiskSpaceLimit)
     : m_sampler(NULL), m_adminRegion(NULLPTR) {
   m_sampleIntervalMs =
@@ -61,11 +60,9 @@ StatisticsManager::StatisticsManager(const char* filePath, int64_t sampleInterva
   }
 }
 
-StatisticsManager* StatisticsManager::initInstance(const char* filePath,
-                                                   int64_t sampleIntervalMs,
-                                                   bool enabled,
-                                                   int64_t statsFileLimit,
-                                                   int64_t statsDiskSpaceLimit) {
+StatisticsManager* StatisticsManager::initInstance(
+    const char* filePath, int64_t sampleIntervalMs, bool enabled,
+    int64_t statsFileLimit, int64_t statsDiskSpaceLimit) {
   if (!s_singleton) {
     s_singleton = new StatisticsManager(filePath, sampleIntervalMs, enabled,
                                         statsFileLimit, statsDiskSpaceLimit);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/tests/cpp/fwklib/ClientTask.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/ClientTask.hpp b/src/tests/cpp/fwklib/ClientTask.hpp
index 77ac203..2c6a032 100644
--- a/src/tests/cpp/fwklib/ClientTask.hpp
+++ b/src/tests/cpp/fwklib/ClientTask.hpp
@@ -21,7 +21,7 @@
  */
 
 #include <geode/GeodeCppCache.hpp>
-#include <AtomicInc.hpp>
+#include <atomic>
 #include "fwklib/PerfFwk.hpp"
 #include "fwklib/FwkObjects.hpp"
 
@@ -34,9 +34,9 @@ namespace testframework {
 
 class ClientTask {
  private:
-  AtomicInc m_TotalIters;
-  AtomicInc m_passCount;
-  AtomicInc m_failCount;
+  std::atomic<int32_t> m_TotalIters;
+  std::atomic<int32_t> m_passCount;
+  std::atomic<int32_t> m_failCount;
 
  protected:
   bool m_Exit;
@@ -55,13 +55,13 @@ class ClientTask {
     m_Run = true;
     m_Iterations = 0;
     m_Loop = -1;
-    m_TotalIters.resetValue(0);
+    m_TotalIters = 0;
   }
 
   void passed() { m_passCount++; }
   void failed() { m_failCount++; }
-  int32_t getPassCount() { return m_passCount.value(); }
-  int32_t getFailCount() { return m_failCount.value(); }
+  int32_t getPassCount() { return m_passCount; }
+  int32_t getFailCount() { return m_failCount; }
 
   // Defined by subclasses to implement the task functionality.
   // The id parameter is intended to be the thread id,
@@ -92,12 +92,12 @@ class ClientTask {
   void addIters(int32_t iters) { m_TotalIters += iters; }
 
   // Get total iterations.
-  int32_t getIters() { return m_TotalIters.value(); }
+  int32_t getIters() { return m_TotalIters; }
 
   // Set the number of iterations the test should do.
   void setIterations(int32_t iterations) {
     m_Iterations = iterations;
-    m_TotalIters = AtomicInc();
+    m_TotalIters = 0;
   }
 
   // Used to terminate tasks being run by threads

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/tests/cpp/fwklib/PerfFwk.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/PerfFwk.hpp b/src/tests/cpp/fwklib/PerfFwk.hpp
index 4f8c97f..346bcbb 100644
--- a/src/tests/cpp/fwklib/PerfFwk.hpp
+++ b/src/tests/cpp/fwklib/PerfFwk.hpp
@@ -25,7 +25,6 @@
 #include <string>
 #include <map>
 
-#include "AtomicInc.hpp"
 #include <geode/DataOutput.hpp>
 #include <geode/DataInput.hpp>
 #include "FwkException.hpp"

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/tests/cpp/fwklib/PoolHelper.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/PoolHelper.hpp b/src/tests/cpp/fwklib/PoolHelper.hpp
index daa89f0..28247ee 100644
--- a/src/tests/cpp/fwklib/PoolHelper.hpp
+++ b/src/tests/cpp/fwklib/PoolHelper.hpp
@@ -21,7 +21,7 @@
  */
 
 #include <geode/GeodeCppCache.hpp>
-#include <AtomicInc.hpp>
+
 #include "fwklib/FrameworkTest.hpp"
 #include "fwklib/FwkObjects.hpp"
 #include "fwklib/FwkStrCvt.hpp"

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/tests/cpp/fwklib/RegionHelper.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/RegionHelper.hpp b/src/tests/cpp/fwklib/RegionHelper.hpp
index e664336..a6ee5e6 100644
--- a/src/tests/cpp/fwklib/RegionHelper.hpp
+++ b/src/tests/cpp/fwklib/RegionHelper.hpp
@@ -21,7 +21,7 @@
  */
 
 #include <geode/GeodeCppCache.hpp>
-#include <AtomicInc.hpp>
+
 #include "fwklib/FrameworkTest.hpp"
 #include "fwklib/FwkObjects.hpp"
 #include "fwklib/FwkStrCvt.hpp"

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/tests/cpp/fwklib/Service.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/Service.cpp b/src/tests/cpp/fwklib/Service.cpp
index ded804d..d338137 100644
--- a/src/tests/cpp/fwklib/Service.cpp
+++ b/src/tests/cpp/fwklib/Service.cpp
@@ -31,7 +31,7 @@ Service::Service(int32_t threadCnt)
   flags |= THR_INHERIT_SCHED;
 #endif
 
-  m_busy.resetValue(0);
+  m_busy = 0;
   activate(flags, threadCnt, forceActive);
 }
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/tests/cpp/fwklib/Service.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/Service.hpp b/src/tests/cpp/fwklib/Service.hpp
index d803d29..859533a 100644
--- a/src/tests/cpp/fwklib/Service.hpp
+++ b/src/tests/cpp/fwklib/Service.hpp
@@ -21,7 +21,7 @@
  */
 
 #include <geode/geode_base.hpp>
-#include <AtomicInc.hpp>
+#include <atomic>
 #include "fwklib/FwkLog.hpp"
 
 #include "ace/Task.h"
@@ -64,7 +64,7 @@ class Service : public ACE_Task_Base {
  private:
   uint32_t m_ThreadCount;
   volatile bool m_run;
-  AtomicInc m_busy;
+  std::atomic<uint32_t> m_busy;
   ACE_Thread_Mutex m_Mutex;
   ACE_DLList<ServiceTask> m_TaskQueue;
 
@@ -88,12 +88,8 @@ class Service : public ACE_Task_Base {
 
   int32_t runThreaded(ServiceTask* task, uint32_t threads);
 
-  inline uint32_t getBusyCount() {
-    return static_cast<uint32_t>(m_busy.value());
-  }
-  inline uint32_t getIdleCount() {
-    return m_ThreadCount - static_cast<uint32_t>(m_busy.value());
-  }
+  inline uint32_t getBusyCount() { return m_busy; }
+  inline uint32_t getIdleCount() { return m_ThreadCount - m_busy; }
 
   inline void stopThreads() {
     m_run = false;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/1379afe2/src/tests/cpp/fwklib/UDPIpc.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/UDPIpc.hpp b/src/tests/cpp/fwklib/UDPIpc.hpp
index 64c9500..68b9ad9 100644
--- a/src/tests/cpp/fwklib/UDPIpc.hpp
+++ b/src/tests/cpp/fwklib/UDPIpc.hpp
@@ -32,6 +32,7 @@
 #include <ace/SOCK_Dgram.h>
 #include <ace/TSS_T.h>
 
+#include <atomic>
 #include <string>
 #include <list>
 
@@ -150,9 +151,9 @@ class UDPMessageClient {
 
 class UDPMessageQueues : public SharedTaskObject {
  private:
-  AtomicInc m_cntInbound;
-  AtomicInc m_cntOutbound;
-  AtomicInc m_cntProcessed;
+  std::atomic<int32_t> m_cntInbound;
+  std::atomic<int32_t> m_cntOutbound;
+  std::atomic<int32_t> m_cntProcessed;
 
   SafeQueue<UDPMessage> m_inbound;
   SafeQueue<UDPMessage> m_outbound;
@@ -162,12 +163,9 @@ class UDPMessageQueues : public SharedTaskObject {
  public:
   UDPMessageQueues(std::string label) : m_label(label) {}
   ~UDPMessageQueues() {
-    FWKINFO(m_label << "MessageQueues::Inbound   count: "
-                    << m_cntInbound.value());
-    FWKINFO(m_label << "MessageQueues::Processed count: "
-                    << m_cntProcessed.value());
-    FWKINFO(m_label << "MessageQueues::Outbound  count: "
-                    << m_cntOutbound.value());
+    FWKINFO(m_label << "MessageQueues::Inbound   count: " << m_cntInbound);
+    FWKINFO(m_label << "MessageQueues::Processed count: " << m_cntProcessed);
+    FWKINFO(m_label << "MessageQueues::Outbound  count: " << m_cntOutbound);
     FWKINFO(m_label << "MessageQueues::Inbound  still queued: "
                     << m_inbound.size());
     FWKINFO(m_label << "MessageQueues::Outbound still queued: "
@@ -201,7 +199,7 @@ class Receiver : public ServiceTask {
   ACE_TSS<ACE_SOCK_Dgram> m_io;
   int32_t m_basePort;
   ACE_thread_t m_listener;
-  AtomicInc m_offset;
+  std::atomic<int32_t> m_offset;
   std::list<std::string> m_addrs;
   UDPMessageQueues* m_queues;
   ACE_Thread_Mutex m_mutex;
@@ -275,7 +273,7 @@ class Responder : public ServiceTask {
  private:
   ACE_TSS<ACE_SOCK_Dgram> m_io;
   int32_t m_basePort;
-  AtomicInc m_offset;
+  std::atomic<int32_t> m_offset;
   UDPMessageQueues* m_queues;
 
  public:


[31/34] geode-native git commit: GEODE-2552: Replaced NanoTimer with std::chrono.

Posted by jb...@apache.org.
GEODE-2552: Replaced NanoTimer with std::chrono.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 786fff83859703bd8c8bcb84388c72266b2b90dc
Parents: c0d0c2a
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Sat Feb 25 14:11:46 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:24 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/Utils.cpp | 4 +++-
 src/cppcache/src/Utils.hpp | 6 +++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/786fff83/src/cppcache/src/Utils.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/Utils.cpp b/src/cppcache/src/Utils.cpp
index 0bb40ab..ac3449a 100644
--- a/src/cppcache/src/Utils.cpp
+++ b/src/cppcache/src/Utils.cpp
@@ -21,6 +21,7 @@
 #include <ace/Recursive_Thread_Mutex.h>
 #include <ace/INET_Addr.h>
 #include <cstdio>
+#include <chrono>
 
 using namespace apache::geode::client;
 
@@ -51,7 +52,8 @@ void operator delete[](void* p) { operator delete(p); }
 #endif  // _WIN32
 
 int RandGen::operator()(size_t max) {
-  unsigned int seed = static_cast<unsigned int>(NanoTimer::now());
+  unsigned int seed = static_cast<unsigned int>(
+      std::chrono::system_clock::now().time_since_epoch().count());
   return ACE_OS::rand_r(&seed) % max;
 }
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/786fff83/src/cppcache/src/Utils.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/Utils.hpp b/src/cppcache/src/Utils.hpp
index 56520c3..b95c7e8 100644
--- a/src/cppcache/src/Utils.hpp
+++ b/src/cppcache/src/Utils.hpp
@@ -36,6 +36,8 @@
 #include <typeinfo>
 #include <string>
 #include <unordered_set>
+#include <chrono>
+
 #ifdef __GNUC__
 extern "C" {
 #include <cxxabi.h>
@@ -152,7 +154,9 @@ class CPPCACHE_EXPORT Utils {
     if (DistributedSystem::getSystemProperties() != NULL) {
       return (DistributedSystem::getSystemProperties()
                   ->getEnableTimeStatistics())
-                 ? NanoTimer::now()
+                 ? std::chrono::duration_cast<std::chrono::nanoseconds>(
+                       std::chrono::steady_clock::now().time_since_epoch())
+                       .count()
                  : 0;
     } else {
       return 0;


[16/34] geode-native git commit: GEODE-2494: Replace SpinLock with spinlock_mutex.

Posted by jb...@apache.org.
GEODE-2494: Replace SpinLock with spinlock_mutex.

- Cleanup C++11 standards.


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

Branch: refs/heads/feature/GEODE-2602
Commit: aa659907a35610c7dcb846a832d81a6a53869d71
Parents: 5670afb
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Wed Feb 15 22:29:37 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 15 10:44:22 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/CqQueryVsdStats.cpp   | 63 ++++++++++++----------------
 src/cppcache/src/CqQueryVsdStats.hpp   | 24 ++++++-----
 src/cppcache/src/CqServiceVsdStats.cpp | 64 ++++++++++++-----------------
 src/cppcache/src/CqServiceVsdStats.hpp | 21 ++++++----
 4 files changed, 79 insertions(+), 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/aa659907/src/cppcache/src/CqQueryVsdStats.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CqQueryVsdStats.cpp b/src/cppcache/src/CqQueryVsdStats.cpp
index 258d6d2..3076e2e 100644
--- a/src/cppcache/src/CqQueryVsdStats.cpp
+++ b/src/cppcache/src/CqQueryVsdStats.cpp
@@ -23,8 +23,12 @@
 #include <ace/Thread_Mutex.h>
 #include <ace/Singleton.h>
 
-const char* cqStatsName = (const char*)"CqQueryStatistics";
-const char* cqStatsDesc = (const char*)"Statistics for this cq query";
+#include <mutex>
+
+#include "util/concurrent/spinlock_mutex.hpp"
+
+const char* cqStatsName = "CqQueryStatistics";
+const char* cqStatsDesc = "Statistics for this cq query";
 
 ////////////////////////////////////////////////////////////////////////////////
 
@@ -32,31 +36,23 @@ namespace apache {
 namespace geode {
 namespace client {
 
-using namespace apache::geode::statistics;
+using statistics::StatisticsFactory;
+using util::concurrent::spinlock_mutex;
+using std::lock_guard;
 
 ////////////////////////////////////////////////////////////////////////////////
 
-CqQueryStatType* CqQueryStatType::single = NULL;
-SpinLock CqQueryStatType::m_singletonLock;
-SpinLock CqQueryStatType::m_statTypeLock;
-
-void CqQueryStatType::clean() {
-  SpinLockGuard guard(m_singletonLock);
-  if (single != NULL) {
-    delete single;
-    single = NULL;
-  }
-}
+spinlock_mutex CqQueryStatType::m_statTypeLock;
 
 StatisticsType* CqQueryStatType::getStatType() {
   const bool largerIsBetter = true;
-  SpinLockGuard guard(m_statTypeLock);
+  lock_guard<spinlock_mutex> guard(m_statTypeLock);
   StatisticsFactory* factory = StatisticsFactory::getExistingInstance();
   GF_D_ASSERT(!!factory);
 
   StatisticsType* statsType = factory->findType("CqQueryStatistics");
 
-  if (statsType == NULL) {
+  if (statsType == nullptr) {
     m_stats[0] = factory->createIntCounter(
         "inserts", "The total number of inserts this cq qurey", "entries",
         largerIsBetter);
@@ -81,19 +77,14 @@ StatisticsType* CqQueryStatType::getStatType() {
   return statsType;
 }
 
-CqQueryStatType* CqQueryStatType::getInstance() {
-  SpinLockGuard guard(m_singletonLock);
-  if (single == NULL) {
-    single = new CqQueryStatType();
-  }
-  return single;
+CqQueryStatType& CqQueryStatType::getInstance() {
+  // C++11 initializes statics threads safe
+  static CqQueryStatType instance;
+  return instance;
 }
 
 CqQueryStatType::CqQueryStatType()
-    : /* adongre
-       * CID 28931: Uninitialized scalar field (UNINIT_CTOR)
-       */
-      m_numInsertsId(0),
+    : m_numInsertsId(0),
       m_numUpdatesId(0),
       m_numDeletesId(0),
       m_numEventsId(0) {
@@ -108,21 +99,21 @@ CqQueryStatType::CqQueryStatType()
 ////////////////////////////////////////////////////////////////////////////////
 
 CqQueryVsdStats::CqQueryVsdStats(const char* cqqueryName) {
-  CqQueryStatType* regStatType = CqQueryStatType::getInstance();
+  auto& regStatType = CqQueryStatType::getInstance();
 
-  StatisticsType* statsType = regStatType->getStatType();
+  StatisticsType* statsType = regStatType.getStatType();
 
-  GF_D_ASSERT(statsType != NULL);
+  GF_D_ASSERT(statsType != nullptr);
 
   StatisticsFactory* factory = StatisticsFactory::getExistingInstance();
 
   m_cqQueryVsdStats = factory->createAtomicStatistics(
       statsType, const_cast<char*>(cqqueryName));
 
-  m_numInsertsId = regStatType->getNumInsertsId();
-  m_numUpdatesId = regStatType->getNumUpdatesId();
-  m_numDeletesId = regStatType->getNumDeletesId();
-  m_numEventsId = regStatType->getNumEventsId();
+  m_numInsertsId = regStatType.getNumInsertsId();
+  m_numUpdatesId = regStatType.getNumUpdatesId();
+  m_numDeletesId = regStatType.getNumDeletesId();
+  m_numEventsId = regStatType.getNumEventsId();
 
   m_cqQueryVsdStats->setInt(m_numInsertsId, 0);
   m_cqQueryVsdStats->setInt(m_numUpdatesId, 0);
@@ -131,10 +122,10 @@ CqQueryVsdStats::CqQueryVsdStats(const char* cqqueryName) {
 }
 
 CqQueryVsdStats::~CqQueryVsdStats() {
-  if (m_cqQueryVsdStats != NULL) {
-    // Don't Delete, Already closed, Just set NULL
+  if (m_cqQueryVsdStats != nullptr) {
+    // Don't Delete, Already closed, Just set nullptr
     // delete m_CqQueryVsdStats;
-    m_cqQueryVsdStats = NULL;
+    m_cqQueryVsdStats = nullptr;
   }
 }
 }  // namespace client

http://git-wip-us.apache.org/repos/asf/geode-native/blob/aa659907/src/cppcache/src/CqQueryVsdStats.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CqQueryVsdStats.hpp b/src/cppcache/src/CqQueryVsdStats.hpp
index 5b162da..3cc5672 100644
--- a/src/cppcache/src/CqQueryVsdStats.hpp
+++ b/src/cppcache/src/CqQueryVsdStats.hpp
@@ -23,15 +23,18 @@
 #include <geode/geode_globals.hpp>
 #include <geode/statistics/Statistics.hpp>
 #include <geode/statistics/StatisticsFactory.hpp>
-#include "SpinLock.hpp"
-
 #include <geode/CqStatistics.hpp>
 
+#include "util/concurrent/spinlock_mutex.hpp"
+
 namespace apache {
 namespace geode {
 namespace client {
 
-using namespace apache::geode::statistics;
+using statistics::StatisticDescriptor;
+using statistics::StatisticsType;
+using statistics::Statistics;
+using util::concurrent::spinlock_mutex;
 
 class CPPCACHE_EXPORT CqQueryVsdStats : public CqStatistics {
  public:
@@ -65,7 +68,7 @@ class CPPCACHE_EXPORT CqQueryVsdStats : public CqStatistics {
   }
 
  private:
-  apache::geode::statistics::Statistics* m_cqQueryVsdStats;
+  Statistics* m_cqQueryVsdStats;
 
   int32_t m_numInsertsId;
   int32_t m_numUpdatesId;
@@ -75,20 +78,19 @@ class CPPCACHE_EXPORT CqQueryVsdStats : public CqStatistics {
 
 class CqQueryStatType {
  private:
-  static int8_t instanceFlag;
-  static CqQueryStatType* single;
-  static SpinLock m_singletonLock;
-  static SpinLock m_statTypeLock;
+  static spinlock_mutex m_statTypeLock;
 
  public:
-  static CqQueryStatType* getInstance();
+  static CqQueryStatType& getInstance();
 
   StatisticsType* getStatType();
 
-  static void clean();
-
  private:
   CqQueryStatType();
+  ~CqQueryStatType() = default;
+  CqQueryStatType(const CqQueryStatType&) = delete;
+  CqQueryStatType& operator=(const CqQueryStatType&) = delete;
+
   StatisticDescriptor* m_stats[4];
 
   int32_t m_numInsertsId;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/aa659907/src/cppcache/src/CqServiceVsdStats.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CqServiceVsdStats.cpp b/src/cppcache/src/CqServiceVsdStats.cpp
index af154d6..b78c056 100644
--- a/src/cppcache/src/CqServiceVsdStats.cpp
+++ b/src/cppcache/src/CqServiceVsdStats.cpp
@@ -23,8 +23,12 @@
 #include <ace/Thread_Mutex.h>
 #include <ace/Singleton.h>
 
-const char* cqServiceStatsName = (const char*)"CqServiceStatistics";
-const char* cqServiceStatsDesc = (const char*)"Statistics for this cq Service";
+#include <mutex>
+
+#include "util/concurrent/spinlock_mutex.hpp"
+
+const char* cqServiceStatsName = "CqServiceStatistics";
+const char* cqServiceStatsDesc = "Statistics for this cq Service";
 
 ////////////////////////////////////////////////////////////////////////////////
 
@@ -32,31 +36,23 @@ namespace apache {
 namespace geode {
 namespace client {
 
-using namespace apache::geode::statistics;
+using statistics::StatisticsFactory;
+using util::concurrent::spinlock_mutex;
+using std::lock_guard;
 
 ////////////////////////////////////////////////////////////////////////////////
 
-CqServiceStatType* CqServiceStatType::single = NULL;
-SpinLock CqServiceStatType::m_singletonLock;
-SpinLock CqServiceStatType::m_statTypeLock;
-
-void CqServiceStatType::clean() {
-  SpinLockGuard guard(m_singletonLock);
-  if (single != NULL) {
-    delete single;
-    single = NULL;
-  }
-}
+spinlock_mutex CqServiceStatType::m_statTypeLock;
 
 StatisticsType* CqServiceStatType::getStatType() {
   const bool largerIsBetter = true;
-  SpinLockGuard guard(m_statTypeLock);
+  lock_guard<spinlock_mutex> guard(m_statTypeLock);
   StatisticsFactory* factory = StatisticsFactory::getExistingInstance();
   GF_D_ASSERT(!!factory);
 
   StatisticsType* statsType = factory->findType("CqServiceStatistics");
 
-  if (statsType == NULL) {
+  if (statsType == nullptr) {
     m_stats[0] = factory->createIntCounter(
         "CqsActive", "The total number of CqsActive this cq qurey", "entries",
         largerIsBetter);
@@ -87,19 +83,13 @@ StatisticsType* CqServiceStatType::getStatType() {
   return statsType;
 }
 
-CqServiceStatType* CqServiceStatType::getInstance() {
-  SpinLockGuard guard(m_singletonLock);
-  if (single == NULL) {
-    single = new CqServiceStatType();
-  }
-  return single;
+CqServiceStatType& CqServiceStatType::getInstance() {
+  static CqServiceStatType instance;
+  return instance;
 }
 
 CqServiceStatType::CqServiceStatType()
-    : /* adongre
-       * CID 28932: Uninitialized scalar field (UNINIT_CTOR)
-       */
-      m_numCqsActiveId(0),
+    : m_numCqsActiveId(0),
       m_numCqsCreatedId(0),
       m_numCqsOnClientId(0),
       m_numCqsClosedId(0),
@@ -115,22 +105,22 @@ CqServiceStatType::CqServiceStatType()
 ////////////////////////////////////////////////////////////////////////////////
 
 CqServiceVsdStats::CqServiceVsdStats(const char* cqServiceName) {
-  CqServiceStatType* regStatType = CqServiceStatType::getInstance();
+  auto& regStatType = CqServiceStatType::getInstance();
 
-  StatisticsType* statsType = regStatType->getStatType();
+  StatisticsType* statsType = regStatType.getStatType();
 
-  GF_D_ASSERT(statsType != NULL);
+  GF_D_ASSERT(statsType != nullptr);
 
   StatisticsFactory* factory = StatisticsFactory::getExistingInstance();
 
   m_cqServiceVsdStats = factory->createAtomicStatistics(
       statsType, const_cast<char*>(cqServiceName));
 
-  m_numCqsActiveId = regStatType->getNumCqsActiveId();
-  m_numCqsCreatedId = regStatType->getNumCqsCreatedId();
-  m_numCqsOnClientId = regStatType->getNumCqsOnClientId();
-  m_numCqsClosedId = regStatType->getNumCqsClosedId();
-  m_numCqsStoppedId = regStatType->getNumCqsStoppedId();
+  m_numCqsActiveId = regStatType.getNumCqsActiveId();
+  m_numCqsCreatedId = regStatType.getNumCqsCreatedId();
+  m_numCqsOnClientId = regStatType.getNumCqsOnClientId();
+  m_numCqsClosedId = regStatType.getNumCqsClosedId();
+  m_numCqsStoppedId = regStatType.getNumCqsStoppedId();
 
   m_cqServiceVsdStats->setInt(m_numCqsActiveId, 0);
   m_cqServiceVsdStats->setInt(m_numCqsCreatedId, 0);
@@ -139,10 +129,10 @@ CqServiceVsdStats::CqServiceVsdStats(const char* cqServiceName) {
 }
 
 CqServiceVsdStats::~CqServiceVsdStats() {
-  if (m_cqServiceVsdStats != NULL) {
-    // Don't Delete, Already closed, Just set NULL
+  if (m_cqServiceVsdStats != nullptr) {
+    // Don't Delete, Already closed, Just set nullptr
     // delete m_CqServiceVsdStats;
-    m_cqServiceVsdStats = NULL;
+    m_cqServiceVsdStats = nullptr;
   }
 }
 }  // namespace client

http://git-wip-us.apache.org/repos/asf/geode-native/blob/aa659907/src/cppcache/src/CqServiceVsdStats.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CqServiceVsdStats.hpp b/src/cppcache/src/CqServiceVsdStats.hpp
index 44a8c3d..710dfdb 100644
--- a/src/cppcache/src/CqServiceVsdStats.hpp
+++ b/src/cppcache/src/CqServiceVsdStats.hpp
@@ -23,14 +23,18 @@
 #include <geode/geode_globals.hpp>
 #include <geode/statistics/Statistics.hpp>
 #include <geode/statistics/StatisticsFactory.hpp>
-#include "SpinLock.hpp"
 #include <geode/CqServiceStatistics.hpp>
 
+#include "util/concurrent/spinlock_mutex.hpp"
+
 namespace apache {
 namespace geode {
 namespace client {
 
-using namespace apache::geode::statistics;
+using statistics::StatisticDescriptor;
+using statistics::StatisticsType;
+using statistics::Statistics;
+using util::concurrent::spinlock_mutex;
 
 class CPPCACHE_EXPORT CqServiceVsdStats : public CqServiceStatistics {
  public:
@@ -108,20 +112,19 @@ class CPPCACHE_EXPORT CqServiceVsdStats : public CqServiceStatistics {
 
 class CqServiceStatType {
  private:
-  static int8_t instanceFlag;
-  static CqServiceStatType* single;
-  static SpinLock m_singletonLock;
-  static SpinLock m_statTypeLock;
+  static spinlock_mutex m_statTypeLock;
 
  public:
-  static CqServiceStatType* getInstance();
+  static CqServiceStatType& getInstance();
 
   StatisticsType* getStatType();
 
-  static void clean();
-
  private:
   CqServiceStatType();
+  ~CqServiceStatType() = default;
+  CqServiceStatType(const CqServiceStatType&) = delete;
+  CqServiceStatType& operator=(const CqServiceStatType&) = delete;
+
   StatisticDescriptor* m_stats[5];
 
   int32_t m_numCqsActiveId;


[04/34] geode-native git commit: GEODE-2636: Switch to CMake variable for library name.

Posted by jb...@apache.org.
GEODE-2636: Switch to CMake variable for library name.


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

Branch: refs/heads/feature/GEODE-2602
Commit: db9d541c6ca64231f5f48ca4ef35dedb0a13166b
Parents: 1176dee
Author: Sarge <md...@pivotal.io>
Authored: Wed Mar 8 14:28:52 2017 -0800
Committer: Anthony Baker <ab...@apache.org>
Committed: Thu Mar 9 13:14:37 2017 -0800

----------------------------------------------------------------------
 src/quickstart/cpp/CMakeLists.txt    | 6 +++---
 src/quickstart/cpp/PdxSerializer.cpp | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/db9d541c/src/quickstart/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/CMakeLists.txt b/src/quickstart/cpp/CMakeLists.txt
index 9c6d60c..e02e4c2 100644
--- a/src/quickstart/cpp/CMakeLists.txt
+++ b/src/quickstart/cpp/CMakeLists.txt
@@ -56,12 +56,12 @@ set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}")
 set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}")
 
 if (${WIN32})
-  set(GFCPPCACHE "${NATIVECLIENT_LIBRARIES}/apache-geode${CMAKE_IMPORT_LIBRARY_SUFFIX}")
+  set(GFCPPCACHE "${NATIVECLIENT_LIBRARIES}/${PRODUCT_DLL_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}")
 
-  file(COPY ${NATIVECLIENT_BINARIES_DIR}/apache-geode.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+  file(COPY ${NATIVECLIENT_BINARIES_DIR}/${PRODUCT_DLL_NAME}.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
   set(RUNCPP "runcpp.bat")
 else ()
-  get_filename_component(GFCPPCACHE "${NATIVECLIENT_LIBRARIES}/${CMAKE_SHARED_LIBRARY_PREFIX}apache-geode${CMAKE_SHARED_LIBRARY_SUFFIX}" ABSOLUTE)
+  get_filename_component(GFCPPCACHE "${NATIVECLIENT_LIBRARIES}/${CMAKE_SHARED_LIBRARY_PREFIX}${PRODUCT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" ABSOLUTE)
 
   set(RUNCPP "runcpp.sh")
 endif()

http://git-wip-us.apache.org/repos/asf/geode-native/blob/db9d541c/src/quickstart/cpp/PdxSerializer.cpp
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/PdxSerializer.cpp b/src/quickstart/cpp/PdxSerializer.cpp
index a99f53d..54ae8e7 100644
--- a/src/quickstart/cpp/PdxSerializer.cpp
+++ b/src/quickstart/cpp/PdxSerializer.cpp
@@ -165,15 +165,15 @@ int main(int argc, char** argv) {
     LOGINFO("Registered Person Query Objects");
 
     // Populate the Region with some Person objects.
-    Person* p1 = new Person("John", 1 /*ID*/, 23 /*age*/);
+    Person* p1 = new Person((char *)"John", 1 /*ID*/, 23 /*age*/);
     PdxWrapperPtr pdxobj1(new PdxWrapper(p1, CLASSNAME));
     regionPtr->put("Key1", pdxobj1);
 
-    Person* p2 = new Person("Jack", 2 /*ID*/, 20 /*age*/);
+    Person* p2 = new Person((char *)"Jack", 2 /*ID*/, 20 /*age*/);
     PdxWrapperPtr pdxobj2(new PdxWrapper(p2, CLASSNAME));
     regionPtr->put("Key2", pdxobj2);
 
-    Person* p3 = new Person("Tony", 3 /*ID*/, 35 /*age*/);
+    Person* p3 = new Person((char *)"Tony", 3 /*ID*/, 35 /*age*/);
     PdxWrapperPtr pdxobj3(new PdxWrapper(p3, CLASSNAME));
     regionPtr->put("Key3", pdxobj3);