http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/src/IRegionService.hpp ---------------------------------------------------------------------- diff --git a/clicache/src/IRegionService.hpp b/clicache/src/IRegionService.hpp new file mode 100644 index 0000000..51f4049 --- /dev/null +++ b/clicache/src/IRegionService.hpp @@ -0,0 +1,128 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "geode_defs.hpp" +//#include "geode_includes.hpp" +#include "QueryService.hpp" +#include "Region.hpp" + +using namespace System; +using namespace System::Collections::Generic; + + + +namespace Apache +{ + namespace Geode + { + namespace Client + { + + interface class IPdxInstanceFactory; + /// <summary> + /// A RegionService provides access to existing regions that exist + /// in a <see cref="Cache" />. + /// Regions can be obtained using <see cref="Cache.GetRegion" /> + /// and queried using <see cref="Cache.GetQueryService/>. + /// </summary> + /// <remarks> + /// Caches are obtained from methods on the + /// <see cref="CacheFactory.Create"/> class. + /// <para> + /// When a cache will no longer be used, call <see cref="Cache.Close" />. + /// Once it <see cref="Cache.IsClosed" /> any attempt to use it + /// will cause a <c>CacheClosedException</c> to be thrown. + /// </para><para> + /// A cache can have multiple root regions, each with a different name. + /// </para> + /// </remarks> + public interface class IRegionService + { + public: + + /// <summary> + /// True if this cache has been closed. + /// </summary> + /// <remarks> + /// After a new cache object is created, this method returns false. + /// After <see cref="Close" /> is called on this cache object, this method + /// returns true. + /// </remarks> + /// <returns>true if this cache is closed, otherwise false</returns> + property bool IsClosed + { + bool get( ); + } + + /// <summary> + /// Terminates this object cache and releases all the local resources. + /// If RegionService is created from <see cref="Cache.CreateAuthenticatedView" />, then it clears user related security data. + /// </summary> + /// <remarks> + /// After this cache is closed, any further + /// method call on this cache or any region object will throw + /// <c>CacheClosedException</c>, unless otherwise noted. + /// </remarks> + /// <exception cref="CacheClosedException"> + /// if the cache is already closed. + /// </exception> + void Close( ); + + /// <summary> + /// Returns an existing region given the full path from root, or null + /// if no such region exists. + /// </summary> + /// <param name="name">the name of the region</param> + /// <returns>the region</returns> + generic<class TKey, class TValue> + IRegion<TKey, TValue>^ GetRegion( String^ name ); + + /// <summary> + /// Get a query service object to be able to query the cache. + /// </summary> + /// <remarks> + /// Currently only works against the java server in native mode, and + /// at least some endpoints must have been defined in some regions + /// before actually firing a query. + /// </remarks> + generic<class TKey, class TResult> + Client::QueryService<TKey, TResult>^ GetQueryService(); + /// <summary> + /// Returns an array of root regions in the cache. This set is a + /// snapshot and is not backed by the cache. + /// </summary> + /// <remarks> + /// It is not supported when Cache is created from Pool. + /// </remarks> + /// <returns>array of regions</returns> + generic<class TKey, class TValue> + array<IRegion<TKey, TValue>^>^ RootRegions( ); + + /// <summary> + /// Returns a factory that can create a {@link PdxInstance}. + /// @param className the fully qualified class name that the PdxInstance will become + /// when it is fully deserialized. + /// @return the factory + /// </summary> + IPdxInstanceFactory^ CreatePdxInstanceFactory(String^ className); + }; + } // namespace Client + } // namespace Geode +} // namespace Apache +
http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/src/IResultCollector.hpp ---------------------------------------------------------------------- diff --git a/clicache/src/IResultCollector.hpp b/clicache/src/IResultCollector.hpp new file mode 100644 index 0000000..3d97f27 --- /dev/null +++ b/clicache/src/IResultCollector.hpp @@ -0,0 +1,80 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#pragma once + +#include "geode_defs.hpp" + +using namespace System; +namespace Apache +{ + namespace Geode + { + namespace Client + { + + interface class IGeodeSerializable; + /* + generic<class TKey> + ref class ResultCollector; + */ + + /// <summary> + /// collect function execution results, can be overriden + /// </summary> + generic<class TResult> + public interface class IResultCollector + { + public: + + /// <summary> + /// add result from a single function execution + /// </summary> + void AddResult(TResult rs); + + /// <summary> + /// get result + /// </summary> + System::Collections::Generic::ICollection<TResult>^ GetResult(); + + /// <summary> + /// get result + /// </summary> + System::Collections::Generic::ICollection<TResult>^ GetResult(UInt32 timeout); + + /// <summary> + ///Call back provided to caller, which is called after function execution is + ///complete and caller can retrieve results using getResult() + /// </summary> + //generic<class TKey> + void EndResults(); + + /// <summary> + ///Geode will invoke this method before re-executing function (in case of + /// Function Execution HA) This is to clear the previous execution results from + /// the result collector + /// @since 6.5 + /// </summary> + //generic<class TKey> + void ClearResults(/*bool*/); + + }; + } // namespace Client + } // namespace Geode +} // namespace Apache + http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/src/ISelectResults.hpp ---------------------------------------------------------------------- diff --git a/clicache/src/ISelectResults.hpp b/clicache/src/ISelectResults.hpp new file mode 100644 index 0000000..68feff8 --- /dev/null +++ b/clicache/src/ISelectResults.hpp @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "geode_defs.hpp" +#include "begin_native.hpp" +#include <geode/SelectResults.hpp> +#include "end_native.hpp" + + +#include "IGeodeSerializable.hpp" + +using namespace System; + +namespace Apache +{ + namespace Geode + { + namespace Client + { + + generic<class TResult> + ref class SelectResultsIterator; + + /// <summary> + /// Interface to encapsulate a select query result set. + /// </summary> + generic<class TResult> + public interface class ISelectResults + : public System::Collections::Generic::IEnumerable</*IGeodeSerializable^*/TResult> + { + public: + + /// <summary> + /// True if this <c>ISelectResults</c> is modifiable. + /// </summary> + property bool IsModifiable + { + bool get( ); + } + + /// <summary> + /// The size of the <c>ISelectResults</c>. + /// </summary> + property System::Int32 Size + { + System::Int32 get( ); + } + + /// <summary> + /// Get an object at the given index. + /// </summary> + property /*Apache::Geode::Client::IGeodeSerializable^*/TResult GFINDEXER( size_t ) + { + /*Apache::Geode::Client::IGeodeSerializable^*/TResult get( size_t index ); + } + + /// <summary> + /// Get an iterator for the result set. + /// </summary> + Apache::Geode::Client::SelectResultsIterator<TResult>^ GetIterator( ); + }; + } // namespace Client + } // namespace Geode +} // namespace Apache + http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/src/ISubscriptionService.hpp ---------------------------------------------------------------------- diff --git a/clicache/src/ISubscriptionService.hpp b/clicache/src/ISubscriptionService.hpp new file mode 100644 index 0000000..1c91efd --- /dev/null +++ b/clicache/src/ISubscriptionService.hpp @@ -0,0 +1,627 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "geode_defs.hpp" +#include "ExceptionTypes.hpp" + +using namespace System; +namespace Apache +{ + namespace Geode + { + namespace Client + { + + generic<class TKey> + /// <summary> + /// This generic interface class provides all Register Interest API's for + /// geode's generic non local region (Region<TKey, TValue>). + /// Region<TKey, TValue> class implements all methods of this interface class. + /// LocalRegion<TKey, TValue> class does not implement this interface class. + /// </summary> + public interface class ISubscriptionService + { + public: + + /// <summary> + /// Registers a collection of keys for getting updates from the server. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// </summary> + /// <param name="keys">a collection of keys</param> + /// <exception cref="IllegalArgumentException"> + /// If the collection of keys is empty. + /// </exception> + /// <exception cref="IllegalStateException"> + /// If already registered interest for all keys. + /// </exception> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// For pools configured with locators, if no locators are available, innerException + /// of NotConnectedException is set to NoAvailableLocatorsException. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void RegisterKeys(System::Collections::Generic::ICollection<TKey>^ keys); + + /// <summary> + /// Registers a collection of keys for getting updates from the server. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// Should only be called for durable clients and with cache server version 5.5 onwards. + /// </summary> + /// <param name="keys">a collection of keys</param> + /// <param name="isDurable">whether the registration should be durable</param> + /// <param name="getInitialValues"> + /// true to populate the cache with values of the keys + /// that were registered on the server + /// </param> + /// <exception cref="IllegalArgumentException"> + /// If the collection of keys is empty. + /// </exception> + /// <exception cref="IllegalStateException"> + /// If already registered interest for all keys. + /// </exception> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// For pools configured with locators, if no locators are available, innerException + /// of NotConnectedException is set to NoAvailableLocatorsException. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void RegisterKeys(System::Collections::Generic::ICollection<TKey>^ keys, bool isDurable, bool getInitialValues); + + /// <summary> + /// Registers a collection of keys for getting updates from the server. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// Should only be called for durable clients and with cache server version 5.5 onwards. + /// </summary> + /// <param name="keys">a collection of keys</param> + /// <param name="isDurable">whether the registration should be durable</param> + /// <param name="getInitialValues"> + /// true to populate the cache with values of the keys + /// that were registered on the server + /// </param> + /// <param name="receiveValues"> + /// whether to act like notify-by-subscription is true + /// </param> + /// <exception cref="IllegalArgumentException"> + /// If the collection of keys is empty. + /// </exception> + /// <exception cref="IllegalStateException"> + /// If already registered interest for all keys. + /// </exception> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void RegisterKeys(System::Collections::Generic::ICollection<TKey>^ keys, bool isDurable, bool getInitialValues, bool receiveValues); + + /// <summary> + /// Unregisters a collection of keys to stop getting updates for them. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// </summary> + /// <param name="keys">the collection of keys</param> + /// <exception cref="IllegalArgumentException"> + /// If the collection of keys is empty. + /// </exception> + /// <exception cref="IllegalStateException"> + /// If no keys were previously registered. + /// </exception> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// For pools configured with locators, if no locators are available, innerException + /// of NotConnectedException is set to NoAvailableLocatorsException. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void UnregisterKeys(System::Collections::Generic::ICollection<TKey>^ keys); + + /// <summary> + /// Register interest for all the keys of the region to get + /// updates from the server. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// </summary> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// For pools configured with locators, if no locators are available, innerException + /// of NotConnectedException is set to NoAvailableLocatorsException. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void RegisterAllKeys(); + + /// <summary> + /// Register interest for all the keys of the region to get + /// updates from the server. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// Should only be called for durable clients and with cache server version 5.5 onwards. + /// </summary> + /// <param name="isDurable">whether the registration should be durable</param> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// For pools configured with locators, if no locators are available, innerException + /// of NotConnectedException is set to NoAvailableLocatorsException. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void RegisterAllKeys(bool isDurable); + + /// <summary> + /// Register interest for all the keys of the region to get + /// updates from the server. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// Should only be called for durable clients and with cache server version 5.5 onwards. + /// </summary> + /// <param name="isDurable">whether the registration should be durable</param> + /// <param name="resultKeys"> + /// if non-null then all keys on the server are returned + /// </param> + /// <param name="getInitialValues"> + /// true to populate the cache with values of all the keys + /// from the server + /// </param> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// For pools configured with locators, if no locators are available, innerException + /// of NotConnectedException is set to NoAvailableLocatorsException. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void RegisterAllKeys(bool isDurable, + System::Collections::Generic::ICollection<TKey>^ resultKeys, + bool getInitialValues); + + /// <summary> + /// Register interest for all the keys of the region to get + /// updates from the server. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// Should only be called for durable clients and with cache server version 5.5 onwards. + /// </summary> + /// <param name="isDurable">whether the registration should be durable</param> + /// <param name="resultKeys"> + /// if non-null then all keys on the server are returned + /// </param> + /// <param name="getInitialValues"> + /// true to populate the cache with values of all the keys + /// from the server + /// </param> + /// <param name="receiveValues"> + /// whether to act like notify-by-subscription is true + /// </param> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void RegisterAllKeys(bool isDurable, + System::Collections::Generic::ICollection<TKey>^ resultKeys, + bool getInitialValues, + bool receiveValues); + + /// <summary> + /// get the interest list on this client + /// </summary> + System::Collections::Generic::ICollection<TKey>^ GetInterestList(); + + /// <summary> + /// get the list of interest regular expressions on this client + /// </summary> + System::Collections::Generic::ICollection<String^>^ GetInterestListRegex(); + + /// <summary> + /// Unregister interest for all the keys of the region to stop + /// getting updates for them. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// </summary> + /// <exception cref="IllegalStateException"> + /// If not previously registered all keys. + /// </exception> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// For pools configured with locators, if no locators are available, innerException + /// of NotConnectedException is set to NoAvailableLocatorsException. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void UnregisterAllKeys(); + + /// <summary> + /// Register interest for the keys of the region that match the + /// given regular expression to get updates from the server. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// </summary> + /// <exception cref="IllegalArgumentException"> + /// If the regular expression string is empty. + /// </exception> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// For pools configured with locators, if no locators are available, innerException + /// of NotConnectedException is set to NoAvailableLocatorsException. + /// </exception> + /// <exception cref="MessageException"> + /// If the message received from server could not be handled. This will + /// be the case when an unregistered typeId is received in the reply or + /// reply is not well formed. More information can be found in the log. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void RegisterRegex(String^ regex); + + /// <summary> + /// Register interest for the keys of the region that match the + /// given regular expression to get updates from the server. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// Should only be called for durable clients and with cache server version 5.5 onwards. + /// </summary> + /// <param name="regex">the regular expression to register</param> + /// <param name="isDurable">whether the registration should be durable</param> + /// <exception cref="IllegalArgumentException"> + /// If the regular expression string is empty. + /// </exception> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// For pools configured with locators, if no locators are available, innerException + /// of NotConnectedException is set to NoAvailableLocatorsException. + /// </exception> + /// <exception cref="MessageException"> + /// If the message received from server could not be handled. This will + /// be the case when an unregistered typeId is received in the reply or + /// reply is not well formed. More information can be found in the log. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void RegisterRegex(String^ regex, bool isDurable); + + /// <summary> + /// Register interest for the keys of the region that match the + /// given regular expression to get updates from the server. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// Should only be called for durable clients and with cache server version 5.5 onwards. + /// </summary> + /// <param name="regex">the regular expression to register</param> + /// <param name="isDurable">whether the registration should be durable</param> + /// <param name="resultKeys"> + /// if non-null then the keys that match the regular expression + /// on the server are returned + ///</param> + /// <exception cref="IllegalArgumentException"> + /// If the regular expression string is empty. + /// </exception> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// For pools configured with locators, if no locators are available, innerException + /// of NotConnectedException is set to NoAvailableLocatorsException. + /// </exception> + /// <exception cref="MessageException"> + /// If the message received from server could not be handled. This will + /// be the case when an unregistered typeId is received in the reply or + /// reply is not well formed. More information can be found in the log. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void RegisterRegex(String^ regex, bool isDurable, + System::Collections::Generic::ICollection<TKey>^ resultKeys); + + /// <summary> + /// Register interest for the keys of the region that match the + /// given regular expression to get updates from the server. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// Should only be called for durable clients and with cache server version 5.5 onwards. + /// </summary> + /// <param name="regex">the regular expression to register</param> + /// <param name="isDurable">whether the registration should be durable</param> + /// <param name="resultKeys"> + /// if non-null then the keys that match the regular expression + /// on the server are returned + ///</param> + /// <param name="getInitialValues"> + /// true to populate the cache with values of the keys + /// that were registered on the server + /// </param> + /// <exception cref="IllegalArgumentException"> + /// If the regular expression string is empty. + /// </exception> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// For pools configured with locators, if no locators are available, innerException + /// of NotConnectedException is set to NoAvailableLocatorsException. + /// </exception> + /// <exception cref="MessageException"> + /// If the message received from server could not be handled. This will + /// be the case when an unregistered typeId is received in the reply or + /// reply is not well formed. More information can be found in the log. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void RegisterRegex(String^ regex, bool isDurable, + System::Collections::Generic::ICollection<TKey>^ resultKeys, bool getInitialValues); + + /// <summary> + /// Register interest for the keys of the region that match the + /// given regular expression to get updates from the server. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// Should only be called for durable clients and with cache server version 5.5 onwards. + /// </summary> + /// <param name="regex">the regular expression to register</param> + /// <param name="isDurable">whether the registration should be durable</param> + /// <param name="resultKeys"> + /// if non-null then the keys that match the regular expression + /// on the server are returned + ///</param> + /// <param name="getInitialValues"> + /// true to populate the cache with values of the keys + /// that were registered on the server + /// </param> + /// <param name="receiveValues"> + /// whether to act like notify-by-subscription is true + /// </param> + /// <exception cref="IllegalArgumentException"> + /// If the regular expression string is empty. + /// </exception> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// </exception> + /// <exception cref="MessageException"> + /// If the message received from server could not be handled. This will + /// be the case when an unregistered typeId is received in the reply or + /// reply is not well formed. More information can be found in the log. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void RegisterRegex(String^ regex, bool isDurable, + System::Collections::Generic::ICollection<TKey>^ resultKeys, bool getInitialValues, bool receiveValues); + + /// <summary> + /// Unregister interest for the keys of the region that match the + /// given regular expression to stop getting updates for them. + /// The regular expression must have been registered previously using + /// a <c>RegisterRegex</c> call. + /// Valid only for a Native Client region when client notification + /// ( <see cref="AttributesFactory.SetClientNotificationEnabled" /> ) is true. + /// </summary> + /// <exception cref="IllegalArgumentException"> + /// If the regular expression string is empty. + /// </exception> + /// <exception cref="IllegalStateException"> + /// If this regular expression has not been registered by a previous + /// call to <c>RegisterRegex</c>. + /// </exception> + /// <exception cref="CacheServerException"> + /// If an exception is received from the Java cache server. + /// </exception> + /// <exception cref="NotConnectedException"> + /// if not connected to the Geode system because the client cannot + /// establish usable connections to any of the servers given to it. + /// For pools configured with locators, if no locators are available, innerException + /// of NotConnectedException is set to NoAvailableLocatorsException. + /// </exception> + /// <exception cref="RegionDestroyedException"> + /// If region destroy is pending. + /// </exception> + /// <exception cref="UnsupportedOperationException"> + /// If the region is not a Native Client region or + /// <see cref="AttributesFactory.SetClientNotificationEnabled" /> is false. + /// </exception> + /// <exception cref="TimeoutException"> + /// if the operation timed out + /// </exception> + /// <exception cref="UnknownException">For other exceptions.</exception> + void UnregisterRegex(String^ regex); + + }; + } // namespace Client + } // namespace Geode +} // namespace Apache + http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/src/ITransactionListener.hpp ---------------------------------------------------------------------- diff --git a/clicache/src/ITransactionListener.hpp b/clicache/src/ITransactionListener.hpp new file mode 100644 index 0000000..a4db8cf --- /dev/null +++ b/clicache/src/ITransactionListener.hpp @@ -0,0 +1,83 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifdef CSTX_COMMENTED +#pragma once + +#include "geode_defs.hpp" +#include "TransactionEvent.hpp" + + +namespace Apache +{ + namespace Geode + { + namespace Client + { + + /// <summary> + /// An application plug-in that can be installed for getting events for + /// cache transactions. + /// </summary> + /// <seealso cref="CacheTransactionManager.AddListener" /> + generic<class TKey, class TValue> + public interface class ITransactionListener + { + public: + + /// <summary> + /// Called after a successful commit of a transaction. + /// </summary> + /// <param name="te">the transaction event</param> + /// <seealso cref="CacheTransactionManager.Commit" /> + void AfterCommit(TransactionEvent<TKey, TValue>^ te); + + /// <summary> + /// Called after an unsuccessful commit operation. + /// </summary> + /// <param name="te">the transaction event</param> + /// <seealso cref="CacheTransactionManager.Commit" /> + void AfterFailedCommit(TransactionEvent<TKey, TValue>^ te); + + /// <summary> + /// Called after an explicit rollback of a transaction. + /// </summary> + /// <param name="te">the transaction event</param> + /// <seealso cref="CacheTransactionManager.Commit" /> + /// <seealso cref="CacheTransactionManager.Rollback" /> + void AfterRollback(TransactionEvent<TKey, TValue>^ te); + + /// <summary> + /// alled 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 <code>AttributesMutator</code>. + /// 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. + /// </summary> + /// <seealso cref="Cache.Close" /> + /// <seealso cref="Region.Close" /> + /// <seealso cref="Region.LocalDestroyRegion" /> + /// <seealso cref="Region.DestroyRegion" /> + void Close(); + }; + } // namespace Client + } // namespace Geode +} // namespace Apache + +#endif http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/src/ITransactionWriter.hpp ---------------------------------------------------------------------- diff --git a/clicache/src/ITransactionWriter.hpp b/clicache/src/ITransactionWriter.hpp new file mode 100644 index 0000000..3874d0d --- /dev/null +++ b/clicache/src/ITransactionWriter.hpp @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifdef CSTX_COMMENTED +#pragma once + +#include "geode_defs.hpp" +#include "TransactionEvent.hpp" + + +namespace Apache +{ + namespace Geode + { + namespace Client + { + + /// <summary> + /// A callback that is allowed to veto a transaction. Only one TransactionWriter can exist + /// per cache, and only one TransactionWriter will be fired in the + /// entire distributed system for each transaction. + /// This writer can be used to update a backend data source before the Geode + /// cache is updated during commit. If the backend update fails, the implementer + /// can throw a {<c>TransactionWriterException</c>} to veto the transaction. + /// </summary> + /// <seealso cref="CacheTransactionManager.SetWriter" /> + generic<class TKey, class TValue> + public interface class ITransactionWriter + { + public: + /// <summary> + /// Called before the transaction has finished committing, but after conflict checking. + /// Provides an opportunity for implementors to cause transaction abort by throwing a + /// TransactionWriterException + /// </summary> + /// <param name="te">the transaction event</param> + /// <exception cref="TransactionWriterException"> + /// in the event that the transaction should be rolled back + /// </exception> + /// <seealso cref="CacheTransactionManager.Commit" /> + void BeforeCommit(TransactionEvent<TKey, TValue>^ te); + + }; + } // namespace Client + } // namespace Geode +} // namespace Apache + +#endif http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/src/IWritablePdxInstance.hpp ---------------------------------------------------------------------- diff --git a/clicache/src/IWritablePdxInstance.hpp b/clicache/src/IWritablePdxInstance.hpp new file mode 100755 index 0000000..160ffb8 --- /dev/null +++ b/clicache/src/IWritablePdxInstance.hpp @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +using namespace System; +namespace Apache +{ + namespace Geode + { + namespace Client + { + + /// <summary> + /// WritablePdxInstance is a <see cref="IPdxInstance" /> that also supports field modification + /// using the <see cref="SetField" />method. + /// To get a WritablePdxInstance call <see cref="IPdxInstance.CreateWriter" />. + /// </summary> + public interface class IWritablePdxInstance + { + public: + /// <summary> + ///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. + /// </summary> + /// + ///<param name="fieldName"> name of the field whose value will be set </param> + ///<param name="value"> value that will be assigned to the field </param> + ///<exception cref="IllegalStateException"/> if the named field does not exist + ///or if the type of the value is not compatible with the field </exception> + + void SetField(String^ fieldName, Object^ value); + }; + } // namespace Client + } // namespace Geode +} // namespace Apache + http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/src/LocalRegion.cpp ---------------------------------------------------------------------- diff --git a/clicache/src/LocalRegion.cpp b/clicache/src/LocalRegion.cpp new file mode 100644 index 0000000..1313558 --- /dev/null +++ b/clicache/src/LocalRegion.cpp @@ -0,0 +1,1005 @@ +/* + * 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 "begin_native.hpp" +#include "geode/Region.hpp" +#include "geode/Cache.hpp" +#include "end_native.hpp" + +#include "LocalRegion.hpp" +#include "Cache.hpp" +#include "CacheStatistics.hpp" +#include "AttributesMutator.hpp" +#include "RegionEntry.hpp" +#include "impl/AuthenticatedCache.hpp" +#include "impl/SafeConvert.hpp" + +using namespace System; + +namespace Apache +{ + namespace Geode + { + namespace Client + { + + generic<class TKey, class TValue> + TValue LocalRegion<TKey, TValue>::Get(TKey key, Object^ callbackArg) + { + native::CacheableKeyPtr keyptr = Serializable::GetUnmanagedValueGeneric<TKey>( key, m_nativeptr->get()->getCache().get() ); + auto nativeptr= this->getRegionEntryValue(keyptr); + if (nativeptr == nullptr) + { + throw gcnew KeyNotFoundException("The given key was not present in the region"); + } + TValue returnVal = Serializable::GetManagedValueGeneric<TValue>( nativeptr ); + return returnVal; + } + + generic<class TKey, class TValue> + apache::geode::client::SerializablePtr LocalRegion<TKey, TValue>::getRegionEntryValue(apache::geode::client::CacheableKeyPtr& keyptr) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + try + { + if (auto entryPtr = m_nativeptr->get()->getEntry(keyptr)) { + return entryPtr->getValue(); + } + else { + return nullptr; + } + } + finally + { + GC::KeepAlive(m_nativeptr); + } + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::Put(TKey key, TValue value, Object^ callbackArg) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + native::CacheableKeyPtr keyptr = Serializable::GetUnmanagedValueGeneric<TKey>( key, m_nativeptr->get()->getCache().get() ); + native::CacheablePtr valueptr = Serializable::GetUnmanagedValueGeneric<TValue>( value, m_nativeptr->get()->getCache().get() ); + native::UserDataPtr callbackptr = Serializable::GetUnmanagedValueGeneric<Object^>( callbackArg, m_nativeptr->get()->getCache().get() ); + m_nativeptr->get()->localPut( keyptr, valueptr, callbackptr ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + TValue LocalRegion<TKey, TValue>::default::get(TKey key) + { + native::CacheableKeyPtr keyptr = Serializable::GetUnmanagedValueGeneric<TKey>( key, m_nativeptr->get()->getCache().get() ); + auto nativeptr = this->getRegionEntryValue(keyptr); + if (nativeptr == nullptr) + { + throw gcnew KeyNotFoundException("The given key was not present in the region"); + } + TValue returnVal = Serializable::GetManagedValueGeneric<TValue>( nativeptr ); + return returnVal; + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::default::set(TKey key, TValue value) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + native::CacheableKeyPtr keyptr = Serializable::GetUnmanagedValueGeneric<TKey>( key, m_nativeptr->get()->getCache().get() ); + native::CacheablePtr valueptr = Serializable::GetUnmanagedValueGeneric<TValue>( value, m_nativeptr->get()->getCache().get() ); + m_nativeptr->get()->localPut( keyptr, valueptr ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + System::Collections::Generic::IEnumerator<KeyValuePair<TKey,TValue>>^ + LocalRegion<TKey, TValue>::GetEnumerator() + { + apache::geode::client::VectorOfRegionEntry vc; + + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + m_nativeptr->get()->entries( vc, false ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + + auto toArray = gcnew array<KeyValuePair<TKey,TValue>>(static_cast<int>(vc.size())); + for( System::Int32 index = 0; index < vc.size( ); index++ ) + { + auto nativeptr = vc[ index ]; + TKey key = Serializable::GetManagedValueGeneric<TKey> (nativeptr->getKey()); + TValue val = Serializable::GetManagedValueGeneric<TValue> (nativeptr->getValue()); + toArray[ index ] = KeyValuePair<TKey,TValue>(key, val); + } + return ((System::Collections::Generic::IEnumerable<KeyValuePair<TKey,TValue>>^)toArray)->GetEnumerator(); + } + + generic<class TKey, class TValue> + System::Collections::IEnumerator^ + LocalRegion<TKey, TValue>::GetEnumeratorOld() + { + apache::geode::client::VectorOfRegionEntry vc; + + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + m_nativeptr->get()->entries( vc, false ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + + auto toArray = gcnew array<Object^>(static_cast<int>(vc.size())); + for( System::Int32 index = 0; index < vc.size( ); index++ ) + { + auto nativeptr = vc[ index ]; + TKey key = Serializable::GetManagedValueGeneric<TKey> (nativeptr->getKey()); + TValue val = Serializable::GetManagedValueGeneric<TValue> (nativeptr->getValue()); + toArray[ index ] = KeyValuePair<TKey,TValue>(key, val); + } + return ((System::Collections::Generic::IEnumerable<Object^>^)toArray)->GetEnumerator(); + } + + + generic<class TKey, class TValue> + bool LocalRegion<TKey, TValue>::AreValuesEqual(apache::geode::client::CacheablePtr& val1, apache::geode::client::CacheablePtr& val2) + { + if ( val1 == nullptr && val2 == nullptr ) + { + return true; + } + else if ((val1 == nullptr && val2 != nullptr) || (val1 != nullptr && val2 == nullptr)) + { + return false; + } + else if( val1 != nullptr && val2 != nullptr ) + { + if (val1->classId() != val2->classId() || val1->typeId() != val2->typeId()) + { + return false; + } + std::unique_ptr<apache::geode::client::DataOutput> out1 = m_nativeptr->get_shared_ptr()->getCache()->createDataOutput(); + std::unique_ptr<apache::geode::client::DataOutput> out2 = m_nativeptr->get_shared_ptr()->getCache()->createDataOutput(); + val1->toData(*out1); + val2->toData(*out2); + if ( out1->getBufferLength() != out2->getBufferLength() ) + { + return false; + } + else if (memcmp(out1->getBuffer(), out2->getBuffer(), out1->getBufferLength()) != 0) + { + return false; + } + return true; + } + return false; + } + + generic<class TKey, class TValue> + bool LocalRegion<TKey, TValue>::Contains(KeyValuePair<TKey,TValue> keyValuePair) + { + auto keyptr = Serializable::GetUnmanagedValueGeneric<TKey>( keyValuePair.Key, m_nativeptr->get()->getCache().get() ); + auto nativeptr = this->getRegionEntryValue(keyptr); + //This means that key is not present. + if (nativeptr == nullptr) { + return false; + } + TValue value = Serializable::GetManagedValueGeneric<TValue>(nativeptr); + return ((Object^)value)->Equals(keyValuePair.Value); + } + + generic<class TKey, class TValue> + bool LocalRegion<TKey, TValue>::ContainsKey(TKey key) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + auto keyptr = Serializable::GetUnmanagedValueGeneric<TKey>( key, m_nativeptr->get()->getCache().get() ); + return m_nativeptr->get()->containsKey(keyptr); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + bool LocalRegion<TKey, TValue>::TryGetValue(TKey key, TValue %val) + { + auto keyptr = Serializable::GetUnmanagedValueGeneric<TKey>( key, m_nativeptr->get()->getCache().get() ); + auto nativeptr = this->getRegionEntryValue(keyptr); + if (nativeptr == nullptr) { + val = TValue(); + return false; + } + else { + val = Serializable::GetManagedValueGeneric<TValue>( nativeptr ); + return true; + } + } + + generic<class TKey, class TValue> + System::Collections::Generic::ICollection<TKey>^ LocalRegion<TKey, TValue>::Keys::get() + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + apache::geode::client::VectorOfCacheableKey vc; + try + { + m_nativeptr->get()->keys(vc); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + auto keyarr = gcnew array<TKey>( static_cast<int>(vc.size( )) ); + for( System::Int32 index = 0; index < vc.size( ); index++ ) + { + auto& nativeptr = vc[ index ]; + keyarr[ index ] = Serializable::GetManagedValueGeneric<TKey>(nativeptr); + } + auto collectionlist = (System::Collections::Generic::ICollection<TKey>^)keyarr; + return collectionlist; + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + System::Collections::Generic::ICollection<TValue>^ LocalRegion<TKey, TValue>::Values::get() + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + apache::geode::client::VectorOfCacheable vc; + try + { + m_nativeptr->get()->values( vc ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + //List<TValue>^ collectionlist = gcnew List<TValue>(vc.size()); + auto valarr = gcnew array<TValue>( static_cast<int>(vc.size( )) ); + for( System::Int32 index = 0; index < vc.size( ); index++ ) + { + auto& nativeptr = vc[ index ]; + valarr[ index ] = Serializable::GetManagedValueGeneric<TValue>(nativeptr); + } + auto collectionlist = (System::Collections::Generic::ICollection<TValue>^)valarr; + return collectionlist; + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::Add(TKey key, TValue value) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + native::CacheableKeyPtr keyptr = Serializable::GetUnmanagedValueGeneric<TKey>( key, m_nativeptr->get()->getCache().get() ); + native::CacheablePtr valueptr = Serializable::GetUnmanagedValueGeneric<TValue>( value, m_nativeptr->get()->getCache().get() ); + m_nativeptr->get()->localCreate( keyptr, valueptr ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::Add(KeyValuePair<TKey, TValue> keyValuePair) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + native::CacheableKeyPtr keyptr = Serializable::GetUnmanagedValueGeneric<TKey>( keyValuePair.Key, m_nativeptr->get()->getCache().get() ); + native::CacheablePtr valueptr = Serializable::GetUnmanagedValueGeneric<TValue>( keyValuePair.Value, m_nativeptr->get()->getCache().get() ); + m_nativeptr->get()->localCreate( keyptr, valueptr ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::Add(TKey key, TValue value, Object^ callbackArg) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + native::CacheableKeyPtr keyptr = Serializable::GetUnmanagedValueGeneric<TKey>( key, m_nativeptr->get()->getCache().get() ); + native::CacheablePtr valueptr = Serializable::GetUnmanagedValueGeneric<TValue>( value, m_nativeptr->get()->getCache().get() ); + native::UserDataPtr callbackptr = Serializable::GetUnmanagedValueGeneric<Object^>( callbackArg, m_nativeptr->get()->getCache().get() ); + m_nativeptr->get()->localCreate( keyptr, valueptr, callbackptr ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + bool LocalRegion<TKey, TValue>::Remove(TKey key) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + native::CacheableKeyPtr keyptr = Serializable::GetUnmanagedValueGeneric<TKey>(key, m_nativeptr->get()->getCache().get()); + m_nativeptr->get()->localDestroy(keyptr); + return true; + } + catch (apache::geode::client::EntryNotFoundException /*ex*/) + { + return false; + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + + } + + generic<class TKey, class TValue> + bool LocalRegion<TKey, TValue>::Remove( TKey key, Object^ callbackArg ) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + try + { + native::CacheableKeyPtr keyptr = Serializable::GetUnmanagedValueGeneric<TKey>(key, m_nativeptr->get()->getCache().get()); + native::UserDataPtr callbackptr = Serializable::GetUnmanagedValueGeneric<Object^>(callbackArg, m_nativeptr->get()->getCache().get()); + m_nativeptr->get()->localDestroy(keyptr, callbackptr); + return true; + } + catch (apache::geode::client::EntryNotFoundException /*ex*/) + { + return false; + } + finally + { + GC::KeepAlive(m_nativeptr); + } + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + bool LocalRegion<TKey, TValue>::Remove(KeyValuePair<TKey,TValue> keyValuePair) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + native::CacheableKeyPtr keyptr = Serializable::GetUnmanagedValueGeneric<TKey>( keyValuePair.Key, m_nativeptr->get()->getCache().get() ); + native::CacheablePtr valueptr = Serializable::GetUnmanagedValueGeneric<TValue>( keyValuePair.Value, m_nativeptr->get()->getCache().get() ); + return m_nativeptr->get()->localRemove(keyptr, valueptr); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + bool LocalRegion<TKey, TValue>::Remove(TKey key, TValue value, Object^ callbackArg) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + native::CacheableKeyPtr keyptr = Serializable::GetUnmanagedValueGeneric<TKey>(key, m_nativeptr->get()->getCache().get()); + native::CacheablePtr valueptr = Serializable::GetUnmanagedValueGeneric<TValue>(value, m_nativeptr->get()->getCache().get()); + native::UserDataPtr callbackptr = Serializable::GetUnmanagedValueGeneric<Object^>(callbackArg, m_nativeptr->get()->getCache().get()); + return m_nativeptr->get()->localRemove(keyptr, valueptr, callbackptr); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::InvalidateRegion() + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + InvalidateRegion( nullptr ); + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::InvalidateRegion(Object^ callbackArg) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + native::UserDataPtr callbackptr = Serializable::GetUnmanagedValueGeneric<Object^>( callbackArg, m_nativeptr->get()->getCache().get() ); + m_nativeptr->get()->localInvalidateRegion( callbackptr ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::DestroyRegion() + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + DestroyRegion( nullptr ); + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::DestroyRegion(Object^ callbackArg) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + try + { + native::UserDataPtr callbackptr = Serializable::GetUnmanagedValueGeneric<Object^>( callbackArg, m_nativeptr->get()->getCache().get() ); + m_nativeptr->get()->localDestroyRegion( callbackptr ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::Invalidate(TKey key) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + Invalidate(key, nullptr); + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::Invalidate(TKey key, Object^ callbackArg) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + native::CacheableKeyPtr keyptr = Serializable::GetUnmanagedValueGeneric<TKey>( key, m_nativeptr->get()->getCache().get() ); + native::UserDataPtr callbackptr = Serializable::GetUnmanagedValueGeneric<Object^>( callbackArg, m_nativeptr->get()->getCache().get() ); + m_nativeptr->get()->localInvalidate( keyptr, callbackptr ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::PutAll(System::Collections::Generic::IDictionary<TKey, TValue>^ map) + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::PutAll(System::Collections::Generic::IDictionary<TKey, TValue>^ map, int timeout) + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::PutAll(System::Collections::Generic::IDictionary<TKey, TValue>^ map, int timeout, Object^ callbackArg) + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::GetAll(System::Collections::Generic::ICollection<TKey>^ keys, + System::Collections::Generic::IDictionary<TKey, TValue>^ values, + System::Collections::Generic::IDictionary<TKey, System::Exception^>^ exceptions) + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::GetAll(System::Collections::Generic::ICollection<TKey>^ keys, + System::Collections::Generic::IDictionary<TKey, TValue>^ values, + System::Collections::Generic::IDictionary<TKey, System::Exception^>^ exceptions, + bool addToLocalCache) + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::GetAll(System::Collections::Generic::ICollection<TKey>^ keys, + System::Collections::Generic::IDictionary<TKey, TValue>^ values, + System::Collections::Generic::IDictionary<TKey, System::Exception^>^ exceptions, + bool addToLocalCache, Object^ callbackArg) + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::RemoveAll(System::Collections::Generic::ICollection<TKey>^ keys) + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::RemoveAll(System::Collections::Generic::ICollection<TKey>^ keys, + Object^ callbackArg) + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + String^ LocalRegion<TKey, TValue>::Name::get() + { + try + { + return ManagedString::Get( m_nativeptr->get()->getName( ) ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + } + + generic<class TKey, class TValue> + String^ LocalRegion<TKey, TValue>::FullPath::get() + { + try + { + return ManagedString::Get( m_nativeptr->get()->getFullPath( ) ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + } + + generic<class TKey, class TValue> + IRegion<TKey, TValue>^ LocalRegion<TKey, TValue>::ParentRegion::get() + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + auto parentRegion = m_nativeptr->get()->getParentRegion( ); + auto region = Region<TKey, TValue>::Create( parentRegion ); + if (region == nullptr) { + return nullptr; + } + return region->GetLocalView(); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + Apache::Geode::Client::RegionAttributes<TKey, TValue>^ LocalRegion<TKey, TValue>::Attributes::get() + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + return Apache::Geode::Client::RegionAttributes<TKey, TValue>::Create(m_nativeptr->get()->getAttributes()); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + AttributesMutator<TKey, TValue>^ LocalRegion<TKey, TValue>::AttributesMutator::get() + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + return Apache::Geode::Client::AttributesMutator<TKey, TValue>::Create(m_nativeptr->get()->getAttributesMutator()); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + Apache::Geode::Client::CacheStatistics^ LocalRegion<TKey, TValue>::Statistics::get() + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + return Apache::Geode::Client::CacheStatistics::Create(m_nativeptr->get()->getStatistics()); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + IRegion<TKey, TValue>^ LocalRegion<TKey, TValue>::GetSubRegion( String^ path ) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + ManagedString mg_path(path); + auto nativeptr = m_nativeptr->get()->getSubregion(mg_path.CharPtr); + auto region = Region<TKey, TValue>::Create(nativeptr); + if (region == nullptr) { + return nullptr; + } + return region->GetLocalView(); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + IRegion<TKey, TValue>^ LocalRegion<TKey, TValue>::CreateSubRegion( String^ subRegionName, + Apache::Geode::Client::RegionAttributes<TKey, TValue>^ attributes) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + ManagedString mg_subregionName(subRegionName); + return Region<TKey, TValue>::Create(m_nativeptr->get()->createSubregion( + mg_subregionName.CharPtr, __nullptr))->GetLocalView(); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + + } + + generic<class TKey, class TValue> + System::Collections::Generic::ICollection<IRegion<TKey, TValue>^>^ LocalRegion<TKey, TValue>::SubRegions( bool recursive ) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + apache::geode::client::VectorOfRegion vsr; + try + { + m_nativeptr->get()->subregions( recursive, vsr ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + array<IRegion<TKey, TValue>^>^ subRegions = + gcnew array<IRegion<TKey, TValue>^>( static_cast<int>(vsr.size( )) ); + + for( System::Int32 index = 0; index < vsr.size( ); index++ ) + { + auto nativeptr = vsr[ index ]; + subRegions[ index ] = Region<TKey, TValue>::Create( nativeptr )->GetLocalView(); + } + auto collection = (System::Collections::Generic::ICollection<IRegion<TKey, TValue>^>^)subRegions; + return collection; + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + RegionEntry<TKey, TValue>^ LocalRegion<TKey, TValue>::GetEntry( TKey key ) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + native::CacheableKeyPtr keyptr = Serializable::GetUnmanagedValueGeneric<TKey>(key, m_nativeptr->get()->getCache().get()); + auto nativeptr = m_nativeptr->get()->getEntry(keyptr); + return RegionEntry<TKey, TValue>::Create(nativeptr); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + System::Collections::Generic::ICollection<RegionEntry<TKey, TValue>^>^ LocalRegion<TKey, TValue>::GetEntries(bool recursive) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + apache::geode::client::VectorOfRegionEntry vc; + try + { + m_nativeptr->get()->entries( vc, recursive ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + auto entryarr = gcnew array<RegionEntry<TKey, TValue>^>( static_cast<int>(vc.size( )) ); + + for( System::Int32 index = 0; index < vc.size( ); index++ ) + { + auto nativeptr = vc[ index ] ; + entryarr[ index ] = RegionEntry<TKey, TValue>::Create( nativeptr ); + } + auto collection = (System::Collections::Generic::ICollection<RegionEntry<TKey, TValue>^>^)entryarr; + return collection; + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + + } + + generic<class TKey, class TValue> + IRegionService^ LocalRegion<TKey, TValue>::RegionService::get() + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + auto regionService = m_nativeptr->get()->getRegionService(); + if (auto realCache = std::dynamic_pointer_cast<apache::geode::client::Cache>(regionService)) + { + return Apache::Geode::Client::Cache::Create(realCache); + } + else + { + return Apache::Geode::Client::AuthenticatedCache::Create(regionService); + } + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + bool LocalRegion<TKey, TValue>::ContainsValueForKey( TKey key ) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + try + { + return m_nativeptr->get()->containsValueForKey(Serializable::GetUnmanagedValueGeneric<TKey>(key, m_nativeptr->get()->getCache().get())); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + int LocalRegion<TKey, TValue>::Count::get() + { + try + { + return m_nativeptr->get()->size(); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::Clear() + { + Clear(nullptr); + } + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::Clear(Object^ callbackArg) + { + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + try + { + m_nativeptr->get()->localClear(Serializable::GetUnmanagedValueGeneric<Object^>( callbackArg, m_nativeptr->get()->getCache().get() ) ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + + generic<class TKey, class TValue> + void LocalRegion<TKey, TValue>::CopyTo(array<KeyValuePair<TKey,TValue>>^ toArray, + int startIdx) + { + if (toArray == nullptr) + { + throw gcnew System::ArgumentNullException; + } + if (startIdx < 0) + { + throw gcnew System::ArgumentOutOfRangeException; + } + + _GF_MG_EXCEPTION_TRY2/* due to auto replace */ + + apache::geode::client::VectorOfRegionEntry vc; + try + { + m_nativeptr->get()->entries( vc, false ); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + + if (toArray->Rank > 1 || (vc.size() > (toArray->Length - startIdx))) + { + throw gcnew System::ArgumentException; + } + + for( System::Int32 index = 0; index < vc.size( ); index++ ) + { + apache::geode::client::RegionEntryPtr nativeptr = vc[ index ]; + TKey key = Serializable::GetManagedValueGeneric<TKey> (nativeptr->getKey()); + TValue val = Serializable::GetManagedValueGeneric<TValue> (nativeptr->getValue()); + toArray[ startIdx ] = KeyValuePair<TKey,TValue>(key, val); + ++startIdx; + } + + _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } + + generic<class TKey, class TValue> + bool LocalRegion<TKey, TValue>::IsDestroyed::get() + { + try + { + return m_nativeptr->get()->isDestroyed(); + } + finally + { + GC::KeepAlive(m_nativeptr); + } + } + + generic<class TKey, class TValue> + generic<class TResult> + ISelectResults<TResult>^ LocalRegion<TKey, TValue>::Query( String^ predicate ) + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + generic<class TResult> + ISelectResults<TResult>^ LocalRegion<TKey, TValue>::Query( String^ predicate, System::UInt32 timeout ) + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + bool LocalRegion<TKey, TValue>::ExistsValue( String^ predicate ) + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + bool LocalRegion<TKey, TValue>::ExistsValue( String^ predicate, System::UInt32 timeout ) + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + Object^ LocalRegion<TKey, TValue>::SelectValue( String^ predicate ) + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + Object^ LocalRegion<TKey, TValue>::SelectValue( String^ predicate, System::UInt32 timeout ) + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + ISubscriptionService<TKey>^ LocalRegion<TKey, TValue>::GetSubscriptionService() + { + throw gcnew System::NotSupportedException; + } + + generic<class TKey, class TValue> + IRegion<TKey, TValue>^ LocalRegion<TKey, TValue>::GetLocalView() + { + throw gcnew System::NotSupportedException; + } + } // namespace Client + } // namespace Geode +} // namespace Apache