Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 51D26200C22 for ; Tue, 21 Feb 2017 18:40:31 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 506D6160B4F; Tue, 21 Feb 2017 17:40:31 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DB327160B84 for ; Tue, 21 Feb 2017 18:40:17 +0100 (CET) Received: (qmail 13634 invoked by uid 500); 21 Feb 2017 17:40:17 -0000 Mailing-List: contact commits-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list commits@geode.apache.org Received: (qmail 12547 invoked by uid 99); 21 Feb 2017 17:40:15 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2017 17:40:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D7475E0B49; Tue, 21 Feb 2017 17:40:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jbarrett@apache.org To: commits@geode.apache.org Date: Tue, 21 Feb 2017 17:40:30 -0000 Message-Id: <207b7bc6323e47aabedad1503c4778bd@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [17/31] geode-native git commit: GEODE-2476: Replace gfcpp with geode. archived-at: Tue, 21 Feb 2017 17:40:31 -0000 http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CacheableDate.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CacheableDate.hpp b/src/cppcache/include/gfcpp/CacheableDate.hpp deleted file mode 100644 index a9e462b..0000000 --- a/src/cppcache/include/gfcpp/CacheableDate.hpp +++ /dev/null @@ -1,190 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CACHEABLEDATE_H_ -#define GEODE_GFCPP_CACHEABLEDATE_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" -#include "CacheableKey.hpp" -#include "CacheableString.hpp" -#include "GeodeTypeIds.hpp" -#include "ExceptionTypes.hpp" - -#include -#include -#include - -/** @file -*/ -namespace apache { -namespace geode { -namespace client { - -/** - * Implement a date object based on epoch of January 1, 1970 00:00:00 GMT that - * can serve as a distributable key object for caching as well as being a date - * value. - */ -class CPPCACHE_EXPORT CacheableDate : public CacheableKey { - private: - /** - * Milliseconds since January 1, 1970, 00:00:00 GMT to be consistent with Java - * Date. - */ - int64_t m_timevalue; - - public: - typedef std::chrono::system_clock clock; - typedef std::chrono::time_point time_point; - typedef std::chrono::milliseconds duration; - - /** - * @brief serialize this object - **/ - virtual void toData(DataOutput& output) const; - - /** - * @brief deserialize this object - **/ - virtual Serializable* fromData(DataInput& input); - - /** - * @brief creation function for dates. - */ - static Serializable* createDeserializable(); - - /** - * @brief Return the classId of the instance being serialized. - * This is used by deserialization to determine what instance - * type to create and deserialize into. - */ - virtual int32_t classId() 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. - */ - virtual int8_t typeId() const; - - /** @return the size of the object in bytes */ - virtual uint32_t objectSize() const { return sizeof(CacheableDate); } - - /** @return true if this key matches other. */ - virtual bool operator==(const CacheableKey& other) const; - - /** - * @return day of the month. - * @deprecated Use localtime or similar for calendar conversions. - */ - __DEPRECATED__("Use localtime or similar for calendar conversions.") - virtual int day() const; - - /** - * @return month 1(Jan) - 12(Dec) . - * @deprecated Use localtime or similar for calendar conversions. - */ - __DEPRECATED__("Use localtime or similar for calendar conversions.") - virtual int month() const; - - /** - * @return year, example 1999. - * @deprecated Use localtime or similar for calendar conversions. - */ - __DEPRECATED__("Use localtime or similar for calendar conversions.") - virtual int year() const; - - /** @return milliseconds elapsed since January 1, 1970, 00:00:00 GMT. */ - virtual int64_t milliseconds() const; - - /** - * Returns a hash code value for this object. The result is the exclusive OR - * of the two halves of the primitive long value returned by the - * milliseconds() method. - * - * @return the hashcode for this object. */ - virtual uint32_t hashcode() const; - - operator time_t() const { return m_timevalue / 1000; } - operator time_point() const { - return clock::from_time_t(0) + duration(m_timevalue); - } - operator duration() const { return duration(m_timevalue); } - - /** - * Factory method for creating an instance of CacheableDate - */ - static CacheableDatePtr create() { - return CacheableDatePtr(new CacheableDate()); - } - - static CacheableDatePtr create(const time_t& value) { - return CacheableDatePtr(new CacheableDate(value)); - } - - static CacheableDatePtr create(const time_point& value) { - return CacheableDatePtr(new CacheableDate(value)); - } - - static CacheableDatePtr create(const duration& value) { - return CacheableDatePtr(new CacheableDate(value)); - } - - virtual CacheableStringPtr toString() const; - - /** Destructor */ - virtual ~CacheableDate(); - - /** used to render as a string for logging. */ - virtual int32_t logString(char* buffer, int32_t maxLength) const; - - protected: - /** Constructor, used for deserialization. */ - CacheableDate(const time_t value = 0); - - /** - * Construct from std::chrono::time_point. - */ - CacheableDate(const time_point& value); - - /** - * Construct from std::chrono::seconds since POSIX epoch. - */ - CacheableDate(const duration& value); - - private: - // never implemented. - void operator=(const CacheableDate& other); - CacheableDate(const CacheableDate& other); -}; - -inline CacheableKeyPtr createKey(const CacheableDate::time_point& value) { - return CacheableKeyPtr(CacheableDate::create(value)); -} - -inline CacheablePtr createValue(const CacheableDate::time_point& value) { - return CacheablePtr(CacheableDate::create(value)); -} - -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CACHEABLEDATE_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CacheableEnum.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CacheableEnum.hpp b/src/cppcache/include/gfcpp/CacheableEnum.hpp deleted file mode 100644 index 14ceeca..0000000 --- a/src/cppcache/include/gfcpp/CacheableEnum.hpp +++ /dev/null @@ -1,147 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CACHEABLEENUM_H_ -#define GEODE_GFCPP_CACHEABLEENUM_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 "CacheableKey.hpp" -#include "CacheableString.hpp" - -namespace apache { -namespace geode { -namespace client { - -/** -* Since C++ enums cannot be directly passed as a parameter to PdxWriter's -* writeObject and PdxReader's readObject api -* wrap C++ enum in to a immutable wrapper CacheableEnum class type by specifying -* enum class name, enum value name and its ordinal. -* C++ enum allows explicit setting of ordinal number, but it is up to the user -* to map java enumName with that of C++ enumName. -* Currently this wrapper only works as part of PdxSerializable member object and -* cannot be directly used in Region operations. -* -* @see PdxWriter#writeObject -* @see PdxReader#readObject -*/ - -class CPPCACHE_EXPORT CacheableEnum : public CacheableKey { - private: - CacheableStringPtr m_enumClassName; - CacheableStringPtr m_enumName; - int32_t m_ordinal; - mutable int32_t m_hashcode; - - public: - /** Destructor */ - ~CacheableEnum(); - - /** - * @brief creation function for enum. - */ - static Serializable* createDeserializable() { return new CacheableEnum(); } - /** - * @brief serialize this object - **/ - virtual void toData(DataOutput& output) const; - - /** - * @brief deserialize this object - **/ - virtual Serializable* fromData(DataInput& input); - - /** @return the size of the object in bytes */ - virtual uint32_t objectSize() const { - uint32_t size = sizeof(CacheableEnum); - size += static_cast(sizeof(int32_t)); - size += m_enumClassName->objectSize(); - size += m_enumName->objectSize(); - return size; - } - - /** - * @brief Return the classId of the instance being serialized. - * This is used by deserialization to determine what instance - * type to create and deserialize into. - */ - virtual int32_t classId() const { return 0; } - - /** - * @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. - */ - virtual int8_t typeId() const { - // return 0; - return static_cast(GeodeTypeIds::CacheableEnum); - } - - /** - * Display this object as c string. - */ - virtual CacheableStringPtr toString() const { - return CacheableString::create("CacheableEnum"); - } - - /** - * Factory method for creating an instance of CacheableEnum. - * @param className the name of the enum class that maps to the java enum type. - * @param enumName the name of the enum constant that maps to the java enum - * type. - * @param ordinal the ordinal value of the enum constant that maps to the java - * enum type. - * @return a {@link CacheableEnum} representing C++ enum. - */ - static CacheableEnumPtr create(const char* enumClassName, - const char* enumName, int32_t ordinal) { - CacheableEnumPtr str(new CacheableEnum(enumClassName, enumName, ordinal)); - return str; - } - - /**@return enum class name. */ - const char* getEnumClassName() const { return m_enumClassName->asChar(); } - - /**@return enum name. */ - const char* getEnumName() const { return m_enumName->asChar(); } - - /**@return enum ordinal. */ - int32_t getEnumOrdinal() const { return m_ordinal; } - - /** @return the hashcode for this key. */ - virtual uint32_t hashcode() const; - - /** @return true if this key matches other. */ - virtual bool operator==(const CacheableKey& other) const; - - protected: - CacheableEnum(); - CacheableEnum(const char* enumClassName, const char* enumName, - int32_t ordinal); - - private: - // never implemented. - void operator=(const CacheableEnum& other); - CacheableEnum(const CacheableEnum& other); -}; -} // namespace client -} // namespace geode -} // namespace apache - - -#endif // GEODE_GFCPP_CACHEABLEENUM_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CacheableFileName.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CacheableFileName.hpp b/src/cppcache/include/gfcpp/CacheableFileName.hpp deleted file mode 100644 index 0315799..0000000 --- a/src/cppcache/include/gfcpp/CacheableFileName.hpp +++ /dev/null @@ -1,121 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CACHEABLEFILENAME_H_ -#define GEODE_GFCPP_CACHEABLEFILENAME_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" -#include "CacheableKey.hpp" -#include "CacheableString.hpp" - -/** @file - */ - -namespace apache { -namespace geode { -namespace client { -/** - * Implement an immutable wrapper for filenames that can serve as a - * distributable filename object for caching as both key and value. - */ -class CPPCACHE_EXPORT CacheableFileName : public CacheableString { - public: - /** - *@brief serialize this object - **/ - virtual void toData(DataOutput& output) const; - - /** - *@brief deserialize this object - * Throw IllegalArgumentException if the packed CacheableString is not less - * than 64K bytes. - **/ - 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. - */ - virtual int32_t classId() 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. - */ - virtual int8_t typeId() const; - - /** - * @brief creation function for filenames. - */ - static Serializable* createDeserializable() { - return new CacheableFileName(); - } - - /** - * Factory method for creating an instance of CacheableFileName from a - * C string optionally given the length. - */ - static CacheableFileNamePtr create(const char* value, int32_t len = 0) { - CacheableFileNamePtr str = NULLPTR; - if (value != NULL) { - str = new CacheableFileName(); - str->initString(value, len); - } - return str; - } - - /** - * Factory method for creating an instance of CacheableFileName from a - * wide-character C string optionally given the length. - */ - static CacheableFileNamePtr create(const wchar_t* value, int32_t len = 0) { - CacheableFileNamePtr str = NULLPTR; - if (value != NULL) { - str = new CacheableFileName(); - str->initString(value, len); - } - return str; - } - - /** get the name of the class of this object for logging purpose */ - virtual const char* className() const { return "CacheableFileName"; } - - /** return the hashcode for this key. */ - virtual uint32_t hashcode() const; - - protected: - /** Default constructor. */ - inline CacheableFileName() : CacheableString(), m_hashcode(0) {} - - private: - // never implemented. - void operator=(const CacheableFileName& other); - CacheableFileName(const CacheableFileName& other); - - private: - mutable int m_hashcode; -}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CACHEABLEFILENAME_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CacheableKey.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CacheableKey.hpp b/src/cppcache/include/gfcpp/CacheableKey.hpp deleted file mode 100644 index cad1eef..0000000 --- a/src/cppcache/include/gfcpp/CacheableKey.hpp +++ /dev/null @@ -1,87 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CACHEABLEKEY_H_ -#define GEODE_GFCPP_CACHEABLEKEY_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" -#include "Cacheable.hpp" - -/** - * @file - */ - -namespace apache { -namespace geode { -namespace client { - -/** Represents a cacheable key */ -class CPPCACHE_EXPORT CacheableKey : public Cacheable { - protected: - /** Constructor */ - CacheableKey() : Cacheable() {} - - /** Destructor */ - virtual ~CacheableKey() {} - - public: - /** return true if this key matches other. */ - virtual bool operator==(const CacheableKey& other) const = 0; - - /** return the hashcode for this key. */ - virtual uint32_t hashcode() const = 0; - - /** Copy the string form of a key into a char* buffer for logging purposes. - * - * Implementations should only generate a string as long as maxLength chars, - * and return the number of chars written. buffer is expected to be large - * enough to hold at least maxLength chars. - * - * The default implementation renders the classname and instance address. - */ - virtual int32_t logString(char* buffer, int32_t maxLength) const; - - /** - * Factory method that creates the key type that matches the type of value. - * - * For customer defined derivations of CacheableKey, the method - * apache::geode::client::createKey may be overloaded. For pointer types (e.g. - * char*) - * the method apache::geode::client::createKeyArr may be overloaded. - */ - template - inline static CacheableKeyPtr create(const PRIM value); - - private: - // Never defined. - CacheableKey(const CacheableKey& other); - void operator=(const CacheableKey& other); -}; - -template -inline CacheableKeyPtr createKey(const SharedPtr& value); - -template -inline CacheableKeyPtr createKey(const TKEY* value); -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CACHEABLEKEY_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CacheableKey.inl ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CacheableKey.inl b/src/cppcache/include/gfcpp/CacheableKey.inl deleted file mode 100644 index 1413d0e..0000000 --- a/src/cppcache/include/gfcpp/CacheableKey.inl +++ /dev/null @@ -1,55 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CACHEABLEKEY_INL_ -#define GEODE_GFCPP_CACHEABLEKEY_INL_ - -/* - * 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 "CacheableKey.hpp" - -/** - * @file - */ - -namespace apache { -namespace geode { -namespace client { - -template< class PRIM > -inline CacheableKeyPtr CacheableKey::create( const PRIM value ) -{ - return createKey( value ); -} - -template -inline CacheableKeyPtr createKey( const SharedPtr< TKEY >& value ) -{ - return CacheableKeyPtr( value ); -} - -template -inline CacheableKeyPtr createKey( const TKEY* value ) -{ - return createKeyArr( value ); -} - -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CACHEABLEKEY_INL_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CacheableKeys.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CacheableKeys.hpp b/src/cppcache/include/gfcpp/CacheableKeys.hpp deleted file mode 100644 index 72757e8..0000000 --- a/src/cppcache/include/gfcpp/CacheableKeys.hpp +++ /dev/null @@ -1,99 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CACHEABLEKEYS_H_ -#define GEODE_GFCPP_CACHEABLEKEYS_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 "gfcpp_globals.hpp" - -namespace apache { -namespace geode { -namespace client { -namespace serializer { - -template -inline bool equals(const TObj& x, const TObj& y) { - return (x == y); -} - -inline uint32_t hashcode(const bool value) { - if (value) { - return 1231; - } else { - return 1237; - } -} - -inline uint32_t hashcode(const uint8_t value) { - return static_cast(value); -} - -inline uint32_t hashcode(const int8_t value) { - return static_cast(value); -} - -inline uint32_t hashcode(const uint16_t value) { - return static_cast(value); -} - -inline uint32_t hashcode(const int16_t value) { - return static_cast(value); -} - -inline uint32_t hashcode(const uint32_t value) { return value; } - -inline uint32_t hashcode(const int32_t value) { - return static_cast(value); -} - -inline uint32_t hashcode(const uint64_t value) { - uint32_t hash = static_cast(value); - hash = hash ^ static_cast(value >> 32); - return hash; -} - -inline uint32_t hashcode(const int64_t value) { - uint32_t hash = static_cast(value); - hash = hash ^ static_cast(value >> 32); - return hash; -} - -inline uint32_t hashcode(const float value) { - union float_uint32_t { - float f; - uint32_t u; - } v; - v.f = value; - return v.u; -} - -inline uint32_t hashcode(const double value) { - union double_uint64_t { - double d; - uint64_t u; - } v; - v.d = value; - return hashcode(v.u); -} -} // namespace serializer -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CACHEABLEKEYS_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CacheableObjectArray.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CacheableObjectArray.hpp b/src/cppcache/include/gfcpp/CacheableObjectArray.hpp deleted file mode 100644 index 5ebc224..0000000 --- a/src/cppcache/include/gfcpp/CacheableObjectArray.hpp +++ /dev/null @@ -1,106 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CACHEABLEOBJECTARRAY_H_ -#define GEODE_GFCPP_CACHEABLEOBJECTARRAY_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" -#include "VectorT.hpp" - -/** @file - */ - -namespace apache { -namespace geode { -namespace client { - -/** - * Implement an immutable Vector of Cacheable objects - * that can serve as a distributable object for caching. - */ -class CPPCACHE_EXPORT CacheableObjectArray : public Cacheable, - public _VectorOfCacheable { - public: - typedef _VectorOfCacheable::Iterator Iterator; - - /** - *@brief serialize this object - **/ - virtual void toData(DataOutput& output) const; - - /** - *@brief deserialize this object - **/ - virtual Serializable* fromData(DataInput& input); - - /** - * @brief creation function for java Object[] - */ - inline static Serializable* createDeserializable() { - return new CacheableObjectArray(); - } - - /** - *@brief Return the classId of the instance being serialized. - * This is used by deserialization to determine what instance - * type to create and deserialize into. - */ - virtual int32_t classId() 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. - */ - virtual int8_t typeId() const; - - /** - * Factory method for creating the default instance of CacheableObjectArray. - */ - inline static CacheableObjectArrayPtr create() { - return CacheableObjectArrayPtr(new CacheableObjectArray()); - } - - /** - * Factory method for creating an instance of CacheableObjectArray with - * given size. - */ - inline static CacheableObjectArrayPtr create(int32_t n) { - return CacheableObjectArrayPtr(new CacheableObjectArray(n)); - } - - virtual uint32_t objectSize() const; - - protected: - /** Constructor, used for deserialization. */ - inline CacheableObjectArray() : _VectorOfCacheable() {} - /** Create a vector with n elements allocated. */ - inline CacheableObjectArray(int32_t n) : _VectorOfCacheable(n) {} - - private: - // never implemented. - CacheableObjectArray& operator=(const CacheableObjectArray& other); - CacheableObjectArray(const CacheableObjectArray& other); -}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CACHEABLEOBJECTARRAY_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CacheableString.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CacheableString.hpp b/src/cppcache/include/gfcpp/CacheableString.hpp deleted file mode 100644 index 1ddb112..0000000 --- a/src/cppcache/include/gfcpp/CacheableString.hpp +++ /dev/null @@ -1,310 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CACHEABLESTRING_H_ -#define GEODE_GFCPP_CACHEABLESTRING_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" -#include "CacheableKey.hpp" -#include "GeodeTypeIds.hpp" -#include "ExceptionTypes.hpp" - -/** @file - */ - -namespace apache { -namespace geode { -namespace client { - -#define GF_STRING (int8_t) GeodeTypeIds::CacheableASCIIString -#define GF_STRING_HUGE (int8_t) GeodeTypeIds::CacheableASCIIStringHuge -#define GF_WIDESTRING (int8_t) GeodeTypeIds::CacheableString -#define GF_WIDESTRING_HUGE (int8_t) GeodeTypeIds::CacheableStringHuge - -/** - * Implement a immutable C string wrapper that can serve as a distributable - * key object for caching as well as being a string value. - */ -class CPPCACHE_EXPORT CacheableString : public CacheableKey { - protected: - void* m_str; - int8_t m_type; - uint32_t m_len; - mutable int m_hashcode; - - public: - /** - *@brief serialize this object - **/ - virtual void toData(DataOutput& output) const; - - /** - *@brief deserialize this object - * Throw IllegalArgumentException if the packed CacheableString is not less - * than 64K bytes. - **/ - virtual Serializable* fromData(DataInput& input); - - /** creation function for strings */ - static Serializable* createDeserializable(); - - /** creation function for strings > 64K length */ - static Serializable* createDeserializableHuge(); - - /** creation function for wide strings */ - static Serializable* createUTFDeserializable(); - - /** creation function for wide strings > 64K length in UTF8 encoding */ - static Serializable* createUTFDeserializableHuge(); - - /** - *@brief Return the classId of the instance being serialized. - * This is used by deserialization to determine what instance - * type to create and deserialize into. - */ - virtual int32_t classId() const; - - /** - * Return the typeId byte of the instance being serialized. - * This is used by deserialization to determine what instance - * type to create and deserialize into. - * - * For a CacheableString this shall return - * GeodeTypeIds::CacheableNullString if the underlying - * string is null, GeodeTypeIds::CacheableASCIIString - * if the underlying string is a char*, and - * GeodeTypeIds::CacheableString if it is a wchar_t*. - * For strings larger than 64K it will return - * GeodeTypeIds::CacheableASCIIStringHuge and - * GeodeTypeIds::CacheableStringHuge for char* and wchar_t* - * respectively. - */ - virtual int8_t typeId() const; - - /** return true if this key matches other. */ - virtual bool operator==(const CacheableKey& other) const; - - /** return the hashcode for this key. */ - virtual uint32_t hashcode() const; - - /** - * Factory method for creating an instance of CacheableString from - * a null terminated C string optionally giving the length. - * - * This should be used only for ASCII strings. - */ - static CacheableStringPtr create(const char* value, int32_t len = 0) { - CacheableStringPtr str = NULLPTR; - if (value != NULL) { - str = new CacheableString(); - str->initString(value, len); - } - return str; - } - - /** - * Factory method for creating an instance of CacheableString from - * a C string of given length by taking ownership of the string without - * making a copy. The string should have been allocated using - * the standard C++ new operator. - * - * This should be used only for ASCII strings. - * - * CAUTION: use this only when you really know what you are doing. - */ - static CacheableStringPtr createNoCopy(char* value, int32_t len = 0) { - CacheableStringPtr str = NULLPTR; - if (value != NULL) { - str = new CacheableString(); - str->initStringNoCopy(value, len); - } - return str; - } - - /** - * Factory method for creating an instance of CacheableString from a - * wide-character null terminated C string optionally giving the length. - * - * This should be used for non-ASCII strings. - */ - static CacheableStringPtr create(const wchar_t* value, int32_t len = 0) { - CacheableStringPtr str = NULLPTR; - if (value != NULL) { - str = new CacheableString(); - str->initString(value, len); - } - return str; - } - - /** - * Factory method for creating an instance of CacheableString from a - * wide-character C string of given length by taking ownership of the - * string without making a copy. The string should have been allocated - * using the standard C++ new operator. - * - * This should be used for non-ASCII strings. - * - * CAUTION: use this only when you really know what you are doing. - */ - static CacheableStringPtr createNoCopy(wchar_t* value, int32_t len = 0) { - CacheableStringPtr str = NULLPTR; - if (value != NULL) { - str = new CacheableString(); - str->initStringNoCopy(value, len); - } - return str; - } - - /** Returns true if the underlying string is a normal C string. */ - inline bool isCString() const { - return (m_type == GF_STRING || m_type == GF_STRING_HUGE); - } - - /** Returns true if the underlying string is a wide-character string. */ - inline bool isWideString() const { - return (m_type == GF_WIDESTRING || m_type == GF_WIDESTRING_HUGE); - } - - /** - * Return the string that backs this CacheableString as a char *. This - * shall throw an exception if the underlying string is a wchar_t* -- - * the caller should use typeId to determine the actual type, - * or isWideString to find whether this is a wide-character - * string. - * - * @throws IllegalStateException if the underlying string is a wchar_t * - */ - const char* asChar() const { - if (isWideString()) { - throw IllegalStateException( - "CacheableString::asChar: the string is a " - "wide character string; use asWChar() to obtain it."); - } - return reinterpret_cast(m_str); - } - - /** - * Return the string that backs this CacheableString as a wchar_t *. This - * shall throw an exception if the underlying string is a char* -- - * the caller should use typeId to determine the actual type, - * or isWideString to find whether this is indeed a - * wide-character string. - * - * @throws IllegalStateException if the underlying string is a char * - */ - const wchar_t* asWChar() const { - if (isCString()) { - throw IllegalStateException( - "CacheableString::asWChar: the string is " - "not a wide character string; use asChar() to obtain it."); - } - return reinterpret_cast(m_str); - } - - /** Return the length of the contained string. */ - inline uint32_t length() const { return m_len; } - - /** - * Display this object as c string. In this case, it returns the same - * value as asChar() when underlying type is a char* and returns the same - * value as asWChar() cast to char* when the underlying type is a wchar_t*. - * To handle this correctly the user should find the actual type by calling - * typeId() or isWideString() and cast to the correct type accordingly. - * Note: this is a debugging API, not intended for getting the exact value - * of the CacheableString. In a future release this may return a more - * summary representation. This is historical. It is preferred that the - * user call logString or asChar/asWChar, depending on the need. - */ - const char* toString() { return reinterpret_cast(m_str); } - - virtual CacheableStringPtr toString() const { - return CacheableStringPtr(this); - } - - /** get the name of the class of this object for logging purpose */ - virtual const char* className() const { return "CacheableString"; } - - /** Destructor */ - virtual ~CacheableString(); - - /** used to render as a string for logging. */ - virtual int32_t logString(char* buffer, int32_t maxLength) const; - - virtual uint32_t objectSize() const; - - protected: - /** Private method to populate the CacheableString. */ - void copyString(const char* value, int32_t len); - /** Private method to populate the CacheableString. */ - void copyString(const wchar_t* value, int32_t len); - /** initialize the string, given a value and length. */ - void initString(const char* value, int32_t len); - /** - * Initialize the string without making a copy, given a C string - * and length. - */ - void initStringNoCopy(char* value, int32_t len); - /** initialize the string, given a wide-char string and length. */ - void initString(const wchar_t* value, int32_t len); - /** - * Initialize the string without making a copy, given a wide-char string - * and length. - */ - void initStringNoCopy(wchar_t* value, int32_t len); - /** Private method to get ASCII string for wide-string if possible. */ - char* getASCIIString(const wchar_t* value, int32_t& len, int32_t& encodedLen); - /** Default constructor. */ - inline CacheableString(int8_t type = GF_STRING) - : m_str(NULL), m_type(type), m_len(0), m_hashcode(0) {} - - private: - // never implemented. - void operator=(const CacheableString& other); - CacheableString(const CacheableString& other); -}; - -/** overload of apache::geode::client::createKeyArr to pass char* */ -inline CacheableKeyPtr createKeyArr(const char* value) { - return (value != NULL ? CacheableKeyPtr(CacheableString::create(value).ptr()) - : NULLPTR); -} - -/** overload of apache::geode::client::createKeyArr to pass wchar_t* */ -inline CacheableKeyPtr createKeyArr(const wchar_t* value) { - return (value != NULL ? CacheableKeyPtr(CacheableString::create(value).ptr()) - : NULLPTR); -} - -/** overload of apache::geode::client::createValueArr to pass char* */ -inline CacheablePtr createValueArr(const char* value) { - return (value != NULL ? CacheablePtr(CacheableString::create(value).ptr()) - : NULLPTR); -} - -/** overload of apache::geode::client::createValueArr to pass wchar_t* */ -inline CacheablePtr createValueArr(const wchar_t* value) { - return (value != NULL ? CacheablePtr(CacheableString::create(value).ptr()) - : NULLPTR); -} -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CACHEABLESTRING_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CacheableUndefined.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CacheableUndefined.hpp b/src/cppcache/include/gfcpp/CacheableUndefined.hpp deleted file mode 100644 index 0e063e9..0000000 --- a/src/cppcache/include/gfcpp/CacheableUndefined.hpp +++ /dev/null @@ -1,98 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CACHEABLEUNDEFINED_H_ -#define GEODE_GFCPP_CACHEABLEUNDEFINED_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" -#include "Cacheable.hpp" - -/** @file - */ - -namespace apache { -namespace geode { -namespace client { - -/** - * Encapsulate an undefined query result. - */ -class CPPCACHE_EXPORT CacheableUndefined : public Cacheable { - public: - /** - *@brief serialize this object - **/ - virtual void toData(DataOutput& output) const; - - /** - *@brief deserialize this object - **/ - virtual Serializable* fromData(DataInput& input); - - /** - * @brief creation function for undefined query result - */ - inline static Serializable* createDeserializable() { - return new CacheableUndefined(); - } - - /** - *@brief Return the classId of the instance being serialized. - * This is used by deserialization to determine what instance - * type to create and deserialize into. - */ - virtual int32_t classId() 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. - */ - virtual int8_t typeId() const; - - /** - * @brief Return the data serialization fixed ID size type for internal use. - * @since GFE 5.7 - */ - virtual int8_t DSFID() const; - - /** - * Factory method for creating the default instance of CacheableUndefined. - */ - inline static CacheableUndefinedPtr create() { - return CacheableUndefinedPtr(new CacheableUndefined()); - } - - virtual uint32_t objectSize() const; - - protected: - /** Constructor, used for deserialization. */ - inline CacheableUndefined() {} - - private: - // never implemented. - CacheableUndefined& operator=(const CacheableUndefined& other); - CacheableUndefined(const CacheableUndefined& other); -}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CACHEABLEUNDEFINED_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CqAttributes.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CqAttributes.hpp b/src/cppcache/include/gfcpp/CqAttributes.hpp deleted file mode 100644 index 2cda1eb..0000000 --- a/src/cppcache/include/gfcpp/CqAttributes.hpp +++ /dev/null @@ -1,64 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CQATTRIBUTES_H_ -#define GEODE_GFCPP_CQATTRIBUTES_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" -#include "VectorT.hpp" - -#include "CqListener.hpp" -/** - * @file - */ - -namespace apache { -namespace geode { -namespace client { - -/** - * @cacheserver - * Querying is only supported for native clients. - * @endcacheserver - * @class CqAttributes CqAttributes.hpp - * - * This interface holds all attribute values for a CQ and provides methods for - * retrieving all attribute settings. This interface can be modified only by - * the CqAttributesFactory class (before CQ creation) and the - * CqAttributesMutator - * interface (after CQ creation). - * - * For compatibility rules and default values, see {@link CqAttributesFactory}. - */ -class CPPCACHE_EXPORT CqAttributes : virtual public SharedBase { - public: - /** - * Get the CqListeners set with the CQ. - * Returns all the Listeners associated with this CQ. - * @see CqListener - * @return VectorOfCqListener of CqListnerPtr - */ - virtual void getCqListeners(VectorOfCqListener& vl) = 0; -}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CQATTRIBUTES_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CqAttributesFactory.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CqAttributesFactory.hpp b/src/cppcache/include/gfcpp/CqAttributesFactory.hpp deleted file mode 100644 index b5052fd..0000000 --- a/src/cppcache/include/gfcpp/CqAttributesFactory.hpp +++ /dev/null @@ -1,106 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CQATTRIBUTESFACTORY_H_ -#define GEODE_GFCPP_CQATTRIBUTESFACTORY_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" -#include "CqAttributes.hpp" -#include "CqListener.hpp" - -/** - * @file - */ - -namespace apache { -namespace geode { -namespace client { - -/** - * @class CqAttributesFactory CqAttributesFactory.hpp - * - * The factory class for the CqAttributes instance. This provides the CqListener - * setter methods. This class maintains state for and creates new instances of - * the - * CqAttributes interface for new CqQuery instances. - * If you create a factory with the default constructor, then the factory is set - * up to create attributes with all default settings. You can also create a - * factory - * by providing a CqAttributes, which will set up the new factory - * with - * the settings provided in that attributes instance. - * - *

Once a CqAttributes is created, it can only be modified - * after it has been used to create a CqQuery. - * - * @see CqAttributes - * - */ -class CPPCACHE_EXPORT CqAttributesFactory : public SharedBase { - public: - /** - * Creates a new instance of AttributesFactory ready to create a - * CqAttributes with default settings. - */ - CqAttributesFactory(); - - /** - * Creates a new instance of CqAttributesFactory ready to create a - * CqAttributes with the same settings as those in the - * specified CqAttributes. - * - * @param cqAttributes - * the CqAttributes used to initialize this - * AttributesFactory - */ - CqAttributesFactory(CqAttributesPtr& cqAttributes); - - /** - * Adds a CQ listener to the end of the list of cq listeners on this factory. - * @param cqListener the CqListener to add to the factory. - * @throws IllegalArgumentException if cqListener is NULLPTR - */ - void addCqListener(const CqListenerPtr& cqListener); - - /** - * Removes all Cq listeners and then adds each listener in the specified - * array. - * @param cqListeners a possibly empty array of listeners to add to this - * factory. - * @throws IllegalArgumentException if the cqListeners array has - * a - * NULLPTR element - */ - void initCqListeners(VectorOfCqListener& cqListeners); - - /** - * Creates a CqAttributes with the current settings. - * @return the newly created CqAttributes - */ - CqAttributesPtr create(); - - private: - CqAttributesPtr m_cqAttributes; -}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CQATTRIBUTESFACTORY_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CqAttributesMutator.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CqAttributesMutator.hpp b/src/cppcache/include/gfcpp/CqAttributesMutator.hpp deleted file mode 100644 index 13c2363..0000000 --- a/src/cppcache/include/gfcpp/CqAttributesMutator.hpp +++ /dev/null @@ -1,77 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CQATTRIBUTESMUTATOR_H_ -#define GEODE_GFCPP_CQATTRIBUTESMUTATOR_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" -#include "VectorT.hpp" - -/** - * @file - */ - -namespace apache { -namespace geode { -namespace client { - -/** - * @class CqAttributesMutator CqAttributesMutator.hpp - * - * This interface is used to modify the listeners that are associated with a CQ. - * Each CqQuery has an CqAttributesMutator interface which supports modification - * of certain CQ attributes after the CQ has been created. - * - */ -class CPPCACHE_EXPORT CqAttributesMutator : virtual public SharedBase { - public: - /** - * Adds a CQ listener to the end of the list of CQ listeners on this CqQuery. - * @param aListener the user defined CQ listener to add to the CqQuery. - * @throws IllegalArgumentException if aListener is NULLPTR - */ - virtual void addCqListener(const CqListenerPtr& aListener) = 0; - - /** - * Removes given CQ listener from the list of CQ listeners on this CqQuery. - * Does nothing if the specified listener has not been added. - * If the specified listener has been added then will - * be called on it; otherwise does nothing. - * @param aListener the CQ listener to remove from the CqQuery. - * @throws IllegalArgumentException if aListener is NULLPTR - */ - virtual void removeCqListener(const CqListenerPtr& aListener) = 0; - - /** - * Adds the given set CqListner on this CQ. If the CQ already has CqListeners, - * this - * removes those old CQs and initializes with the newListeners. - * @param newListeners a possibly empty array of listeners to add - * to this CqQuery. - * @throws IllegalArgumentException if the newListeners array - * has a NULLPTR element - */ - virtual void setCqListeners(VectorOfCqListener& newListeners) = 0; -}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CQATTRIBUTESMUTATOR_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CqEvent.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CqEvent.hpp b/src/cppcache/include/gfcpp/CqEvent.hpp deleted file mode 100644 index 6bbe386..0000000 --- a/src/cppcache/include/gfcpp/CqEvent.hpp +++ /dev/null @@ -1,111 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CQEVENT_H_ -#define GEODE_GFCPP_CQEVENT_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" -#include "Exception.hpp" -#include "CqOperation.hpp" -#include "Cacheable.hpp" -#include "CacheableKey.hpp" -#include "CacheableBuiltins.hpp" - -/** - * @file - */ - -namespace apache { -namespace geode { -namespace client { - -/** - * @class CqEvent CqEvent.hpp - * - * This interface provides methods to get all the information sent from the - * server - * about the CQ event. - * The CqEvent is passed to the CQs CqListener methods. It can be used to - * retrieve - * such information as the region operation, CQ operation associated with the - * event, - * the new key and value from the event, and the CqQuery object associated with - * the - * event. - * The CqEvent is not an extension of CacheEvent. - */ -class CPPCACHE_EXPORT CqEvent { - public: - CqEvent() {} - - virtual ~CqEvent() {} - /** - * Get the CqQuery object of this event. - * @see CqQuery - * @return CqQuery object. - */ - virtual CqQueryPtr getCq() const = 0; - - /** - * Get the operation on the base region that triggered this event. - * @return Operation operation on the base region (on which CQ is created). - */ - virtual CqOperation::CqOperationType getBaseOperation() const = 0; - - /** - * Get the operation on the query results. Supported operations - * include update, create, destroy, region clear and region invalidate. - * @return Operation operation with respect to CQ. - */ - virtual CqOperation::CqOperationType getQueryOperation() const = 0; - - /** - * Get the key relating to the event. - * In case of REGION_CLEAR and REGION_INVALIDATE operation, the key will be - * NULLPTR. - * @return Object key. - */ - virtual CacheableKeyPtr getKey() const = 0; - - /** - * Get the new value of the modification. - * If there is no new value returns NULLPTR, this will happen during delete - * operation. - * @return Object new/modified value. - */ - virtual CacheablePtr getNewValue() const = 0; - - /** - * Get the delta modification. - * If there is no delta, returns null. New value may still be available. - * - * @return CacheableBytes delta value. - */ - virtual CacheableBytesPtr getDeltaValue() const = 0; - - private: - CqEvent(const CqEvent&); - void operator=(const CqEvent&); -}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CQEVENT_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CqListener.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CqListener.hpp b/src/cppcache/include/gfcpp/CqListener.hpp deleted file mode 100644 index 2e5cdef..0000000 --- a/src/cppcache/include/gfcpp/CqListener.hpp +++ /dev/null @@ -1,99 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CQLISTENER_H_ -#define GEODE_GFCPP_CQLISTENER_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" -#include "CqEvent.hpp" - -/** - * @file - */ - -namespace apache { -namespace geode { -namespace client { - -/** - * @cacheserver - * Querying is only supported for native clients. - * @endcacheserver - * @class CqListener CqListener.hpp - * - * Application plug-in interface for handling continuous query events after - * they occur. The listener has two methods, one that is called when there - * is an event satisfied by the CQ and the other called when there is an - * error during CQ processing. - */ -class CPPCACHE_EXPORT CqListener : public SharedBase { - public: - /** - * This method is invoked when an event is occurred on the region - * that satisfied the query condition of this CQ. - * This event does not contain an error. - */ - virtual void onEvent(const CqEvent& aCqEvent); - - /** - * This method is invoked when there is an error during CQ processing. - * The error can appear while applying query condition on the event. - * e.g if the event doesn't has attributes as specified in the CQ query. - * This event does contain an error. The newValue may or may not be - * available, and will be NULLPTR if not available. - */ - virtual void onError(const CqEvent& aCqEvent); - - /** Called when the region containing this callback is closed or destroyed, - * when - * the cache is closed, or when a callback is removed from a region - * using an AttributesMutator. - * - *

Implementations should cleanup any external - * resources such as database connections. Any runtime exceptions this method - * throws will be logged. - * - *

It is possible for this method to be called multiple times on a single - * callback instance, so implementations must be tolerant of this. - * - * @see Cache#close() - * @see Region#close - * @see Region#localDestroyRegion() - * @see Region#destroyRegion() - * @see AttributesMutator - */ - virtual void close(); - - protected: - /** - * @brief constructors - */ - CqListener(); - - private: - // never implemented. - CqListener(const CacheListener& other); - void operator=(const CqListener& other); -}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CQLISTENER_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CqOperation.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CqOperation.hpp b/src/cppcache/include/gfcpp/CqOperation.hpp deleted file mode 100644 index b1976f2..0000000 --- a/src/cppcache/include/gfcpp/CqOperation.hpp +++ /dev/null @@ -1,55 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CQOPERATION_H_ -#define GEODE_GFCPP_CQOPERATION_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 "gfcpp_globals.hpp" - -/** - * @file - */ - -namespace apache { -namespace geode { -namespace client { -/** - * @class Operation CqOperation.hpp - * Enumerated type for Operation actions. - */ -class CPPCACHE_EXPORT CqOperation { - // public static methods - public: - // types of operation CORESPONDING TO THE ONES in geode.cache.Operation - - typedef enum { - OP_TYPE_INVALID = -1, - OP_TYPE_CREATE = 1, - OP_TYPE_UPDATE = 2, - OP_TYPE_INVALIDATE = 4, - OP_TYPE_REGION_CLEAR = 8, - OP_TYPE_DESTROY = 16, - OP_TYPE_MARKER = 32 - } CqOperationType; -}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CQOPERATION_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CqQuery.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CqQuery.hpp b/src/cppcache/include/gfcpp/CqQuery.hpp deleted file mode 100644 index 1290fe0..0000000 --- a/src/cppcache/include/gfcpp/CqQuery.hpp +++ /dev/null @@ -1,184 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CQQUERY_H_ -#define GEODE_GFCPP_CQQUERY_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" - -#include "CqResults.hpp" -#include "CqStatistics.hpp" -#include "CqAttributes.hpp" -#include "CqAttributesMutator.hpp" -#include "CqState.hpp" - -/** - * @file - */ - -namespace apache { -namespace geode { -namespace client { - -/** - * @class CqQuery CqQuery.hpp - * - * A Query is obtained from a QueryService which in turn is obtained from the - * Cache. - * This can be executed to return SelectResults which can be either - * a ResultSet or a StructSet, or it can be just registered on the java server - * without returning results immediately rather only the incremental results. - * - * This class is intentionally not thread-safe. So multiple threads should not - * operate on the same CqQuery object concurrently rather should - * have their own CqQuery objects. - */ -class CPPCACHE_EXPORT CqQuery : public SharedBase { - public: - /** - * Get the query string provided when a new Query was created from a - * QueryService. - * @returns The query string. - */ - virtual const char* getQueryString() const = 0; - /** - * Get teh query object generated for this CQs query. - * @return Query object fort he query string - */ - virtual QueryPtr getQuery() const = 0; - /** - * Get the name of the CQ. - * @return the name of the CQ. - */ - virtual const char* getName() const = 0; - /** - * Get the statistics information of this CQ. - * @return CqStatistics, the CqStatistics object. - */ - virtual const CqStatisticsPtr getStatistics() const = 0; - /** - * Get the Attributes of this CQ. - * @return CqAttributes, the CqAttributes object. - */ - virtual const CqAttributesPtr getCqAttributes() const = 0; - /** - * Get the AttributesMutator of this CQ. - * @return CqAttributesMutator, the CqAttributesMutator object. - */ - virtual const CqAttributesMutatorPtr getCqAttributesMutator() const = 0; - /** - * Start executing the CQ or if this CQ is stopped earlier, resumes execution - * of the CQ. - * Get the resultset associated with CQ query. - * The CQ is executed on primary and redundant servers, if CQ execution fails - * on all the - * server then a CqException is thrown. - * - * @param timeout The time (in seconds) to wait for query response, optional. - * This should be less than or equal to 2^31/1000 i.e. 2147483. - * - * @throws IllegalArgumentException if timeout parameter is greater than - * 2^31/1000. - * @throws CqClosedException if this CqQuery is closed. - * @throws RegionNotFoundException if the specified region in the - * query string is not found. - * @throws IllegalStateException if the CqQuery is in the RUNNING state - * already. - * @throws CqException if failed to execute and get initial results. - * @return CqResults resultset obtained by executing the query. - */ - virtual CqResultsPtr executeWithInitialResults( - uint32_t timeout = DEFAULT_QUERY_RESPONSE_TIMEOUT) = 0; - - /** - * @notsupported_cacheserver - * @nativeclient - * Executes the OQL Query on the cache server and returns the results. - * - * @throws RegionNotFoundException if the specified region in the - * query string is not found. - * @throws CqClosedException if this CqQuery is closed. - * @throws CqException if some query error occurred at the server. - * @throws IllegalStateException if some error occurred. - * @throws NotConnectedException if no java cache server is available. For - * pools - * configured with locators, if no locators are available, the cause of - * NotConnectedException - * is set to NoAvailableLocatorsException. - * @endnativeclient - */ - virtual void execute() = 0; - /** - * Stops this CqQuery without releasing resources. Puts the CqQuery into - * the STOPPED state. Can be resumed by calling execute or - * executeWithInitialResults. - * @throws IllegalStateException if the CqQuery is in the STOPPED state - * already. - * @throws CqClosedException if the CQ is CLOSED. - */ - virtual void stop() = 0; - - /** - * Get the state of the CQ in CqState object form. - * CqState supports methods like isClosed(), isRunning(), isStopped(). - * @see CqState - * @return CqState state object of the CQ. - */ - virtual CqState::StateType getState() = 0; - - /** - * Close the CQ and stop execution. - * Releases the resources associated with this CqQuery. - * @throws CqClosedException Further calls on this CqQuery instance except - * for getState() or getName(). - * @throws CqException - if failure during cleanup of CQ resources. - */ - virtual void close() = 0; - - /** - * This allows to check if the CQ is in running or active. - * @return boolean true if running, false otherwise - */ - virtual bool isRunning() = 0; - - /** - * This allows to check if the CQ is in stopped. - * @return boolean true if stopped, false otherwise - */ - virtual bool isStopped() = 0; - - /** - * This allows to check if the CQ is closed. - * @return boolean true if closed, false otherwise - */ - virtual bool isClosed() = 0; - - /** - * This allows to check if the CQ is durable. - * @return boolean true if durable, false otherwise - * @since 5.5 - */ - virtual bool isDurable() = 0; -}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CQQUERY_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CqResults.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CqResults.hpp b/src/cppcache/include/gfcpp/CqResults.hpp deleted file mode 100644 index ba4763d..0000000 --- a/src/cppcache/include/gfcpp/CqResults.hpp +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CQRESULTS_H_ -#define GEODE_GFCPP_CQRESULTS_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" -#include "ExceptionTypes.hpp" -#include "Serializable.hpp" -#include "CacheableBuiltins.hpp" -#include "SelectResults.hpp" -namespace apache { -namespace geode { -namespace client { - -/** - * @class CqResults CqResults.hpp - * - * A CqResults is obtained by executing a Query on the server. - * This will be a StructSet. - */ -class CPPCACHE_EXPORT CqResults : public SelectResults {}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CQRESULTS_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CqServiceStatistics.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CqServiceStatistics.hpp b/src/cppcache/include/gfcpp/CqServiceStatistics.hpp deleted file mode 100644 index 19446de..0000000 --- a/src/cppcache/include/gfcpp/CqServiceStatistics.hpp +++ /dev/null @@ -1,79 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CQSERVICESTATISTICS_H_ -#define GEODE_GFCPP_CQSERVICESTATISTICS_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" - -/** - * @file - */ - -namespace apache { -namespace geode { -namespace client { - -/** - * @class CqServiceStatistics CqServiceStatistics.hpp - * - * This class provides methods to get aggregate statistical information - * about the CQs of a client. - */ -class CPPCACHE_EXPORT CqServiceStatistics : public SharedBase { - public: - /** - * Get the number of CQs currently active. - * Active CQs are those which are executing (in running state). - * @return number of CQs - */ - virtual uint32_t numCqsActive() const = 0; - - /** - * Get the total number of CQs created. This is a cumulative number. - * @return number of CQs created. - */ - virtual uint32_t numCqsCreated() const = 0; - - /** - * Get the total number of closed CQs. This is a cumulative number. - * @return number of CQs closed. - */ - virtual uint32_t numCqsClosed() const = 0; - - /** - * Get the number of stopped CQs currently. - * @return number of CQs stopped. - */ - virtual uint32_t numCqsStopped() const = 0; - - /** - * Get number of CQs that are currently active or stopped. - * The CQs included in this number are either running or stopped (suspended). - * Closed CQs are not included. - * @return number of CQs on client. - */ - virtual uint32_t numCqsOnClient() const = 0; -}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CQSERVICESTATISTICS_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CqState.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CqState.hpp b/src/cppcache/include/gfcpp/CqState.hpp deleted file mode 100644 index ed79b83..0000000 --- a/src/cppcache/include/gfcpp/CqState.hpp +++ /dev/null @@ -1,84 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CQSTATE_H_ -#define GEODE_GFCPP_CQSTATE_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" - -/** - * @file - */ - -namespace apache { -namespace geode { -namespace client { - -/** - * @class CqState CqState.hpp - * - * This interface gives information on the state of a CqQuery. - * It is provided by the getState method of the CqQuery instance. - */ -class CPPCACHE_EXPORT CqState { - public: - // corresponding to geode.cache.query.internal.CqStateImpl - typedef enum { - STOPPED = 0, - RUNNING = 1, - CLOSED = 2, - CLOSING = 3, - INVALID - } StateType; - /** - * Returns the state in string form. - */ - const char* toString() const; - - /** - * Returns true if the CQ is in Running state. - */ - bool isRunning() const; - - /** - * Returns true if the CQ is in Stopped state. - */ - bool isStopped() const; - - /** - * Returns true if the CQ is in Closed state. - */ - bool isClosed() const; - - /** - * Returns true if the CQ is in Closing state. - */ - bool isClosing() const; - void setState(CqState::StateType state); - CqState::StateType getState(); - - private: - StateType m_state; -}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CQSTATE_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CqStatistics.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CqStatistics.hpp b/src/cppcache/include/gfcpp/CqStatistics.hpp deleted file mode 100644 index 55c2def..0000000 --- a/src/cppcache/include/gfcpp/CqStatistics.hpp +++ /dev/null @@ -1,75 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CQSTATISTICS_H_ -#define GEODE_GFCPP_CQSTATISTICS_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 "gfcpp_globals.hpp" -#include "gf_types.hpp" - -/** - * @file - */ - -namespace apache { -namespace geode { -namespace client { - -/** - * @cacheserver - * Querying is only supported for native clients. - * @endcacheserver - * @class CqStatistics CqStatistics.hpp - * - * This class provides methods to get statistical information about a registered - * Continuous Query (CQ) - * represented by the CqQuery object. - * - */ -class CPPCACHE_EXPORT CqStatistics : public SharedBase { - public: - /** - * Get number of Insert events qualified by this CQ. - * @return number of inserts. - */ - virtual uint32_t numInserts() const = 0; - - /** - * Get number of Delete events qualified by this CQ. - * @return number of deletes. - */ - virtual uint32_t numDeletes() const = 0; - - /** - * Get number of Update events qualified by this CQ. - * @return number of updates. - */ - virtual uint32_t numUpdates() const = 0; - - /** - * Get total of all the events qualified by this CQ. - * @return total number of events. - */ - virtual uint32_t numEvents() const = 0; -}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CQSTATISTICS_H_ http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/CqStatusListener.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/CqStatusListener.hpp b/src/cppcache/include/gfcpp/CqStatusListener.hpp deleted file mode 100644 index a93de84..0000000 --- a/src/cppcache/include/gfcpp/CqStatusListener.hpp +++ /dev/null @@ -1,53 +0,0 @@ -#pragma once - -#ifndef GEODE_GFCPP_CQSTATUSLISTENER_H_ -#define GEODE_GFCPP_CQSTATUSLISTENER_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 "CqListener.hpp" - -namespace apache { -namespace geode { -namespace client { - -/** -* Extension of CqListener. Adds two new methods to CqListener, one that -* is called when the cq is connected and one that is called when -* the cq is disconnected -* -* @since 7.0 -*/ - -class CPPCACHE_EXPORT CqStatusListener : public CqListener { - public: - /** - * Called when the cq loses connection with all servers - */ - virtual void onCqDisconnected(); - - /** - * Called when the cq establishes a connection with a server - */ - virtual void onCqConnected(); -}; -} // namespace client -} // namespace geode -} // namespace apache - -#endif // GEODE_GFCPP_CQSTATUSLISTENER_H_