geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbarr...@apache.org
Subject [20/31] geode-native git commit: GEODE-2476: Replace gfcpp with geode.
Date Tue, 21 Feb 2017 17:40:33 GMT
http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/geode/SystemProperties.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/SystemProperties.hpp b/src/cppcache/include/geode/SystemProperties.hpp
new file mode 100644
index 0000000..5db43c7
--- /dev/null
+++ b/src/cppcache/include/geode/SystemProperties.hpp
@@ -0,0 +1,512 @@
+#pragma once
+
+#ifndef GEODE_SYSTEMPROPERTIES_H_
+#define GEODE_SYSTEMPROPERTIES_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 "Properties.hpp"
+#include "Log.hpp"
+#include "AuthInitialize.hpp"
+
+/** @file
+*/
+
+namespace apache {
+namespace geode {
+namespace client {
+
+/**
+ * The SystemProperties class
+ *
+ *
+ */
+
+// Factory function typedefs to register the managed authInitialize
+typedef AuthInitialize* (*LibraryAuthInitializeFn)(const char* assemblyPath,
+                                                   const char* factFuncName);
+
+/**
+  * A class for internal use, that encapsulates the properties that can be
+  * set from DistributedSystem::connect.
+  *
+  */
+
+class CPPCACHE_EXPORT SystemProperties {
+ public:
+  /**
+   * Constructor. Will set the default values first, and then overwrite with
+   * the values found in the given Properties object (if any), and
+   * then from the values in the given file (if it exists).
+   *
+   * If useMemType is true, use the given member type; if false, always set
+   * member type to SERVER.
+   */
+  SystemProperties(const PropertiesPtr& propertiesPtr,
+                   const char* configFile = NULL);
+
+  /**
+   * Destructor.
+   */
+  ~SystemProperties();
+
+  /** print all settings to the process log. */
+  void logSettings();
+
+  const uint32_t threadPoolSize() const { return m_threadPoolSize; }
+
+  /**
+   * Returns the sampling interval of the sampling thread.
+   * This would be how often the statistics thread writes to disk in seconds.
+   */
+  const uint32_t statisticsSampleInterval() const {
+    return m_statisticsSampleInterval;
+  }
+
+  /**
+   * Tells whether statistics needs to be archived or not.
+   */
+  bool statisticsEnabled() const { return m_statisticsEnabled; }
+
+  /**
+   * Whether SSL is enabled for socket connections.
+   */
+  bool sslEnabled() const { return m_sslEnabled; }
+
+  /**
+   * Whether time stats are enabled for the statistics.
+   */
+  bool getEnableTimeStatistics() const /*timestatisticsEnabled()*/
+  {
+    return m_timestatisticsEnabled;
+  } /*m_timestatisticsEnabled*/
+
+  /**
+  * Returns the path of the private key file for SSL use.
+  */
+  const char* sslKeyStore() const { return m_sslKeyStore; }
+
+  /**
+   * Returns the client keystore password.
+   */
+  const char* sslKeystorePassword() const { return m_sslKeystorePassword; }
+
+  /**
+   * Returns the path of the public key file for SSL use.
+   */
+  const char* sslTrustStore() const { return m_sslTrustStore; }
+
+  /**
+   * Returns the name of the filename into which statistics would
+   * be archived.
+   */
+  const char* statisticsArchiveFile() const { return m_statisticsArchiveFile; }
+
+  /**
+   * Returns the name of the filename into which logging would
+   * be done.
+   */
+  const char* logFilename() const { return m_logFilename; }
+
+  /**
+   * Returns the log level at which logging would be done.
+   */
+  Log::LogLevel logLevel() const { return m_logLevel; }
+
+  /**
+   * Returns  a boolean that specifies if heapLRULimit has been enabled for the
+   * process. If enabled, the HeapLRULimit specifies the maximum amount of
+   * memory
+   * that values in a cache can use to store data before overflowing to disk or
+   * destroying entries to ensure that the server process never runs out of
+   * memory
+   *
+   */
+  const bool heapLRULimitEnabled() const { return (m_heapLRULimit > 0); }
+
+  /**
+    * Returns  the HeapLRULimit value (in bytes), the maximum memory that values
+    * in a cache can use to store data before overflowing to disk or destroying
+    * entries to ensure that the server process never runs out of memory due to
+    * cache memory usage
+    *
+    */
+  const size_t heapLRULimit() const { return m_heapLRULimit; }
+
+  /**
+    * Returns  the HeapLRUDelta value (a percent value). This specifies the
+    * percentage of entries the system will evict each time it detects that
+    * it has exceeded the HeapLRULimit. Defaults to 10%
+    */
+  const int32_t heapLRUDelta() const { return m_heapLRUDelta; }
+  /**
+   * Returns  the maximum socket buffer size to use
+   */
+  const int32_t maxSocketBufferSize() const { return m_maxSocketBufferSize; }
+
+  /**
+   * Returns  the time between two consecutive ping to servers
+   */
+  const int32_t pingInterval() const { return m_pingInterval; }
+  /**
+   * Returns  the time between two consecutive checks for redundancy for HA
+   */
+  const int32_t redundancyMonitorInterval() const {
+    return m_redundancyMonitorInterval;
+  }
+
+  /**
+   * Returns the periodic notify ack interval
+   */
+  const int32_t notifyAckInterval() const { return m_notifyAckInterval; }
+
+  /**
+  * Returns the expiry time of an idle event id map entry for duplicate
+  * notification checking
+  */
+  const int32_t notifyDupCheckLife() const { return m_notifyDupCheckLife; }
+
+  /**
+   * Returns the durable client ID
+   */
+  const char* durableClientId() const { return m_durableClientId; }
+
+  /**
+   * Returns the durable timeout
+   */
+  const uint32_t durableTimeout() const { return m_durableTimeout; }
+
+  /**
+   * Returns the connect timeout used for server and locator handshakes
+   */
+  const uint32_t connectTimeout() const { return m_connectTimeout; }
+
+  /**
+  * Returns the connect wait timeout(in millis) used for to connect to server
+  * This is only applicable for linux
+  */
+  const uint32_t connectWaitTimeout() const { return m_connectWaitTimeout; }
+
+  /**
+  * Returns the connect wait timeout(in millis) used for to connect to server
+  * This is only applicable for linux
+  */
+  const uint32_t bucketWaitTimeout() const { return m_bucketWaitTimeout; }
+
+  /**
+   * Returns client Queueconflation option
+   */
+  char* conflateEvents() { return m_conflateEvents; }
+
+  /**
+  * Returns  true if the stack trace is enabled ,false otherwise
+  */
+  const bool debugStackTraceEnabled() const { return m_debugStackTraceEnabled; }
+
+  /**
+   * Returns true if crash dump generation for unhandled fatal errors
+   * is enabled, false otherwise.
+   * By default crash dumps are created in the current working directory.
+   * If log-file has been specified then they are created in the same
+   * directory as the log file, and having the same prefix as log file.
+   * The default prefix is "geode_cpp".
+   * The actual dump file will have timestamp and process ID in the full name.
+   */
+  inline const bool crashDumpEnabled() const { return m_crashDumpEnabled; }
+
+  const char* name() const { return m_name; }
+
+  const char* cacheXMLFile() const { return m_cacheXMLFile; }
+
+  /**
+  * Returns the log-file-size-limit.
+  */
+  const uint32_t logFileSizeLimit() const { return m_logFileSizeLimit; }
+
+  /**
+  * Returns the log-disk-space-limit.
+  */
+  const uint32_t logDiskSpaceLimit() const { return m_logDiskSpaceLimit; }
+
+  /**
+  * Returns the stat-file-space-limit.
+  */
+  const uint32_t statsFileSizeLimit() const { return m_statsFileSizeLimit; }
+
+  /**
+  * Returns the stat-disk-size-limit.
+  */
+  const uint32_t statsDiskSpaceLimit() const { return m_statsDiskSpaceLimit; }
+
+  const uint32_t maxQueueSize() { return m_maxQueueSize; }
+
+  const uint32_t javaConnectionPoolSize() const {
+    return m_javaConnectionPoolSize;
+  }
+  void setjavaConnectionPoolSize(uint32_t size) {
+    m_javaConnectionPoolSize = size;
+  }
+
+  /**
+   * This can be call to know whether chunkhandler thread is disable for that
+   * opertaion
+   */
+  bool disableChunkHandlerThread() const { return m_disableChunkHandlerThread; }
+
+  /**
+   * This can be call to know whether read timeout unit is in milli second
+   */
+  bool readTimeoutUnitInMillis() const { return m_readTimeoutUnitInMillis; }
+
+  /**
+   * This can be call multiple time to disable chunkhandler thread for those
+   * operations
+   */
+  void setDisableChunkHandlerThread(bool set) {
+    m_disableChunkHandlerThread = set;
+  }
+
+  /**
+  * returns true if app want to clear pdx type ids when client disconnect.
+  * deafult is false.
+  */
+  bool onClientDisconnectClearPdxTypeIds() const {
+    return m_onClientDisconnectClearPdxTypeIds;
+  }
+
+  /**
+   * Set to true if app want to clear pdx type ids when client disconnect.
+   * deafult is false.
+   */
+  void setOnClientDisconnectClearPdxTypeIds(bool set) {
+    m_onClientDisconnectClearPdxTypeIds = set;
+  }
+
+  /** Return the security auth library */
+  inline const char* authInitLibrary() const {
+    return (m_AuthIniLoaderLibrary == NULLPTR
+                ? ""
+                : m_AuthIniLoaderLibrary->asChar());
+  }
+
+  /** Return the security auth factory */
+  inline const char* authInitFactory() const {
+    return (m_AuthIniLoaderFactory == NULLPTR
+                ? ""
+                : m_AuthIniLoaderFactory->asChar());
+  }
+
+  /** Return the security diffie hellman secret key algo */
+  const char* securityClientDhAlgo() {
+    return (m_securityClientDhAlgo == NULLPTR
+                ? ""
+                : m_securityClientDhAlgo->asChar());
+  }
+
+  /** Return the keystore (.pem file ) path */
+  const char* securityClientKsPath() {
+    return (m_securityClientKsPath == NULLPTR
+                ? ""
+                : m_securityClientKsPath->asChar());
+  }
+
+  /** Returns securityPropertiesPtr.
+   * @return  PropertiesPtr value.
+  */
+  PropertiesPtr getSecurityProperties() const {
+    return m_securityPropertiesPtr;
+  }
+
+  /** Checks whether Security is on or off.
+   * @return  bool value.
+  */
+  inline bool isSecurityOn() const {
+    return (m_AuthIniLoaderFactory != NULLPTR &&
+            m_AuthIniLoaderLibrary != NULLPTR);
+  }
+
+  /** Checks whether list of endpoint is shuffeled or not.
+   * @return  bool value.
+  */
+  inline bool isEndpointShufflingDisabled() const {
+    return m_disableShufflingEndpoint;
+  }
+
+  /**
+   * Check whether Diffie-Hellman based credentials encryption is on.
+   * @return bool flag to indicate whether DH for credentials is on.
+   */
+  bool isDhOn() {
+    return isSecurityOn() && m_securityClientDhAlgo != NULLPTR &&
+           m_securityClientDhAlgo->length() > 0;
+  }
+
+  /**
+   * Checks to see if this native client is being invoked as part of small
+   * grid jobs; use this setting to disable some creation of threads and
+   * reducing start/stop time. Note that this setting can cause improper
+   * behaviour in some cases like:
+   *  1) client that is setup in listening mode and a server failure may not
+   *     lead to failover by client
+   *  2) while shutting down the client will not send a proper CLOSE_CONNECTION
+   *     message so server will report EOF exceptions and may detect client
+   *     disconnect after quite some time
+   * Also note that there may be some performance loss in queries and
+   * Region::getAll due to unavailability of parallel processing threads.
+   *
+   * @return true if the "grid-client" property is set
+   */
+  inline bool isGridClient() const { return m_gridClient; }
+
+  /**
+   * This property checks whether C# client is running in multiple appdoamin or
+   * not.
+   * Default value is "false".
+   */
+  inline bool isAppDomainEnabled() const { return m_appDomainEnabled; }
+
+  /**
+   * Whether a non durable client starts to receive and process
+   * subscription events automatically.
+   * If set to false then a non durable client should call the
+   * Cache::readyForEvents() method after all regions are created
+   * and listeners attached for the client to start receiving events
+   * whether the client is initialized programmatically or declaratively.
+   * @return the value of the property.
+   */
+  inline bool autoReadyForEvents() const { return m_autoReadyForEvents; }
+
+  /**
+  * Returns the timeout after which suspended transactions are rolled back.
+  */
+  const uint32_t suspendedTxTimeout() const { return m_suspendedTxTimeout; }
+
+  /**
+   * Returns the tombstone timeout .
+   */
+  const uint32_t tombstoneTimeoutInMSec() const {
+    return m_tombstoneTimeoutInMSec;
+  }
+
+ private:
+  uint32_t m_statisticsSampleInterval;
+
+  bool m_statisticsEnabled;
+
+  bool m_appDomainEnabled;
+
+  char* m_statisticsArchiveFile;
+
+  char* m_logFilename;
+
+  Log::LogLevel m_logLevel;
+
+  int m_sessions;
+
+  char* m_name;
+
+  bool m_debugStackTraceEnabled;
+
+  bool m_crashDumpEnabled;
+
+  bool m_disableShufflingEndpoint;
+
+  char* m_cacheXMLFile;
+
+  uint32_t m_logFileSizeLimit;
+  uint32_t m_logDiskSpaceLimit;
+
+  uint32_t m_statsFileSizeLimit;
+  uint32_t m_statsDiskSpaceLimit;
+
+  uint32_t m_maxQueueSize;
+  uint32_t m_javaConnectionPoolSize;
+
+  int32_t m_heapLRULimit;
+  int32_t m_heapLRUDelta;
+  int32_t m_maxSocketBufferSize;
+  int32_t m_pingInterval;
+  int32_t m_redundancyMonitorInterval;
+
+  int32_t m_notifyAckInterval;
+  int32_t m_notifyDupCheckLife;
+
+  PropertiesPtr m_securityPropertiesPtr;
+  CacheableStringPtr m_AuthIniLoaderLibrary;
+  CacheableStringPtr m_AuthIniLoaderFactory;
+  CacheableStringPtr m_securityClientDhAlgo;
+  CacheableStringPtr m_securityClientKsPath;
+  AuthInitializePtr m_authInitializer;
+
+  char* m_durableClientId;
+  uint32_t m_durableTimeout;
+
+  uint32_t m_connectTimeout;
+  uint32_t m_connectWaitTimeout;
+  uint32_t m_bucketWaitTimeout;
+
+  bool m_gridClient;
+
+  bool m_autoReadyForEvents;
+
+  bool m_sslEnabled;
+  bool m_timestatisticsEnabled;
+  char* m_sslKeyStore;
+  char* m_sslTrustStore;
+
+  char* m_sslKeystorePassword;
+
+  char* m_conflateEvents;
+
+  uint32_t m_threadPoolSize;
+  uint32_t m_suspendedTxTimeout;
+  uint32_t m_tombstoneTimeoutInMSec;
+  bool m_disableChunkHandlerThread;
+  bool m_readTimeoutUnitInMillis;
+  bool m_onClientDisconnectClearPdxTypeIds;
+
+ private:
+  /**
+   * Processes the given property/value pair, saving
+   * the results internally:
+   */
+  void processProperty(const char* property, const char* value);
+
+  /** Gets the authInitialize loader for the system.
+   * @return  a pointer that points to the system's ,
+   * <code>AuthLoader</code> , NULLPTR if there is no AuthLoader for this
+   * system.
+   */
+  AuthInitializePtr getAuthLoader();
+
+ private:
+  SystemProperties(const SystemProperties& rhs);  // never defined
+  void operator=(const SystemProperties& rhs);    // never defined
+
+  void throwError(const char* msg);
+
+ public:
+  static LibraryAuthInitializeFn managedAuthInitializeFn;
+
+  friend class DistributedSystemImpl;
+};
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_SYSTEMPROPERTIES_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/geode/TransactionId.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/TransactionId.hpp b/src/cppcache/include/geode/TransactionId.hpp
new file mode 100644
index 0000000..7723668
--- /dev/null
+++ b/src/cppcache/include/geode/TransactionId.hpp
@@ -0,0 +1,49 @@
+#pragma once
+
+#ifndef GEODE_TRANSACTIONID_H_
+#define GEODE_TRANSACTIONID_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.
+ */
+/*
+ * TransactionId.h
+ *
+ *  Created on: 04-Feb-2011
+ *      Author: ankurs
+ */
+
+#include "SharedBase.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+/** The TransactionId interface is a "marker" interface that
+* represents a unique Geode transaction.
+* @see Cache#getCacheTransactionManager
+* @see CacheTransactionManager#getTransactionId
+*/
+class CPPCACHE_EXPORT TransactionId : public apache::geode::client::SharedBase {
+ protected:
+  TransactionId();
+  virtual ~TransactionId();
+};
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_TRANSACTIONID_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/geode/TypeHelper.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/TypeHelper.hpp b/src/cppcache/include/geode/TypeHelper.hpp
new file mode 100644
index 0000000..b96684e
--- /dev/null
+++ b/src/cppcache/include/geode/TypeHelper.hpp
@@ -0,0 +1,154 @@
+#pragma once
+
+#ifndef GEODE_TYPEHELPER_H_
+#define GEODE_TYPEHELPER_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.
+ */
+
+/**
+ * @file Contains helper classes for extracting compile-time type traits
+ */
+
+#include "geode_globals.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+// Forward declaration of SharedPtr<T>
+template <typename Target>
+class SharedPtr;
+
+// Forward declaration of SharedArrayPtr<T, ID>
+template <typename Target, int8_t TYPEID>
+class SharedArrayPtr;
+
+// Forward declaration of CacheableArrayType<T, ID>
+template <typename Target, int8_t TYPEID>
+class CacheableArrayType;
+
+/**
+ * @brief Helper type traits and other structs/classes to 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. For an explanation of how this works see:
+ *        {@link
+ * http://groups.google.com/group/comp.lang.c++.moderated/msg/dd6c4e4d5160bd83}
+ *        {@link
+ * http://groups.google.com/group/comp.lang.c++.moderated/msg/645b2486ae80e5fb}
+ */
+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);
+};
+
+/**
+ * @brief Specialization of <code>SuperSubclass</code> to return true
+ *        for the special case when the two types being checked are same.
+ */
+template <typename TBase>
+struct SuperSubclass<TBase, TBase> {
+  static const bool result = true;
+};
+
+/**
+ * @brief This struct helps convert a boolean value into static objects
+ *        of different types. Useful for matching of template functions.
+ */
+template <bool getType = true>
+struct YesNoType {
+  static const yes_type value = 0;
+};
+
+/**
+ * @brief Specialization of YesNoType for boolean value false.
+ */
+template <>
+struct YesNoType<false> {
+  static const no_type value = 0;
+};
+
+/** @brief This struct unwraps the type <code>T</code> inside SharedPtr. */
+template <class T>
+struct UnwrapSharedPtr {};
+
+/** @brief This struct unwraps the type <code>T</code> inside SharedPtr. */
+template <class T>
+struct UnwrapSharedPtr<SharedPtr<T> > {
+  typedef T type;
+};
+
+/** @brief This struct unwraps the type <code>T</code> inside SharedArrayPtr. */
+template <class T, int8_t ID>
+struct UnwrapSharedPtr<SharedArrayPtr<T, ID> > {
+  typedef CacheableArrayType<T, ID> type;
+};
+}  // namespace TypeHelper
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+/** @brief Macro to unwrap the type <code>T</code> inside SharedPtr. */
+#define GF_UNWRAP_SP(T) \
+  typename apache::geode::client::TypeHelper::UnwrapSharedPtr<T>::type
+
+/**
+ * @brief Macro to determine if the type <code>T</code> is derived from
+ *        <code>Serializable</code>.
+ */
+#define GF_TYPE_IS_SERIALIZABLE(T)                  \
+  apache::geode::client::TypeHelper::SuperSubclass< \
+      apache::geode::client::Serializable, T>::result
+
+/**
+ * @brief Macro that returns <code>yes_type</code> if the type <code>T</code> is
+ *        derived from <code>Serializable</code> and <code>no_type</code>
+ *        otherwise. Useful for overloaded template functions.
+ */
+#define GF_TYPE_IS_SERIALIZABLE_TYPE(T)                                 \
+  apache::geode::client::TypeHelper::YesNoType<GF_TYPE_IS_SERIALIZABLE( \
+      T)>::value
+
+#define GF_SRC_IS_TARGET_TYPE(TARGET, SRC)                     \
+  apache::geode::client::TypeHelper::YesNoType<                \
+      apache::geode::client::TypeHelper::SuperSubclass<TARGET, \
+                                                       SRC>::result>::value
+
+#endif  // GEODE_TYPEHELPER_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/geode/UserData.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/UserData.hpp b/src/cppcache/include/geode/UserData.hpp
new file mode 100644
index 0000000..467a0c4
--- /dev/null
+++ b/src/cppcache/include/geode/UserData.hpp
@@ -0,0 +1,40 @@
+#pragma once
+
+#ifndef GEODE_USERDATA_H_
+#define GEODE_USERDATA_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.
+ */
+
+/**
+ * @file
+ */
+
+#include "geode_globals.hpp"
+#include "Serializable.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+typedef Serializable UserData;
+typedef SharedPtr<UserData> UserDataPtr;
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_USERDATA_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/geode/UserFunctionExecutionException.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/UserFunctionExecutionException.hpp b/src/cppcache/include/geode/UserFunctionExecutionException.hpp
new file mode 100644
index 0000000..3ca4634
--- /dev/null
+++ b/src/cppcache/include/geode/UserFunctionExecutionException.hpp
@@ -0,0 +1,125 @@
+#pragma once
+
+#ifndef GEODE_USERFUNCTIONEXECUTIONEXCEPTION_H_
+#define GEODE_USERFUNCTIONEXECUTIONEXCEPTION_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 "Serializable.hpp"
+#include "CacheableString.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+class UserFunctionExecutionException;
+typedef SharedPtr<UserFunctionExecutionException>
+    UserFunctionExecutionExceptionPtr;
+
+/**
+* @brief UserFunctionExecutionException class is used to encapsulate geode
+*sendException in case of Function execution.
+**/
+class UserFunctionExecutionException : public Serializable {
+  /**
+  * @brief public methods
+  */
+
+ public:
+  /**
+  * @brief destructor
+  */
+  virtual ~UserFunctionExecutionException() {}
+
+  /**
+  * @brief constructors
+  */
+  UserFunctionExecutionException(CacheableStringPtr msg);
+
+  /**
+  *@brief serialize this object
+  * @throws IllegalStateException If this api is called from User code.
+  **/
+  virtual void toData(DataOutput& output) const;
+
+  /**
+  *@brief deserialize this object, typical implementation should return
+  * the 'this' pointer.
+  * @throws IllegalStateException If this api is called from User code.
+  **/
+  virtual Serializable* fromData(DataInput& input);
+
+  /**
+  *@brief Return the classId of the instance being serialized.
+  * This is used by deserialization to determine what instance
+  * type to create and deserialize into.
+  *
+  * The classId must be unique within an application suite.
+  * Using a negative value may result in undefined behavior.
+  * @throws IllegalStateException If this api is called from User code.
+  */
+  virtual int32_t classId() const;
+
+  /**
+   *@brief return the size in bytes of the instance being serialized.
+   * This is used to determine whether the cache is using up more
+   * physical memory than it has been configured to use. The method can
+   * return zero if the user does not require the ability to control
+   * cache memory utilization.
+   * Note that you must implement this only if you use the HeapLRU feature.
+   * @throws IllegalStateException If this api is called from User code.
+ */
+  virtual uint32_t objectSize() const;
+
+  /**
+   *@brief return the typeId byte of the instance being serialized.
+   * This is used by deserialization to determine what instance
+   * type to create and deserialize into.
+   *
+   * Note that this should not be overridden by custom implementations
+   * and is reserved only for builtin types.
+   */
+  virtual int8_t typeId() const;
+
+  /**
+  *@brief return as CacheableStringPtr the Exception message returned from
+  *geode sendException api.
+  **/
+  CacheableStringPtr getMessage() { return m_message; }
+
+  /**
+  *@brief return as CacheableStringPtr the Exception name returned from geode
+  *sendException api.
+  **/
+  CacheableStringPtr getName() {
+    const char* msg = "UserFunctionExecutionException";
+    CacheableStringPtr str = CacheableString::create(msg);
+    return str;
+  }
+
+ private:
+  // never implemented.
+  UserFunctionExecutionException(const UserFunctionExecutionException& other);
+  void operator=(const UserFunctionExecutionException& other);
+
+  CacheableStringPtr m_message;  // error message
+};
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_USERFUNCTIONEXECUTIONEXCEPTION_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/geode/VectorOfSharedBase.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/VectorOfSharedBase.hpp b/src/cppcache/include/geode/VectorOfSharedBase.hpp
new file mode 100644
index 0000000..8976af3
--- /dev/null
+++ b/src/cppcache/include/geode/VectorOfSharedBase.hpp
@@ -0,0 +1,173 @@
+#pragma once
+
+#ifndef GEODE_VECTOROFSHAREDBASE_H_
+#define GEODE_VECTOROFSHAREDBASE_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 "SharedPtr.hpp"
+#ifdef BUILD_CPPCACHE
+#include <vector>
+#endif
+
+/** @file
+*/
+
+namespace apache {
+namespace geode {
+namespace client {
+
+#ifdef BUILD_CPPCACHE
+typedef std::vector<apache::geode::client::SharedBasePtr> VofSBP;
+typedef VofSBP::const_iterator VofSBPIterator;
+#else
+class VofSBP;
+class VofSBPIterator;
+#endif
+
+/** Represents a vector of <code>apache::geode::client::SharedBasePtr</code>
+*/
+class CPPCACHE_EXPORT VectorOfSharedBase {
+ private:
+  VofSBP* m_stdvector;
+
+ public:
+  /** Interface of an iterator for <code>VectorOfSharedBase</code>.*/
+  class CPPCACHE_EXPORT Iterator {
+   private:
+    VofSBPIterator* m_iter;
+
+    Iterator(const VofSBPIterator& iter);
+    // Never defined.
+    Iterator();
+
+   private:
+    const Iterator& operator=(const Iterator&);
+
+   public:
+    Iterator(const Iterator& other);
+
+    const SharedBasePtr operator*() const;
+
+    Iterator& operator++();
+
+    void operator++(int);
+
+    bool operator==(const Iterator& other) const;
+
+    bool operator!=(const Iterator& other) const;
+
+    ~Iterator();
+
+    friend class VectorOfSharedBase;
+  };
+
+  /** return the size of the vector. */
+  int32_t size() const;
+
+  /** return the largest possible size of the vector. */
+  int32_t max_size() const;
+
+  /** return the number of elements allocated for this vector. */
+  int32_t capacity() const;
+
+  /** return true if the vector's size is 0. */
+  bool empty() const;
+
+  /** Return the n'th element */
+  SharedBasePtr& operator[](int32_t n);
+
+  /** Return the n'th element */
+  const SharedBasePtr& operator[](int32_t n) const;
+
+  /** Return the n'th element with bounds checking. */
+  SharedBasePtr& at(int32_t n);
+
+  /** Return the n'th element with bounds checking. */
+  SharedBasePtr& at(int32_t n) const;
+
+  /** Get an iterator pointing to the start of vector. */
+  Iterator begin() const;
+
+  /** Get an iterator pointing to the end of vector. */
+  Iterator end() const;
+
+  /** Create an empty vector. */
+  VectorOfSharedBase();
+
+  /** Create a vector with n elements allocated */
+  VectorOfSharedBase(int32_t n);
+
+  /** Create a vector with n copies of t */
+  VectorOfSharedBase(int32_t n, const SharedBasePtr& t);
+
+  /** copy constructor */
+  VectorOfSharedBase(const VectorOfSharedBase& other);
+
+  /** destructor, sets all SharedPtr elements to NULLPTR */
+  ~VectorOfSharedBase();
+
+  /** assignment operator */
+  VectorOfSharedBase& operator=(const VectorOfSharedBase& other);
+
+  /** reallocate a vector to hold n elements. */
+  void reserve(int32_t n);
+
+  /** returns the first element. */
+  SharedBasePtr& front();
+
+  /** returns the first element. */
+  const SharedBasePtr& front() const;
+
+  /** returns the last element. */
+  SharedBasePtr& back();
+
+  /** returns the last element. */
+  const SharedBasePtr& back() const;
+
+  /** insert a new element at the end. */
+  void push_back(const SharedBasePtr& e);
+
+  /** removes the last element. */
+  void pop_back();
+
+  /** swaps the contents of two vectors. */
+  void swap(VectorOfSharedBase& other);
+
+  /** erases all elements. */
+  void clear();
+
+  /** inserts or erases elements at the end such that size becomes n.
+   *  Not to be confused with reserve which simply allocates the space,
+   *  resize fills the space with active elements. */
+  void resize(int32_t n, const SharedBasePtr& t = NULLPTR);
+
+  /** insert object at the given index. */
+  void insert(int32_t index, const SharedBasePtr& t);
+
+  /** removes the object at the specified index from a vector
+  */
+  void erase(int32_t index);
+};
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_VECTOROFSHAREDBASE_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/geode/VectorT.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/VectorT.hpp b/src/cppcache/include/geode/VectorT.hpp
new file mode 100644
index 0000000..48cd8fb
--- /dev/null
+++ b/src/cppcache/include/geode/VectorT.hpp
@@ -0,0 +1,260 @@
+#pragma once
+
+#ifndef GEODE_VECTORT_H_
+#define GEODE_VECTORT_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 "VectorOfSharedBase.hpp"
+#include "Cacheable.hpp"
+#include "CacheableKey.hpp"
+
+/** @file
+*/
+
+namespace apache {
+namespace geode {
+namespace client {
+
+/** Vector template type class */
+template <class PTR_TYPE>
+class VectorT {
+ private:
+  VectorOfSharedBase m_vector;
+
+ public:
+  /** Interface of an iterator for <code>VectorT</code>.*/
+  class Iterator {
+   private:
+    VectorOfSharedBase::Iterator m_iter;
+
+    inline Iterator(const VectorOfSharedBase::Iterator& iter) : m_iter(iter) {}
+
+    // Never defined.
+    Iterator();
+
+   public:
+    inline const PTR_TYPE operator*() const {
+      return staticCast<PTR_TYPE>(*m_iter);
+    }
+
+    inline Iterator& operator++() {
+      ++m_iter;
+      return *this;
+    }
+
+    inline void operator++(int) { m_iter++; }
+
+    inline bool operator==(const Iterator& other) const {
+      return (m_iter == other.m_iter);
+    }
+
+    inline bool operator!=(const Iterator& other) const {
+      return (m_iter != other.m_iter);
+    }
+
+    friend class VectorT;
+  };
+
+  /** return the size of the vector. */
+  inline int32_t size() const { return static_cast<int32_t>(m_vector.size()); }
+
+  /** synonym for size. */
+  inline int32_t length() const {
+    return static_cast<int32_t>(m_vector.size());
+  }
+
+  /** return the largest possible size of the vector. */
+  inline int32_t max_size() const {
+    return static_cast<int32_t>(m_vector.max_size());
+  }
+
+  /** return the number of elements allocated for this vector. */
+  inline int32_t capacity() const {
+    return static_cast<int32_t>(m_vector.capacity());
+  }
+
+  /** return true if the vector's size is 0. */
+  inline bool empty() const { return m_vector.empty(); }
+
+  /** Return the n'th element */
+  inline PTR_TYPE operator[](int32_t n) {
+    return staticCast<PTR_TYPE>(m_vector[n]);
+  }
+
+  /** Return the n'th element */
+  inline const PTR_TYPE operator[](int32_t n) const {
+    return staticCast<PTR_TYPE>(m_vector[n]);
+  }
+
+  /** Return the n'th element with bounds checking. */
+  inline PTR_TYPE at(int32_t n) { return staticCast<PTR_TYPE>(m_vector.at(n)); }
+
+  /** Return the n'th element with bounds checking. */
+  inline const PTR_TYPE at(int32_t n) const {
+    return staticCast<PTR_TYPE>(m_vector.at(n));
+  }
+
+  /** Get an iterator pointing to the start of vector. */
+  inline Iterator begin() const { return Iterator(m_vector.begin()); }
+
+  /** Get an iterator pointing to the end of vector. */
+  inline Iterator end() const { return Iterator(m_vector.end()); }
+
+  /** Create an empty vector. */
+  inline VectorT() : m_vector() {}
+
+  /** Create a vector with n elements allocated */
+  inline VectorT(int32_t n) : m_vector(n) {}
+
+  /** Create a vector with n copies of t */
+  inline VectorT(int32_t n, const PTR_TYPE& t) : m_vector(n, t) {}
+
+  /** copy constructor */
+  inline VectorT(const VectorT& other) : m_vector(other.m_vector) {}
+
+  /** destructor, sets all SharedPtr elements to NULLPTR */
+  inline ~VectorT() {
+    // destructor of m_vector field does all the work.
+  }
+
+  /** assignment operator */
+  inline VectorT& operator=(const VectorT& other) {
+    m_vector = other.m_vector;
+    return *this;
+  }
+
+  /** reallocate a vector to hold n elements. */
+  inline void reserve(int32_t n) { m_vector.reserve(n); }
+
+  /** returns the first element. */
+  inline PTR_TYPE front() { return staticCast<PTR_TYPE>(m_vector.front()); }
+
+  /** returns the first element. */
+  inline const PTR_TYPE front() const {
+    return staticCast<PTR_TYPE>(m_vector.front());
+  }
+
+  /** returns the last element. */
+  inline PTR_TYPE back() { return staticCast<PTR_TYPE>(m_vector.back()); }
+
+  /** returns the last element. */
+  inline const PTR_TYPE back() const {
+    return staticCast<PTR_TYPE>(m_vector.back());
+  }
+
+  /** insert a new element at the end. */
+  inline void push_back(const PTR_TYPE& e) { m_vector.push_back(e); }
+
+  /** removes the last element. */
+  inline void pop_back() { m_vector.pop_back(); }
+
+  /** swaps the contents of two vectors. */
+  inline void swap(VectorT& other) { m_vector.swap(other.m_vector); }
+
+  /** erases all elements. */
+  inline void clear() { m_vector.clear(); }
+
+  /** inserts or erases elements at the end such that size becomes n.
+   *  Not to be confused with reserve which simply allocates the space,
+   *  resize fills the space with active elements. */
+  inline void resize(int32_t n, const PTR_TYPE& t = NULLPTR) {
+    m_vector.resize(n, t);
+  }
+
+  /** insert object at the given position. */
+  inline void insert(int32_t index, const PTR_TYPE& t) {
+    m_vector.insert(index, t);
+  }
+
+  /** Removes the object at the specified index from a vector. */
+  inline void erase(int32_t index) { m_vector.erase(index); }
+};
+
+typedef VectorT<CacheablePtr> _VectorOfCacheable;
+typedef VectorT<CacheableKeyPtr> _VectorOfCacheableKey;
+typedef VectorT<RegionEntryPtr> VectorOfRegionEntry;
+typedef VectorT<RegionPtr> VectorOfRegion;
+typedef VectorT<CacheableStringPtr> VectorOfCacheableString;
+typedef VectorT<CqListenerPtr> VectorOfCqListener;
+typedef VectorT<CqQueryPtr> VectorOfCqQuery;
+
+/**
+ * A vector of <code>Cacheable</code> objects that also extends
+ * <code>SharedBase</code> for smart pointers.
+ */
+class CPPCACHE_EXPORT VectorOfCacheable : public _VectorOfCacheable,
+                                          public SharedBase {
+ public:
+  /** Iterator class for the vector. */
+  typedef _VectorOfCacheable::Iterator Iterator;
+
+  /** Create an empty vector. */
+  inline VectorOfCacheable() : _VectorOfCacheable() {}
+
+  /** Create a vector with n elements allocated. */
+  inline VectorOfCacheable(int32_t n) : _VectorOfCacheable(n) {}
+
+  /** Create a vector with n copies of t. */
+  inline VectorOfCacheable(int32_t n, const CacheablePtr& t)
+      : _VectorOfCacheable(n, t) {}
+
+  /** Copy constructor. */
+  inline VectorOfCacheable(const VectorOfCacheable& other)
+      : _VectorOfCacheable(other) {}
+
+ private:
+  const VectorOfCacheable& operator=(const VectorOfCacheable&);
+};
+
+/**
+ * A vector of <code>CacheableKey</code> objects that also extends
+ * <code>SharedBase</code> for smart pointers.
+ */
+class CPPCACHE_EXPORT VectorOfCacheableKey : public _VectorOfCacheableKey,
+                                             public SharedBase {
+ public:
+  /** Iterator class for the vector. */
+  typedef _VectorOfCacheableKey::Iterator Iterator;
+
+  /** Create an empty vector. */
+  inline VectorOfCacheableKey() : _VectorOfCacheableKey() {}
+
+  /** Create a vector with n elements allocated */
+  inline VectorOfCacheableKey(int32_t n) : _VectorOfCacheableKey(n) {}
+
+  /** Create a vector with n copies of t */
+  inline VectorOfCacheableKey(int32_t n, const CacheableKeyPtr& t)
+      : _VectorOfCacheableKey(n, t) {}
+
+  /** Copy constructor */
+  inline VectorOfCacheableKey(const VectorOfCacheableKey& other)
+      : _VectorOfCacheableKey(other) {}
+
+ private:
+  const VectorOfCacheableKey& operator=(const VectorOfCacheableKey&);
+};
+
+typedef SharedPtr<VectorOfCacheable> VectorOfCacheablePtr;
+typedef SharedPtr<VectorOfCacheableKey> VectorOfCacheableKeyPtr;
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_VECTORT_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/geode/WritablePdxInstance.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/WritablePdxInstance.hpp b/src/cppcache/include/geode/WritablePdxInstance.hpp
new file mode 100644
index 0000000..621c5e2
--- /dev/null
+++ b/src/cppcache/include/geode/WritablePdxInstance.hpp
@@ -0,0 +1,540 @@
+#pragma once
+
+#ifndef GEODE_WRITABLEPDXINSTANCE_H_
+#define GEODE_WRITABLEPDXINSTANCE_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 "SharedPtr.hpp"
+#include "Cacheable.hpp"
+
+#include "PdxInstance.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+/**
+* WritablePdxInstance is a {@link PdxInstance} that also supports field
+* modification
+* using the {@link #setField} method.
+* To get a WritablePdxInstance call {@link PdxInstance#createWriter}.
+*/
+class CPPCACHE_EXPORT WritablePdxInstance : public PdxInstance {
+  /**
+  * @brief public methods
+  */
+
+ public:
+  /**
+  * @brief destructor
+  */
+  virtual ~WritablePdxInstance() {}
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * CacheablePtr type is corresponding to java object type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type CacheablePtr
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, CacheablePtr value) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * bool type is corresponding to java boolean type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type bool
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, bool value) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * signed char type is corresponding to java byte type.
+  * For C++ on Windows and Linux, signed char type is corresponding to int8_t
+  * type.
+  * However C++ users on Solaris should always use this api after casting int8_t
+  * to signed char.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type signed char
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, signed char value) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * unsigned char type is corresponding to java byte type.
+  * For C++ on Windows and Linux, unsigned char type is corresponding to int8_t
+  * type.
+  * However C++ users on Solaris should always use this api after casting int8_t
+  * to unsigned char.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type unsigned char
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, unsigned char value) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * int16_t type is corresponding to java short type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type int16_t
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, int16_t value) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * int32_t type is corresponding to java int type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type int32_t
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, int32_t value) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * int64_t type is corresponding to java long type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type int64_t
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, int64_t value) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * float type is corresponding to java float type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type float
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, float value) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * double type is corresponding to java double type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type double
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, double value) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * wchar_t type is corresponding to java char type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type wchar_t
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, wchar_t value) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * char type is corresponding to java char type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type char
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, char value) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * CacheableDatePtr type is corresponding to java Java.util.date type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type CacheableDatePtr
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, CacheableDatePtr value) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * bool* type is corresponding to java boolean[] type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type bool array
+  * @param length
+  *          The number of elements in bool array type.
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, bool* value, int32_t length) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * signed char* type is corresponding to java byte[] type.
+  * For C++ on Windows and Linux, signed char* type is corresponding to int8_t*
+  * type.
+  * However C++ users on Solaris should always use this api after casting
+  * int8_t* to signed char*.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type signed char array
+  * @param length
+  *          The number of elements in signed char array type.
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, signed char* value,
+                        int32_t length) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * unsigned char* type is corresponding to java byte[] type.
+  * For C++ on Windows and Linux, unsigned char* type is corresponding to
+  * int8_t* type.
+  * However C++ users on Solaris should always use this api after casting
+  * int8_t* to unsigned char*.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type unsigned char array
+  * @param length
+  *          The number of elements in unsigned char array type.
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, unsigned char* value,
+                        int32_t length) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * int16_t* type is corresponding to java short[] type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type int16_t array
+  * @param length
+  *          The number of elements in int16_t array type.
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, int16_t* value,
+                        int32_t length) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * int32_t* type is corresponding to java int[] type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type int32_t array
+  * @param length
+  *          The number of elements in int32_t array type.
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, int32_t* value,
+                        int32_t length) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * int64_t* type is corresponding to java long[] type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type int64_t array
+  * @param length
+  *          The number of elements in int64_t array type.
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, int64_t* value,
+                        int32_t length) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * float* type is corresponding to java float[] type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type float array
+  * @param length
+  *          The number of elements in float array type.
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, float* value,
+                        int32_t length) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * double* type is corresponding to java double[] type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type double array
+  * @param length
+  *          The number of elements in double array type.
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, double* value,
+                        int32_t length) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * wchar_t* type is corresponding to java String type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type wchar_t*
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, const wchar_t* value) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * char* type is corresponding to java String type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type char*
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, const char* value) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * wchar_t* type is corresponding to java char[] type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type wchar_t array
+  * @param length
+  *          The number of elements in wchar_t array type.
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, wchar_t* value,
+                        int32_t length) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * char* type is corresponding to java char[] type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type char array
+  * @param length
+  *          The number of elements in char array type.
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, char* value, int32_t length) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * wchar_t** type is corresponding to java String[] type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type wchar_t* array
+  * @param length
+  *          The number of elements in WCString array type.
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, wchar_t** value,
+                        int32_t length) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * char** type is corresponding to java String[] type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type char* array
+  * @param length
+  *          The number of elements in CString array type.
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, char** value,
+                        int32_t length) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * int8_t** type is corresponding to java byte[][] type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type array of byte arrays
+  * @param arrayLength
+  *          The number of byte arrays.
+  * @param elementLength
+  *          The lengths of individual byte arrays.
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName, int8_t** value,
+                        int32_t arrayLength, int32_t* elementLength) = 0;
+
+  /**
+  * Set the existing named field to the given value.
+  * The setField method has copy-on-write semantics.
+  * So for the modifications to be stored in the cache the WritablePdxInstance
+  * must be put into a region after setField has been called one or more times.
+  * CacheableObjectArrayPtr type is corresponding to java Object[] type.
+  * @param fieldName
+  *          name of the field whose value will be set
+  * @param value
+  *          value that will be set to the field of type CacheableObjectArrayPtr
+  * @throws IllegalStateException if the named field does not exist
+  * or if the type of the value is not compatible with the field.
+  */
+  virtual void setField(const char* fieldName,
+                        CacheableObjectArrayPtr value) = 0;
+
+ protected:
+  /**
+  * @brief constructors
+  */
+  WritablePdxInstance(){};
+
+ private:
+  // never implemented.
+  WritablePdxInstance(const WritablePdxInstance& other);
+  void operator=(const WritablePdxInstance& other);
+};
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_WRITABLEPDXINSTANCE_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/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
new file mode 100644
index 0000000..67a570a
--- /dev/null
+++ b/src/cppcache/include/geode/geode_globals.hpp
@@ -0,0 +1,136 @@
+#pragma once
+
+#ifndef GEODE_GFCPP_GLOBALS_H_
+#define GEODE_GFCPP_GLOBALS_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.
+ */
+
+/**
+ * @file
+ */
+
+#ifdef WIN32
+#ifndef _WIN32
+#define _WIN32
+#endif
+#endif
+#ifdef _WIN32
+#ifndef WIN32
+#define WIN32
+#endif
+#endif
+
+#ifdef __linux
+#ifndef _LINUX
+#define _LINUX 1
+#endif
+#ifndef LINUX_GCC
+#define LINUX_GCC true
+#endif
+#endif
+
+#ifdef __sun
+#ifndef _SOLARIS
+#define _SOLARIS 1
+#if defined(__sparc) || defined(__sparcv9)
+#ifndef _SPARC_SOLARIS
+#define _SPARC_SOLARIS 1
+#endif
+#endif
+
+#if defined(__i386) || defined(__amd64)
+#ifndef _X86_SOLARIS
+#define _X86_SOLARIS 1
+#endif
+#endif
+#endif
+#endif
+
+#ifdef _MSC_VER
+// disable: "C++ Exception Specification ignored"
+// This is because MSVC did not implement all the C++ exception
+// specifications in the ANSI C++ draft.
+#pragma warning(disable : 4290)
+// Turn off warnings generated by lengthy std templates
+// This warns about truncation to 255 characters in debug/browse info
+#pragma warning(disable : 4786)
+// disable: "<type> needs to have dll-interface to be used by clients'
+// Happens on STL member variables which are not public therefore is ok
+#pragma warning(disable : 4251)
+
+// MSVC does not use __attribute__.
+#define ATTR_UNUSED
+
+#else
+
+#ifdef _SOLARIS
+
+// Solaris does not __attribute__.
+#define ATTR_UNUSED
+
+#else
+
+// gcc and clang use __attribute__.
+#define ATTR_UNUSED __attribute__((unused))
+
+#endif
+
+#endif
+
+#ifndef __has_cpp_attribute
+#define __has_cpp_attribute(x) 0
+#endif
+
+#if __has_cpp_attribute(deprecated)
+// C++14 standard deprecated attribute
+#define __DEPRECATED__(msg) [[deprecated(msg)]]
+#elif defined(__GNUC__)
+// GCC style deprecated attribute
+#define __DEPRECATED__(msg) __attribute__((deprecated(msg)))
+#elif defined(_MSC_VER)
+// Visual C++ style deprecated attribute
+#define __DEPRECATED__(msg) __declspec(deprecated(msg))
+#else
+#define __DEPRECATED__(msg)
+#endif
+
+#ifdef _WIN32
+#if WINVER == 0x0500
+#endif
+#endif
+
+#include "gf_base.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+extern void CPPCACHE_EXPORT millisleep(uint32_t millis);
+
+#ifdef _WIN32
+extern void CPPCACHE_EXPORT setNewAndDelete(pNew, pDelete);
+#endif
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#include "Log.hpp"
+#include "Assert.hpp"
+
+#endif  // GEODE_GFCPP_GLOBALS_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/geode/gf_base.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/gf_base.hpp b/src/cppcache/include/geode/gf_base.hpp
new file mode 100644
index 0000000..2508a06
--- /dev/null
+++ b/src/cppcache/include/geode/gf_base.hpp
@@ -0,0 +1,358 @@
+#pragma once
+
+#ifndef GEODE_GF_BASE_H_
+#define GEODE_GF_BASE_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.
+ */
+
+#if defined(_WIN32)
+/** Library Export */
+#define LIBEXP __declspec(dllexport)
+/** Library Implementation */
+#define LIBIMP __declspec(dllimport)
+/** Library Call */
+#define LIBCALL __stdcall
+/** Library Export a type */
+#define LIBEXPORT(type) LIBEXP type LIBCALL
+#else
+/** Library Export */
+#define LIBEXP
+/** Library Implementation */
+#define LIBIMP extern
+/** Library Call */
+#define LIBCALL /**/
+/** Library Export a type */
+#define LIBEXPORT(type) type
+#endif
+
+/** Defines a Geode C extern */
+#ifdef BUILD_GEMFIRE
+#define GFCEXTERN(type) LIBEXP type LIBCALL
+#else
+#define GFCEXTERN(type) LIBIMP type LIBCALL
+#endif /* BUILD_GEMFIRE    */
+
+/** Defines a Geode CPPCACHE export */
+#if defined(_WIN32)
+#ifdef BUILD_CPPCACHE
+#define CPPCACHE_EXPORT LIBEXP
+#else
+#define CPPCACHE_EXPORT LIBIMP
+#endif
+#else
+#define CPPCACHE_EXPORT
+#endif /* BUILD_CPPCACHE */
+
+/** Define GF_TEMPLATE_EXPORT */
+#if defined(_WIN32)
+#ifdef BUILD_CPPCACHE
+#define GF_TEMPLATE_EXPORT __declspec(dllexport)
+#else
+#define GF_TEMPLATE_EXPORT __declspec(dllimport)
+#endif
+#else
+#define GF_TEMPLATE_EXPORT
+#endif
+
+#if defined(_MSC_VER)
+/* 32 bit Windows only, for now */
+typedef signed char int8;        /**< single byte, character or boolean field */
+typedef unsigned char uint8;     /**< unsigned integer value */
+typedef signed short int16;      /**< signed 16 bit integer (short) */
+typedef unsigned short uint16;   /**< unsigned 16 bit integer (ushort) */
+typedef signed int int32;        /**< signed 32 bit integer */
+typedef unsigned int uint32;     /**< unsigned 32 bit integer */
+typedef signed __int64 int64;    /**< signed 64 bit integer */
+typedef unsigned __int64 uint64; /**< unsigned 64 bit integer */
+
+// typedef int32            intptr_t; /**< a pointer to a 32 bit integer */
+// typedef uint32           uintptr_t; /**< a pointer to an unsigned 32 bit
+// integer */
+
+/* Windows does not have stdint.h */
+typedef int8 int8_t;
+typedef uint8 uint8_t;
+typedef int16 int16_t;
+typedef uint16 uint16_t;
+typedef int32 int32_t;
+typedef uint32 uint32_t;
+typedef int64 int64_t;
+typedef uint64 uint64_t;
+/* end stdint.h */
+
+/* Windows does not have inttypes.h */
+/* 32 bit Windows only, for now */
+#if !defined PRId8
+#define PRId8 "d"
+#endif
+#if !defined PRIi8
+#define PRIi8 "i"
+#endif
+#if !defined PRIo8
+#define PRIo8 "o"
+#endif
+#if !defined PRIu8
+#define PRIu8 "u"
+#endif
+#if !defined PRIx8
+#define PRIx8 "x"
+#endif
+#if !defined PRIX8
+#define PRIX8 "X"
+#endif
+#if !defined PRId16
+#define PRId16 "d"
+#endif
+#if !defined PRIi16
+#define PRIi16 "i"
+#endif
+#if !defined PRIo16
+#define PRIo16 "o"
+#endif
+#if !defined PRIu16
+#define PRIu16 "u"
+#endif
+#if !defined PRIx16
+#define PRIx16 "x"
+#endif
+#if !defined PRIX16
+#define PRIX16 "X"
+#endif
+#if !defined PRId32
+#define PRId32 "d"
+#endif
+#if !defined PRIi32
+#define PRIi32 "i"
+#endif
+#if !defined PRIo32
+#define PRIo32 "o"
+#endif
+#if !defined PRIu32
+#define PRIu32 "u"
+#endif
+#if !defined PRIx32
+#define PRIx32 "x"
+#endif
+#if !defined PRIX32
+#define PRIX32 "X"
+#endif
+#if !defined PRId64
+#define PRId64 "lld"
+#endif
+#if !defined PRIi64
+#define PRIi64 "lli"
+#endif
+#if !defined PRIo64
+#define PRIo64 "llo"
+#endif
+#if !defined PRIu64
+#define PRIu64 "llu"
+#endif
+#if !defined PRIx64
+#define PRIx64 "llx"
+#endif
+#if !defined PRIX64
+#define PRIX64 "llX"
+#endif
+/* end inttypes.h */
+
+#ifndef _INC_WCHAR
+#include <wchar.h>
+#endif
+
+#else
+/* Unix, including both Sparc Solaris and Linux */
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
+typedef int8_t int8;     /**< single byte, character or boolean field */
+typedef uint8_t uint8;   /**< unsigned integer value */
+typedef int16_t int16;   /**< signed 16 bit integer (short) */
+typedef uint16_t uint16; /**< unsigned 16 bit integer (ushort) */
+typedef int32_t int32;   /**< signed 32 bit integer */
+typedef uint32_t uint32; /**< unsigned 32 bit integer */
+typedef int64_t int64;   /**< signed 64 bit integer */
+typedef uint64_t uint64; /**< unsigned 64 bit integer */
+
+#ifndef _WCHAR_H
+#include <wchar.h>
+#endif
+#endif /* _WIN32*/
+
+/**@namespace geode This namespace contains all the Geode
+ * C++ API classes, enumerations and globals.
+ */
+
+/**@namespace geode_statistics This namespace contains all the Geode
+ * C++ statistics API classes.
+ */
+
+/**@namespace apache::geode::client::TypeHelper This namespace contains type
+ * traits helper
+ * structs/classes to determine type information at compile time
+ * using typename. Useful for templates in particular.
+ */
+
+/**
+ * @file
+ *
+ *  Definitions of types and functions supported in the Geode C++ interface
+ */
+
+/** default timeout for query response */
+#define DEFAULT_QUERY_RESPONSE_TIMEOUT 15
+
+/**
+ * @enum GfErrType
+ *Error codes returned by Geode C++ interface functions
+ */
+typedef enum {
+  GF_NOERR = 0,           /**< success - no error               */
+  GF_DEADLK = 1,          /**< deadlock detected                */
+  GF_EACCES = 2,          /**< permission problem               */
+  GF_ECONFL = 3,          /**< class creation conflict          */
+  GF_EINVAL = 4,          /**< invalid argument                 */
+  GF_ENOENT = 5,          /**< entity does not exist            */
+  GF_ENOMEM = 6,          /**< insufficient memory              */
+  GF_ERANGE = 7,          /**< index out of range               */
+  GF_ETYPE = 8,           /**< type mismatch                    */
+  GF_NOTOBJ = 9,          /**< invalid object reference         */
+  GF_NOTCON = 10,         /**< not connected to Geode         */
+  GF_NOTOWN = 11,         /**< lock not owned by process/thread */
+  GF_NOTSUP = 12,         /**< operation not supported          */
+  GF_SCPGBL = 13,         /**< attempt to exit global scope     */
+  GF_SCPEXC = 14,         /**< maximum scopes exceeded          */
+  GF_TIMOUT = 15,         /**< operation timed out              */
+  GF_OVRFLW = 16,         /**< arithmetic overflow              */
+  GF_IOERR = 17,          /**< paging file I/O error            */
+  GF_EINTR = 18,          /**< interrupted Geode call         */
+  GF_MSG = 19,            /**< message could not be handled     */
+  GF_DISKFULL = 20,       /**< disk full                        */
+  GF_NOSERVER_FOUND = 21, /** NoServer found */
+  GF_SERVER_FAILED = 22,
+
+  GF_CLIENT_WAIT_TIMEOUT = 23,
+  GF_CLIENT_WAIT_TIMEOUT_REFRESH_PRMETADATA = 24,
+
+  GF_CACHE_REGION_NOT_FOUND = 101, /**< No region with the specified name. */
+  GF_CACHE_REGION_INVALID = 102,   /**< the region is not valid */
+  GF_CACHE_REGION_KEYS_NOT_STRINGS = 103, /**< Entry keys are not strings */
+  GF_CACHE_REGION_ENTRY_NOT_BYTES =
+      104,                          /**< Entry's value is not a byte array */
+  GF_CACHE_REGION_NOT_GLOBAL = 105, /**< Distributed locks not supported */
+  GF_CACHE_PROXY = 106, /**< Errors detected in CacheProxy processing */
+  GF_CACHE_ILLEGAL_ARGUMENT_EXCEPTION =
+      107, /**< IllegalArgumentException in Cache Proxy */
+  GF_CACHE_ILLEGAL_STATE_EXCEPTION =
+      108,                          /**< IllegalStateException in CacheProxy */
+  GF_CACHE_TIMEOUT_EXCEPTION = 109, /**< TimeoutException in CacheProxy */
+  GF_CACHE_WRITER_EXCEPTION = 110,  /**< CacheWriterException in CacheProxy */
+  GF_CACHE_REGION_EXISTS_EXCEPTION =
+      111,                         /**< RegionExistsException in CacheProxy */
+  GF_CACHE_CLOSED_EXCEPTION = 112, /**< CacheClosedException in CacheProxy */
+  GF_CACHE_LEASE_EXPIRED_EXCEPTION =
+      113,                         /**< LeaseExpiredException in CacheProxy */
+  GF_CACHE_LOADER_EXCEPTION = 114, /**< CacheLoaderException in CacheProxy */
+  GF_CACHE_REGION_DESTROYED_EXCEPTION =
+      115, /**< RegionDestroyedException in CacheProxy */
+  GF_CACHE_ENTRY_DESTROYED_EXCEPTION =
+      116, /**< EntryDestroyedException in CacheProxy */
+  GF_CACHE_STATISTICS_DISABLED_EXCEPTION =
+      117, /**< StatisticsDisabledException in CacheProxy */
+  GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION =
+      118, /**< ConcurrentModificationException in CacheProxy */
+  GF_CACHE_ENTRY_NOT_FOUND = 119, /**< EntryNotFoundException in CacheProxy */
+  GF_CACHE_ENTRY_EXISTS = 120,    /**< EntryExistsException in CacheProxy */
+  GF_CACHEWRITER_ERROR =
+      121, /**< An Exception occured while invoking a cachewritter callback*/
+  GF_CANNOT_PROCESS_GII_REQUEST =
+      123, /**< A failure other than timeout occured durring a batch request */
+  GF_CACHESERVER_EXCEPTION = 124, /**< Java cache server exception sent to the
+                                     thin client by java cache server */
+  // GF_CACHE_REDUNDANCY_FAILURE = 125, /**< redundancy level not satisfied */
+  GF_AUTHENTICATION_FAILED_EXCEPTION = 126, /**<Authentication Fails */
+  GF_NOT_AUTHORIZED_EXCEPTION = 127, /**<Non Authorized Operation Tried */
+  GF_AUTHENTICATION_REQUIRED_EXCEPTION = 128, /**No Authentication Provided */
+  GF_DUPLICATE_DURABLE_CLIENT =
+      129, /**< Java cache server refused duplicate durable client  */
+  GF_REMOTE_QUERY_EXCEPTION = 130,   /** Query exception on java cache server */
+  GF_CACHE_LISTENER_EXCEPTION = 131, /** Exception in CacheListener */
+  GF_ALL_CONNECTIONS_IN_USE_EXCEPTION = 132, /** ALl connections in use*/
+  /**
+   * local entry was updated while a remote modification operation was
+   * in progress
+   */
+  GF_CACHE_ENTRY_UPDATED = 133,
+  GF_CACHE_LOCATOR_EXCEPTION = 134, /** Exception in Locator */
+  GF_INVALID_DELTA = 135,
+  GF_FUNCTION_EXCEPTION = 136,
+  GF_ROLLBACK_EXCEPTION = 137,
+  GF_COMMIT_CONFLICT_EXCEPTION = 138,
+  GF_TRANSACTION_DATA_NODE_HAS_DEPARTED_EXCEPTION = 139,
+  GF_TRANSACTION_DATA_REBALANCED_EXCEPTION = 140,
+  GF_PUTALL_PARTIAL_RESULT_EXCEPTION = 141,
+  GF_EUNDEF = 999 /**< unknown exception */
+} GfErrType;
+
+#include <new>
+
+#ifdef _WIN32
+
+typedef void *(*pNew)(size_t);
+typedef void (*pDelete)(void *);
+
+namespace apache {
+namespace geode {
+namespace client {
+extern void setDefaultNewAndDelete();
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+void *operator new(size_t size);
+void operator delete(void *p);
+void *operator new[](size_t size);
+void operator delete[](void *p);
+
+#endif  // _WIN32
+
+/** Allocates x and throws OutOfMemoryException if it fails */
+#define GF_NEW(v, stmt)                                                 \
+  {                                                                     \
+    try {                                                               \
+      v = new stmt;                                                     \
+    } catch (const std::bad_alloc &) {                                  \
+      throw apache::geode::client::OutOfMemoryException(                \
+          "Out of Memory while executing \"" #v " = new " #stmt ";\""); \
+    }                                                                   \
+  }
+
+/** Deletes x only if it exists */
+#define GF_SAFE_DELETE(x) \
+  {                       \
+    delete x;             \
+    x = NULL;             \
+  }
+
+/** Deletes array x only if it exists */
+#define GF_SAFE_DELETE_ARRAY(x) \
+  {                             \
+    delete[] x;                 \
+    x = NULL;                   \
+  }
+
+#endif  // GEODE_GF_BASE_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/geode/gf_types.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/gf_types.hpp b/src/cppcache/include/geode/gf_types.hpp
new file mode 100644
index 0000000..90fd4bb
--- /dev/null
+++ b/src/cppcache/include/geode/gf_types.hpp
@@ -0,0 +1,111 @@
+#pragma once
+
+#ifndef GEODE_GF_TYPES_H_
+#define GEODE_GF_TYPES_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 "SharedPtr.hpp"
+
+/**
+ * @file
+ */
+
+namespace apache {
+namespace geode {
+namespace client {
+
+class CacheFactory;
+
+#define _GF_PTR_DEF_(a, b) \
+  class CPPCACHE_EXPORT a; \
+  typedef SharedPtr<a> b;
+
+_GF_PTR_DEF_(DistributedSystem, DistributedSystemPtr);
+_GF_PTR_DEF_(CacheFactory, CacheFactoryPtr);
+_GF_PTR_DEF_(RegionService, RegionServicePtr);
+_GF_PTR_DEF_(GeodeCache, GeodeCachePtr);
+_GF_PTR_DEF_(Cache, CachePtr);
+_GF_PTR_DEF_(RegionFactory, RegionFactoryPtr);
+_GF_PTR_DEF_(AttributesFactory, AttributesFactoryPtr);
+_GF_PTR_DEF_(Region, RegionPtr);
+_GF_PTR_DEF_(AttributesMutator, AttributesMutatorPtr);
+_GF_PTR_DEF_(MapEntry, MapEntryPtr);
+_GF_PTR_DEF_(RegionEntry, RegionEntryPtr);
+_GF_PTR_DEF_(EventId, EventIdPtr);
+_GF_PTR_DEF_(CacheStatistics, CacheStatisticsPtr);
+_GF_PTR_DEF_(PersistenceManager, PersistenceManagerPtr);
+_GF_PTR_DEF_(Properties, PropertiesPtr);
+_GF_PTR_DEF_(FunctionService, FunctionServicePtr);
+_GF_PTR_DEF_(CacheLoader, CacheLoaderPtr);
+_GF_PTR_DEF_(CacheListener, CacheListenerPtr);
+_GF_PTR_DEF_(CacheWriter, CacheWriterPtr);
+_GF_PTR_DEF_(MembershipListener, MembershipListenerPtr);
+_GF_PTR_DEF_(RegionAttributes, RegionAttributesPtr);
+_GF_PTR_DEF_(CacheableDate, CacheableDatePtr);
+_GF_PTR_DEF_(CacheableFileName, CacheableFileNamePtr);
+_GF_PTR_DEF_(CacheableKey, CacheableKeyPtr);
+_GF_PTR_DEF_(CacheableObjectArray, CacheableObjectArrayPtr);
+_GF_PTR_DEF_(CacheableString, CacheableStringPtr);
+_GF_PTR_DEF_(CacheableUndefined, CacheableUndefinedPtr);
+_GF_PTR_DEF_(Serializable, SerializablePtr);
+_GF_PTR_DEF_(PdxSerializable, PdxSerializablePtr);
+_GF_PTR_DEF_(StackTrace, StackTracePtr);
+_GF_PTR_DEF_(SelectResults, SelectResultsPtr);
+_GF_PTR_DEF_(CqResults, CqResultsPtr);
+_GF_PTR_DEF_(ResultSet, ResultSetPtr);
+_GF_PTR_DEF_(StructSet, StructSetPtr);
+_GF_PTR_DEF_(Struct, StructPtr);
+_GF_PTR_DEF_(Query, QueryPtr);
+_GF_PTR_DEF_(QueryService, QueryServicePtr);
+_GF_PTR_DEF_(AuthInitialize, AuthInitializePtr);
+_GF_PTR_DEF_(CqQuery, CqQueryPtr);
+_GF_PTR_DEF_(CqListener, CqListenerPtr);
+_GF_PTR_DEF_(CqAttributes, CqAttributesPtr);
+_GF_PTR_DEF_(CqServiceStatistics, CqServiceStatisticsPtr);
+_GF_PTR_DEF_(CqStatistics, CqStatisticsPtr);
+_GF_PTR_DEF_(CqAttributesMutator, CqAttributesMutatorPtr);
+_GF_PTR_DEF_(ClientHealthStats, ClientHealthStatsPtr);
+_GF_PTR_DEF_(Pool, PoolPtr);
+_GF_PTR_DEF_(PoolFactory, PoolFactoryPtr);
+_GF_PTR_DEF_(PoolAttributes, PoolAttributesPtr);
+_GF_PTR_DEF_(ResultCollector, ResultCollectorPtr);
+_GF_PTR_DEF_(Execution, ExecutionPtr);
+_GF_PTR_DEF_(Delta, DeltaPtr);
+_GF_PTR_DEF_(PartitionResolver, PartitionResolverPtr);
+_GF_PTR_DEF_(FixedPartitionResolver, FixedPartitionResolverPtr);
+_GF_PTR_DEF_(CacheTransactionManager, CacheTransactionManagerPtr);
+_GF_PTR_DEF_(TransactionId, TransactionIdPtr);
+_GF_PTR_DEF_(EntryEvent, EntryEventPtr);
+_GF_PTR_DEF_(PdxReader, PdxReaderPtr);
+_GF_PTR_DEF_(PdxWriter, PdxWriterPtr);
+_GF_PTR_DEF_(PdxWrapper, PdxWrapperPtr);
+_GF_PTR_DEF_(PdxSerializer, PdxSerializerPtr);
+_GF_PTR_DEF_(PdxInstanceFactory, PdxInstanceFactoryPtr);
+_GF_PTR_DEF_(PdxInstance, PdxInstancePtr);
+_GF_PTR_DEF_(WritablePdxInstance, WritablePdxInstancePtr);
+_GF_PTR_DEF_(PdxUnreadFields, PdxUnreadFieldsPtr);
+_GF_PTR_DEF_(CacheableEnum, CacheableEnumPtr);
+_GF_PTR_DEF_(CqStatusListener, CqStatusListenerPtr);
+_GF_PTR_DEF_(InternalCacheTransactionManager2PC,
+             InternalCacheTransactionManager2PCPtr);
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_GF_TYPES_H_


Mime
View raw message