http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/TestCacheCallback.cpp ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/TestCacheCallback.cpp b/examples/dist/cacheRunner/TestCacheCallback.cpp deleted file mode 100644 index 6de3dfb..0000000 --- a/examples/dist/cacheRunner/TestCacheCallback.cpp +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file TestCacheCallback.cpp - * @since 1.0 - * @version 1.0 - * @see -*/ -#include <gfcpp/CacheableBuiltins.hpp> -#include <gfcpp/GeodeTypeIds.hpp> -#include "TestCacheCallback.hpp" -#include "ExampleObject.hpp" -#include "User.hpp" - -// ---------------------------------------------------------------------------- - -TestCacheCallback::TestCacheCallback(void) -: m_bInvoked(false) -{ -} - -// ---------------------------------------------------------------------------- - -TestCacheCallback::~TestCacheCallback(void) -{ -} - -// ---------------------------------------------------------------------------- -/** - * CacheCallback virtual method - */ -// ---------------------------------------------------------------------------- - -void TestCacheCallback::close( const RegionPtr& region ) -{ - m_bInvoked = true; -} - -// ---------------------------------------------------------------------------- -/** - * Returns whether or not one of this <code>CacheListener</code> - * methods was invoked. Before returning, the <code>invoked</code> - * flag is cleared. - */ -// ---------------------------------------------------------------------------- - -bool TestCacheCallback::wasInvoked( ) -{ - bool bInvoked = m_bInvoked; - m_bInvoked = false; - return bInvoked; -} - -// ---------------------------------------------------------------------------- -/** - * This method will do nothing. Note that it will not throw an - * exception. - */ -// ---------------------------------------------------------------------------- -/* -int TestCacheCallback::close2( const RegionPtr& ) -{ - return ErrorCodes::Success; -} -*/ -// ---------------------------------------------------------------------------- -/** - * Returns a description of the given <code>CacheEvent</code>. - */ -// ---------------------------------------------------------------------------- -std::string TestCacheCallback::printEntryValue(CacheablePtr& valueBytes) -{ - std::string sValue = "null"; - CacheableStringPtr cStrPtr; - CacheableInt32Ptr cIntPtr; - CacheableBytesPtr cBytePtr; - ExampleObjectPtr cobjPtr; - UserPtr cUserPtr; - - if (valueBytes != NULLPTR) { - int32_t id = valueBytes->typeId(); - if (id == GeodeTypeIds::CacheableBytes) { - cBytePtr = staticCast<CacheableBytesPtr>(valueBytes); - const uint8_t* bytType = cBytePtr->value(); - const uint32_t len = cBytePtr->length(); - char buff[1024]; - sprintf(buff,"%s",(char*)bytType); - buff[len] = '\0'; - std::string byteType(buff); - sValue = byteType; - } - else if (id == GeodeTypeIds::CacheableInt32) { - cIntPtr= staticCast<CacheableInt32Ptr>(valueBytes); - int32_t intval = cIntPtr->value(); - int len = sizeof(intval); - char buff[1024]; - sprintf(buff,"%d",intval); - buff[len] = '\0'; - std::string intType(buff); - sValue = intType; - } - else if (instanceOf<CacheableStringPtr>(valueBytes)) { - cStrPtr = staticCast<CacheableStringPtr>(valueBytes); - sValue = cStrPtr->toString(); - } - else if (instanceOf<ExampleObjectPtr>(valueBytes)) { - cobjPtr= staticCast<ExampleObjectPtr>(valueBytes); - sValue = cobjPtr->toString()->asChar(); -#if 0 - int ownId = cobjPtr->getOwner(); - int len = sizeof(ownId); - char buff1[1024]; - sprintf(buff1,"%d",ownId); - buff1[len] = '\0'; - std::string ownIdStr(buff1); - sValue = ownIdStr; -#endif - } - else if (instanceOf<UserPtr>(valueBytes)) { - cUserPtr = staticCast<UserPtr>(valueBytes); - sValue = cUserPtr->toString()->asChar(); - } - else { - sValue = "Unknown object type"; - } - } - else { - sValue = "No value in cache."; - } - return sValue; -} - -std::string TestCacheCallback::printEvent( const EntryEvent& event ) -{ - std::string sReturnValue; - - sReturnValue = "\nPrint Event: "; - - sReturnValue += getBoolValues(event.remoteOrigin()); - - sReturnValue += "\nRegion is : "; - RegionPtr rptr = event.getRegion(); - sReturnValue += (rptr == NULLPTR) ? "NULL" : rptr->getFullPath(); - - CacheableStringPtr key = dynCast<CacheableStringPtr>( event.getKey() ); - sReturnValue += "\nKey is : "; - if (key == NULLPTR) { - sReturnValue += "NULL"; - } - else { - sReturnValue += key->asChar(); - } - - sReturnValue += "\nOld value is : "; - CacheablePtr oldStringValue = event.getOldValue(); - // std::string testvalue = printEntryValue(oldStringValue); - if (oldStringValue == NULLPTR) { - sReturnValue += "NULL"; - } - else{ - sReturnValue += printEntryValue(oldStringValue); - } - - sReturnValue += "\nNew value is : "; - if (event.getNewValue() == NULLPTR) { - sReturnValue += "NULL"; - } - else { - CacheablePtr newStringValue = event.getNewValue(); - sReturnValue += printEntryValue(newStringValue); - } - - return sReturnValue; -} - -// ---------------------------------------------------------------------------- -/** - * Returns a description of the given <code>CacheEvent</code>. - */ -// ---------------------------------------------------------------------------- - -std::string TestCacheCallback::printEvent( const RegionEvent& event ) -{ - std::string sReturnValue; - - sReturnValue = "\nPrint Event: "; - - sReturnValue += getBoolValues( event.remoteOrigin() ); - - sReturnValue += "\nRegion is : "; - RegionPtr region = event.getRegion(); - sReturnValue += (region == NULLPTR) ? "NULL" : region->getFullPath(); - - return sReturnValue; -} - -// ---------------------------------------------------------------------------- -/** - * Returns a description of the given load event. - */ -// ---------------------------------------------------------------------------- - -std::string TestCacheCallback::printEvent(const RegionPtr& rp, - const CacheableKeyPtr& key, const UserDataPtr& aCallbackArgument) -{ - std::string sReturnValue; - CacheableStringPtr cStrPtr; - char szLogString[50]; - - sReturnValue += "\nRegion is : "; - sReturnValue += (rp == NULLPTR) ? "NULL" : rp->getFullPath(); - - sReturnValue += "\nKey is : "; - if (key == NULLPTR) { - sReturnValue += "NULL"; - } - else if (instanceOf<CacheableStringPtr> (key)) { - cStrPtr = staticCast<CacheableStringPtr> (key); - sReturnValue += cStrPtr->toString(); - } - else { - key->logString(szLogString, sizeof(szLogString)); - sReturnValue += szLogString; - } - - return sReturnValue; -} - -// ---------------------------------------------------------------------------- -/** - * return string of boolValues - */ -// ---------------------------------------------------------------------------- - -std::string TestCacheCallback::getBoolValues( bool isRemote ) -{ - std::string sReturnValue; - - if ( isRemote ) { - sReturnValue += "\nCache Event Origin Remote"; - } else { - sReturnValue += "\nCache Event Origin Local"; - } - - return sReturnValue; -} - -// ----------------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/TestCacheCallback.hpp ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/TestCacheCallback.hpp b/examples/dist/cacheRunner/TestCacheCallback.hpp deleted file mode 100644 index ec2e765..0000000 --- a/examples/dist/cacheRunner/TestCacheCallback.hpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file TestCacheCallback.hpp - * @since 1.0 - * @version 1.0 - * @see -*/ - -#ifndef __TEST_CACHE_CALLBACK_HPP__ -#define __TEST_CACHE_CALLBACK_HPP__ - -#include <gfcpp/GemfireCppCache.hpp> -#include <gfcpp/EntryEvent.hpp> - #include <gfcpp/RegionEvent.hpp> - -#include <string> - -using namespace apache::geode::client; - -/** - * An abstract superclass of implementation of GemFire cache callbacks - * that are used for testing. - * - * @see #wasInvoked - * - * - * - * @since 3.0 - */ - -/** - * @class TestCacheCallback - * - * @brief An abstract superclass of implementation of GemFire cache callbacks - * that are used for testing. - */ -class TestCacheCallback -{ -public: - TestCacheCallback(void); - virtual ~TestCacheCallback(void); - -public: // CacheCallback virtuals - virtual void close( const RegionPtr& region ); - -public: - /** - * Returns whether or not one of this <code>CacheListener</code> - * methods was invoked. Before returning, the <code>invoked</code> - * flag is cleared. - */ - bool wasInvoked( ); - - /** - * This method will do nothing. Note that it will not throw an - * exception. - */ - //virtual int close2( const RegionPtr& region ); - - /** - * Returns a description of the given <code>CacheEvent</code>. - */ - std::string printEvent( const EntryEvent& event ); - - /** - * Returns a description of the given <code>CacheEvent</code>. - */ - std::string printEvent( const RegionEvent& event ); - - /** - * Returns a description of the given load request. - */ - std::string printEvent( - const RegionPtr& rp, - const CacheableKeyPtr& key, - const UserDataPtr& aCallbackArgument); - std::string printEntryValue(CacheablePtr& value); - std::string getBoolValues( bool isRemote ); - -private: - /** Was this callback invoked? */ - bool m_bInvoked; -}; - -// ---------------------------------------------------------------------------- - -#endif // __TEST_CACHE_CALLBACK_HPP__ - -// ---------------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/TestCacheListener.cpp ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/TestCacheListener.cpp b/examples/dist/cacheRunner/TestCacheListener.cpp deleted file mode 100644 index 6ca265a..0000000 --- a/examples/dist/cacheRunner/TestCacheListener.cpp +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file TestCacheListener.cpp - * @since 1.0 - * @version 1.0 - * @see -*/ - -#include "TestCacheListener.hpp" - -// ---------------------------------------------------------------------------- - -TestCacheListener::TestCacheListener(void) -: m_bInvoked(false) -{ -} - -// ---------------------------------------------------------------------------- - -TestCacheListener::~TestCacheListener(void) -{ -} - -// ---------------------------------------------------------------------------- - -inline void TestCacheListener::afterCreate( - const EntryEvent& event) -{ - m_bInvoked = true; - - afterCreate2(event); -} - -// ---------------------------------------------------------------------------- - -inline void TestCacheListener::afterCreate2(const EntryEvent& event) -{ - printf( "TestCacheListener.afterCreate : %s\n", printEvent(event).c_str()); - -} -// ---------------------------------------------------------------------------- - - -inline void TestCacheListener::afterUpdate( - const EntryEvent& event) -{ - m_bInvoked = true; - afterUpdate2(event); -} - -// ---------------------------------------------------------------------------- - -inline void TestCacheListener::afterUpdate2( - const EntryEvent& event) -{ - printf( "TestCacheListener.afterUpdate : %s\n", - printEvent(event).c_str()); - -} - - -// ---------------------------------------------------------------------------- - - -inline void TestCacheListener::afterInvalidate( - const EntryEvent& event) -{ - m_bInvoked = true; - afterInvalidate2(event); -} - -// ---------------------------------------------------------------------------- - -inline void TestCacheListener::afterInvalidate2( - const EntryEvent& event) -{ - printf( "TestCacheListener.afterInvalidate : %s\n", - printEvent(event).c_str()); - -} - -// ---------------------------------------------------------------------------- - - -inline void TestCacheListener::afterDestroy( - const EntryEvent& event) -{ - m_bInvoked = true; - - afterDestroy2(event); -} - -// ---------------------------------------------------------------------------- - -inline void TestCacheListener::afterDestroy2( - const EntryEvent& event) -{ - printf( "TestCacheListener.afterDestroy : %s\n", - printEvent(event).c_str()); - -} - - -// ---------------------------------------------------------------------------- - - -inline void TestCacheListener::afterRegionInvalidate( - const RegionEvent& event) -{ - m_bInvoked = true; - - afterRegionInvalidate2(event); -} - -// ---------------------------------------------------------------------------- - -inline void TestCacheListener::afterRegionInvalidate2( - const RegionEvent& event) -{ - printf( "TestCacheListener.afterRegionInvalidate : %s\n", - printEvent(event).c_str()); - -} - - -// ---------------------------------------------------------------------------- - - -inline void TestCacheListener::afterRegionDestroy( - const RegionEvent& event) -{ - m_bInvoked = true; - - afterRegionDestroy2(event); -} - -// ---------------------------------------------------------------------------- - -inline void TestCacheListener::afterRegionDestroy2( -const RegionEvent& event) -{ - printf( "TestCacheListener.afterRegionDestroy : %s\n", - printEvent(event).c_str()); - -} - - -// ---------------------------------------------------------------------------- - -inline void TestCacheListener::close(const RegionPtr& region) -{ - m_bInvoked = true; - printf( "TestCacheListener.close\n"); -} - -// ---------------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/TestCacheListener.hpp ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/TestCacheListener.hpp b/examples/dist/cacheRunner/TestCacheListener.hpp deleted file mode 100644 index 5eea00b..0000000 --- a/examples/dist/cacheRunner/TestCacheListener.hpp +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file TestCacheListener.hpp - * @since 1.0 - * @version 1.0 - * @see -*/ - -#ifndef __TEST_CACHE_LISTENER_HPP__ -#define __TEST_CACHE_LISTENER_HPP__ - -#include <gfcpp/GemfireCppCache.hpp> -#include <gfcpp/CacheListener.hpp> - -#include "TestCacheCallback.hpp" - -using namespace apache::geode::client; - -/** - * A <code>CacheListener</code> used in testing. Its callback methods - * are implemented to thrown {link UnsupportedOperationException} - * unless the user overrides the "2" methods. - * - * @see #wasInvoked - * - * - * - * @since 3.0 - */ - -/** - * @class TestCacheListener - * - * @brief An example CacheListener plug-in - */ -class TestCacheListener : virtual public TestCacheCallback, virtual public CacheListener -{ -public: - TestCacheListener(void); - ~TestCacheListener(void); - - /** Handles the event of a new key being added to a region. The entry - * did not previously exist in this region in the local cache (even with a null value). - * - * @param boolValues indicate the origin of Event - * @param rptr indicate region the event is for - * @param callbackArg user data - * @param key the key to the target object of the event - * @param newValue the new value of the target object of the event - * @param oldValue the old value of the target object of the event - * This function does not throw any exception. - * @see Region::create - * @see Region::put - * @see Region::get - */ - virtual void afterCreate( const EntryEvent& event ); - - virtual void afterCreate2( const EntryEvent& event ); - - /** Handles the event of an entry's value being modified in a region. This entry - * previously existed in this region in the local cache, but its previous value - * may have been null. - * - * @param boolValues indicate the origin of Event - * @param rptr indicate the region the event is for - * @param callbackArg user data - * @param key the key to the target object of the event - * @param newValue the new value of the target object of the event - * @param oldValue the old value of the target object of the event - * This function does not throw any exception. - * @see Region::put - */ - virtual void afterUpdate( const EntryEvent& event ); - - virtual void afterUpdate2( const EntryEvent& event ); - - /** - * Handles the event of an entry's value being invalidated. - * - * @param boolValues indicate the origin of Event - * @param rptr indicate the region the event is for - * @param callbackArg user data - * @param key the key to the target object of the event - * @param newValue the new value of the target object of the event - * @param oldValue the old value of the target object of the event - * This function does not throw an exception. - * @see Region::invalidate - */ - virtual void afterInvalidate( const EntryEvent& event ); - - virtual void afterInvalidate2( const EntryEvent& event ); - - /** - * Handles the event of an entry being destroyed. - * - * @param boolValues indicate the origin of Event - * @param rptr indicate the region the event is for - * @param callbackArg user data - * @param key the key to the target object of the event - * @param newValue the new value of the target object of the event - * @param oldValue the old value of the target object of the event - * This function does not throw an exception. - * @see Region::destroy - */ - virtual void afterDestroy( const EntryEvent& event ); - - virtual void afterDestroy2( const EntryEvent& event ); - - /** Handles the event of a region being invalidated. Events are not - * invoked for each individual value that is invalidated as a result of - * the region being invalidated. Each subregion, however, gets its own - * <code>regionInvalidated</code> event invoked on its listener. - * @param boolValues indicate the origin of Event - * @param rptr indicate the region the event is for - * @param callbackArg user data - * This function does not throw any exception - * @see Region::invalidateRegion - */ - virtual void afterRegionInvalidate( const RegionEvent& event ); - - virtual void afterRegionInvalidate2( const RegionEvent& event ); - - /** Handles the event of a region being destroyed. Events are not invoked for - * each individual entry that is destroyed as a result of the region being - * destroyed. Each subregion, however, gets its own <code>afterRegionDestroyed</code> event - * invoked on its listener. - * @param boolValues indicate the origin of Event - * @param rptr indicate the region the event is for - * @param callbackArg user data - * This function does not throw any exception. - * @see Region::destroyRegion - */ - virtual void afterRegionDestroy( const RegionEvent& event ); - - virtual void afterRegionDestroy2( const RegionEvent& event ); - - virtual void close(const RegionPtr& region); - - /** - * Returns wether or not one of this <code>CacheListener</code> - * methods was invoked. Before returning, the <code>invoked</code> - * flag is cleared. - */ - bool wasInvoked( ) - { - bool bInvoked = m_bInvoked; - m_bInvoked = false; - return bInvoked; - } - - private: - bool m_bInvoked; -}; - -// ---------------------------------------------------------------------------- - -#endif // __TEST_CACHE_LISTENER_HPP__ http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/TestCacheLoader.cpp ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/TestCacheLoader.cpp b/examples/dist/cacheRunner/TestCacheLoader.cpp deleted file mode 100644 index a6e87ac..0000000 --- a/examples/dist/cacheRunner/TestCacheLoader.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file TestCacheLoader.cpp - * @since 1.0 - * @version 1.0 - * @see -*/ - -#include "TestCacheLoader.hpp" - -// ---------------------------------------------------------------------------- -TestCacheLoader::TestCacheLoader() - :m_bInvoked(false) -{ -} - -/* -TestCacheLoader::TestCacheLoader( const CacheLoader& rhs) -: CacheLoader(rhs), m_bInvoked(false) -{ -} -*/ -// ---------------------------------------------------------------------------- - -TestCacheLoader::~TestCacheLoader(void) -{ -} - -// ---------------------------------------------------------------------------- - -CacheablePtr TestCacheLoader::load( - const RegionPtr& region, - const CacheableKeyPtr& key, - const UserDataPtr& aCallbackArgument) -{ - m_bInvoked = true; - printf( "CacheLoader.load : %s\n", printEvent(region, key, - aCallbackArgument).c_str()); - CacheablePtr value = NULLPTR; - try { - value = region->get(key, aCallbackArgument); - } catch(Exception& ex) { - fprintf(stderr, "Exception in TestCacheCallback::printEvent [%s]\n", ex.getMessage()); - } - if (value != NULLPTR) { - printf( "Loader found value: "); - std::string formatValue = printEntryValue(value); - printf( "%s\n",formatValue.c_str()); - } else { - printf( " Loader did not find a value"); - } - - return value; -} - -// ---------------------------------------------------------------------------- - -void TestCacheLoader::close( const RegionPtr& region ) -{ - m_bInvoked = true; -} - -// ---------------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/TestCacheLoader.hpp ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/TestCacheLoader.hpp b/examples/dist/cacheRunner/TestCacheLoader.hpp deleted file mode 100644 index 6dc2827..0000000 --- a/examples/dist/cacheRunner/TestCacheLoader.hpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file TestCacheLoader.hpp - * @since 1.0 - * @version 1.0 - * @see -*/ - -#ifndef __TEST_CACHE_LOADER_HPP__ -#define __TEST_CACHE_LOADER_HPP__ - -#include <gfcpp/GemfireCppCache.hpp> -#include <gfcpp/CacheLoader.hpp> - -#include "TestCacheCallback.hpp" - -using namespace apache::geode::client; - -/** - * A <code>CacheLoader</code> used in testing. Users should override - * the "2" method. - * - * @see #wasInvoked - * @see TestCacheWriter - * - * - * - * @since 3.0 - */ - -/** - * @class TestCacheLoader - * - * @brief An example CacheLoader plug-in - */ -class TestCacheLoader : virtual public TestCacheCallback, virtual public CacheLoader -{ -public: - TestCacheLoader(); - //TestCacheLoader( const CacheLoader& rhs); - - ~TestCacheLoader( ); - - /**Loads a value. Application writers should implement this - * method to customize the loading of a value. This method is called - * by the caching service when the requested value is not in the cache. - * Any exception (including an unchecked exception) thrown by this - * method is propagated back to and thrown by the invocation of - * {link Region::get} that triggered this load. - * - * @param rp a Region Pointer for which this is called. - * @param key the key for the cacheable - * @param cptr the value to be loaded - * @param aCallbackArgument a LoaderHelper object that is passed in from cache service - * and provides access to the key, region, argument, and <code>netSearch</code>. - * @return the value supplied for this key, or null if no value can be - * supplied. If this load is invoked as part of a {link LoaderHelper::netSearch}, - * returning null will cause GemFire to invoke the next loader it finds - * in the system (if there is one). If every available loader returns - * a null value, {link Region::get} will return null. - * - *This function does not throw any exception. - *@see Region::get . - */ - virtual CacheablePtr load( - const RegionPtr& region, - const CacheableKeyPtr& key, - const UserDataPtr& aCallbackArgument); - - virtual void close( const RegionPtr& region ); - - /** - * Returns wether or not one of this <code>CacheLoader</code> - * methods was invoked. Before returning, the <code>invoked</code> - * flag is cleared. - */ - bool wasInvoked( ) - { - bool bInvoked = m_bInvoked; - m_bInvoked = false; - return bInvoked; - } - - private: - bool m_bInvoked; - -}; - -// ---------------------------------------------------------------------------- - -#endif // __TEST_CACHE_LOADER_HPP__ http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/TestCacheWriter.cpp ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/TestCacheWriter.cpp b/examples/dist/cacheRunner/TestCacheWriter.cpp deleted file mode 100644 index 628908a..0000000 --- a/examples/dist/cacheRunner/TestCacheWriter.cpp +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file TestCacheWriter.cpp - * @since 1.0 - * @version 1.0 - * @see -*/ - -#include "TestCacheWriter.hpp" - -// ---------------------------------------------------------------------------- - -TestCacheWriter::TestCacheWriter(void) -: m_bInvoked(false) -{ -} - -// ---------------------------------------------------------------------------- - -TestCacheWriter::~TestCacheWriter(void) -{ -} - -// ---------------------------------------------------------------------------- -/** - * Called before an entry is updated. The entry update is initiated by a <code>put</code> - * or a <code>get</code> that causes the loader to update an existing entry. - * The entry previously existed in the cache where the operation was - * initiated, although the old value may have been null. The entry being - * updated may or may not exist in the local cache where the CacheWriter is - * installed. - * - * @param boolValues indicate the origin of Event - * @param rptr indicate the region the event is for - * @param callbackArg user data - * @param key the key to the target object of the event - * @param newValue the new value of the target object of the event - * @param oldValue the old value of the target object of the event - * - * This function does not throw any exception. - * - * @see Region::put - * @see Region::get - */ -// ---------------------------------------------------------------------------- - -bool TestCacheWriter::beforeUpdate( const EntryEvent& event ) -{ - m_bInvoked = true; - - beforeUpdate2( event ); - return m_bInvoked; -} - -// ---------------------------------------------------------------------------- - -void TestCacheWriter::beforeUpdate2( const EntryEvent& event ) -{ - printf( "TestCacheWriter.beforeUpdate : %s\n", - printEvent( event ).c_str() ); -} - - -// ---------------------------------------------------------------------------- -/** Called before an entry is created. Entry creation is initiated by a - * <code>create</code>, a <code>put</code>, or a <code>get</code>. - * The <code>CacheWriter</code> can determine whether this value comes from a - * <code>get</code> or not from {@link EntryEvent::isLoad}. The entry being - * created may already exist in the local cache where this <code>CacheWriter</code> - * is installed, but it does not yet exist in the cache where the operation was initiated. - * @param boolValues indicate the origin of Event - * @param rptr indicate the region the event is for - * @param callbackArg user data - * @param key the key to the target object of the event - * @param newValue the new value of the target object of the event - * @param oldValue the old value of the target object of the event - * - * This function does not throw any exception. - * - * @see Region::create - * @see Region::put - * @see Region::get - */ -// ---------------------------------------------------------------------------- - -bool TestCacheWriter::beforeCreate( const EntryEvent& event ) -{ - m_bInvoked = true; - - beforeCreate2( event ); - return m_bInvoked; -} - -// ---------------------------------------------------------------------------- - -//inline ErrorCodes::Codes TestCacheWriter::beforeCreate2( const EntryEvent& event ) -inline void TestCacheWriter::beforeCreate2( const EntryEvent& event ) -{ - printf( "TestCacheWriter.beforeCreate : %s\n", - printEvent( event ).c_str() ); - -} - -// ---------------------------------------------------------------------------- -/*@brief called before this region is invalidated - * @param boolValues indicate the origin of Event - * @param rptr indicate the region the event is for - * @param callbackArg user data - * @param key the key to the target object of the event - * @param newValue the new value of the target object of the event - * @param oldValue the old value of the target object of the event - * - * This function does not throw any exception. - * @see Region::invalidate - */ -// ---------------------------------------------------------------------------- - -void TestCacheWriter::beforeInvalidate( const EntryEvent& event ) -{ - m_bInvoked = true; - - beforeInvalidate2( event ); -} - -// ---------------------------------------------------------------------------- - -//inline ErrorCodes::Codes TestCacheWriter::beforeInvalidate2( const EntryEvent& event ) -inline void TestCacheWriter::beforeInvalidate2( const EntryEvent& event ) -{ - printf( "TestCacheWriter.beforeInvalidate : %s\n", - printEvent( event ).c_str() ); -} - -// ---------------------------------------------------------------------------- -/** - * Called before an entry is destroyed. The entry being destroyed may or may - * not exist in the local cache where the CacheWriter is installed. This method - * is <em>not</em> called as a result of expiration or {@link Region::localDestroyRegion}. - * - * @param boolValues indicate the origin of Event - * @param rptr indicate the region the event is for - * @param callbackArg user data - * @param key the key to the target object of the event - * @param newValue the new value of the target object of the event - * @param oldValue the old value of the target object of the event - * This function does not throw any exception. - * - * @see Region::destroy - */ -// ---------------------------------------------------------------------------- - -bool TestCacheWriter::beforeDestroy( const EntryEvent& event ) -{ - m_bInvoked = true; - - beforeDestroy2( event ); - return m_bInvoked; -} - -// ---------------------------------------------------------------------------- - -void TestCacheWriter::beforeDestroy2( const EntryEvent& event ) -{ - printf( "TestCacheWriter.beforeDestroy : %s\n", - printEvent( event ).c_str() ); -} - -// ---------------------------------------------------------------------------- - - -/** - * Called before a region is destroyed. The <code>CacheWriter</code> - * will not additionally be called for each entry that is destroyed - * in the region as a result of a region destroy. If the region's - * subregions have <code>CacheWriter</code>s installed, then they - * will be called for the cascading subregion destroys. - * This method is <em>not</em> called as a result of - * expiration or {@link Region::localDestroyRegion}. However, the - * <code>close</code> method is invoked regardless of whether a - * region is destroyed locally. A non-local region destroy results - * in an invocation of beforeRegionDestroy followed by an - * invocation of {@link CacheCallback::close}. - *<p> - * WARNING: This method should not destroy or create any regions itself, or a - * deadlock will occur. - * - * @param boolValues indicate the origin of Event - * @param rptr indicate region the event is for - * @param callbackArg user data - * - * This function does not throw any exception. - * @see Region::invalidateRegion - */ -// ---------------------------------------------------------------------------- - -void TestCacheWriter::beforeRegionInvalidate( const RegionEvent& event ) -{ - m_bInvoked = true; - - beforeRegionInvalidate2( event ); -} - -// ---------------------------------------------------------------------------- - -void TestCacheWriter::beforeRegionInvalidate2( const RegionEvent& event ) -{ - printf( "TestCacheWriter.beforeRegionInvalidate : %s\n", - printEvent( event ).c_str() ); -} - -// ---------------------------------------------------------------------------- -/*@brief called before this region is destroyed - * @param boolValues indicate the origin of Event - * @param rptr indicate region the event is for - * @param callbackArg user data - * - * This function does not throw any exception. - * @see Region::destroyRegion - */ -// ---------------------------------------------------------------------------- - -bool TestCacheWriter::beforeRegionDestroy( const RegionEvent& event ) -{ - m_bInvoked = true; - - beforeRegionDestroy2( event ); - return m_bInvoked; -} - -// ---------------------------------------------------------------------------- - -void TestCacheWriter::beforeRegionDestroy2( const RegionEvent& event ) -{ - printf( "TestCacheWriter.beforeRegionDestroy : %s\n", - printEvent( event ).c_str() ); -} - -// ---------------------------------------------------------------------------- - -void TestCacheWriter::close( const RegionPtr& region ) -{ - m_bInvoked = true; - printf( "TestCacheWriter.close\n"); -} - http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/TestCacheWriter.hpp ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/TestCacheWriter.hpp b/examples/dist/cacheRunner/TestCacheWriter.hpp deleted file mode 100644 index f730ff5..0000000 --- a/examples/dist/cacheRunner/TestCacheWriter.hpp +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file TestCacheWriter.hpp - * @since 1.0 - * @version 1.0 - * @see -*/ - -#ifndef __TEST_CACHE_WRITER_HPP__ -#define __TEST_CACHE_WRITER_HPP__ - -#include <gfcpp/GemfireCppCache.hpp> -#include <gfcpp/CacheWriter.hpp> - -#include "TestCacheCallback.hpp" - -using namespace apache::geode::client; - -/** - * A <code>CacheWriter</code> used in testing. Its callback methods - * are implemented to thrown {link UnsupportedOperationException} - * unless the user overrides the "2" methods. - * - * @see #wasInvoked - * - * - * - * @since 3.0 - */ - -/** - * @class TestCacheWriter - * - * @brief An example CacheWriter plug-in - */ -class TestCacheWriter : virtual public TestCacheCallback, virtual public CacheWriter -{ -public: - TestCacheWriter(void); - ~TestCacheWriter(void); - - /** - * Called before an entry is updated. The entry update is initiated by a <code>put</code> - * or a <code>get</code> that causes the loader to update an existing entry. - * The entry previously existed in the cache where the operation was - * initiated, although the old value may have been null. The entry being - * updated may or may not exist in the local cache where the CacheWriter is - * installed. - * - * @param eventCode indicate the type of Event - * @param boolValues indicate the origin of Event - * @param rptr indicate the region the event is for - * @param callbackArg user data - * @param key the key to the target object of the event - * @param newValue the new value of the target object of the event - * @param oldValue the old value of the target object of the event - * - * This function does not throw any exception. - * - * @see Region::put - * @see Region::get - */ - virtual bool beforeUpdate( const EntryEvent& event ); - - virtual void beforeUpdate2( const EntryEvent& event ); - - /** Called before an entry is created. Entry creation is initiated by a - * <code>create</code>, a <code>put</code>, or a <code>get</code>. - * The <code>CacheWriter</code> can determine whether this value comes from a - * <code>get</code> or not from {link EntryEvent::isLoad}. The entry being - * created may already exist in the local cache where this <code>CacheWriter</code> - * is installed, but it does not yet exist in the cache where the operation was initiated. - * @param eventCode indicate the type of Event - * @param boolValues indicate the origin of Event - * @param rptr indicate the region the event is for - * @param callbackArg user data - * @param key the key to the target object of the event - * @param newValue the new value of the target object of the event - * @param oldValue the old value of the target object of the event - * - * This function does not throw any exception. - * - * @see Region::create - * @see Region::put - * @see Region::get - */ - virtual bool beforeCreate( const EntryEvent& event ); - - virtual void beforeCreate2( const EntryEvent& event ); - - /*@brief called before this region is invalidated - * @param eventCode indicate the type of Event - * @param boolValues indicate the origin of Event - * @param rptr indicate the region the event is for - * @param callbackArg user data - * @param key the key to the target object of the event - * @param newValue the new value of the target object of the event - * @param oldValue the old value of the target object of the event - * - * This function does not throw any exception. - * @see Region::invalidate - */ - virtual void beforeInvalidate( const EntryEvent& event ); - - virtual void beforeInvalidate2( const EntryEvent& event ); - - /** - * Called before an entry is destroyed. The entry being destroyed may or may - * not exist in the local cache where the CacheWriter is installed. This method - * is <em>not</em> called as a result of expiration or {link Region::localDestroyRegion}. - * - * @param eventCode indicate the type of Event - * @param boolValues indicate the origin of Event - * @param rptr indicate the region the event is for - * @param callbackArg user data - * @param key the key to the target object of the event - * @param newValue the new value of the target object of the event - * @param oldValue the old value of the target object of the event - * This function does not throw any exception. - * - * @see Region::destroy - */ - virtual bool beforeDestroy( const EntryEvent& event ); - - virtual void beforeDestroy2( const EntryEvent& event ); - - /** - * Called before a region is destroyed. The <code>CacheWriter</code> - * will not additionally be called for each entry that is destroyed - * in the region as a result of a region destroy. If the region's - * subregions have <code>CacheWriter</code>s installed, then they - * will be called for the cascading subregion destroys. - * This method is <em>not</em> called as a result of - * expiration or {link Region::localDestroyRegion}. However, the - * <code>close</code> method is invoked regardless of whether a - * region is destroyed locally. A non-local region destroy results - * in an invocation of beforeRegionDestroy followed by an - * invocation of {link CacheCallback::close}. - *<p> - * WARNING: This method should not destroy or create any regions itself, or a - * deadlock will occur. - * - * @param eventCode indicate the type of Event - * @param boolValues indicate the origin of Event - * @param rptr indicate region the event is for - * @param callbackArg user data - * - * This function does not throw any exception. - * @see Region::invalidateRegion - */ - virtual void beforeRegionInvalidate( const RegionEvent& event ); - - virtual void beforeRegionInvalidate2( const RegionEvent& event ); - - /*@brief called before this region is destroyed - * @param eventCode indicate the type of Event - * @param boolValues indicate the origin of Event - * @param rptr indicate region the event is for - * @param callbackArg user data - * - * This function does not throw any exception. - * @see Region::destroyRegion - */ - virtual bool beforeRegionDestroy( const RegionEvent& event ); - - virtual void beforeRegionDestroy2( const RegionEvent& event ); - - virtual void close( const RegionPtr& region ); - - - /** - * Returns wether or not one of this <code>CacheWriter</code> - * methods was invoked. Before returning, the <code>invoked</code> - * flag is cleared. - */ - bool wasInvoked( ) - { - bool bInvoked = m_bInvoked; - m_bInvoked = false; - return bInvoked; - } - - private: - bool m_bInvoked; -}; - -// ---------------------------------------------------------------------------- - -#endif // __TEST_CACHE_WRITER_HPP__ - -// ---------------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/User.hpp ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/User.hpp b/examples/dist/cacheRunner/User.hpp deleted file mode 100644 index b505a58..0000000 --- a/examples/dist/cacheRunner/User.hpp +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * @brief User class for testing the put functionality for object. - */ - - -#ifndef __USER_HPP__ -#define __USER_HPP__ - -#ifdef _EXAMPLE -#include <gfcpp/GemfireCppCache.hpp> -#else -#include <../GemfireCppCache.hpp> -#endif -#include "ExampleObject.hpp" -#include <string> - -class User -: public Serializable -{ - private: - std::string name; - int32_t userId; - ExampleObject *eo; - public: - User( std::string name, int32_t userId ) - : name( name ),userId( userId ) - { - eo = new ExampleObject(this->userId); - } - - ~User() { - if (eo != NULL) delete eo; - eo = NULL; - } - - User () - { - name = ""; - userId = 0; - eo = new ExampleObject(userId); - } - - User( const char *strfmt, char delimeter ) - { - std::string userId_str; - std::string sValue(strfmt); - std::string::size_type pos1 = sValue.find_first_of(delimeter); - std::string::size_type pos2; - if (pos1 == std::string::npos) { - userId_str = sValue; - name = sValue; - } - else { - userId_str = sValue.substr(0, pos1); - pos2 = sValue.find(delimeter, pos1+1); - int len; - if (pos2==std::string::npos) { - len = sValue.length()-pos1; - } - else { - len = pos2-pos1; - } - name = sValue.substr(pos1+1, len); - } - userId = (int32_t)atoi(userId_str.c_str()); - eo = new ExampleObject(userId_str); - } - - CacheableStringPtr toString() const - { - CacheableStringPtr eo_str = eo->toString(); - char userId_str[128]; - sprintf(userId_str,"User: %d", userId); - std::string sValue = std::string(userId_str) + "," + name + "\n"; - sValue += std::string(eo_str->asChar()); - return CacheableString::create( sValue.c_str() ); - } - - int32_t getUserId( ) - { - return userId; - } - - std::string getName( ) - { - return name; - } - - ExampleObject *getEO() - { - return eo; - } - - void setEO(ExampleObject *eObject) - { - eo = eObject; - } - - // Add the following for the Serializable interface - // Our TypeFactoryMethod - - static Serializable* createInstance( ) - { - return new User(std::string("gester"), 123); - } - - int32_t classId( ) const - { - return 0x2d; // 45 - } - - void toData( DataOutput& output ) const - { - output.writeASCII( name.c_str(), name.size() ); - output.writeInt( userId ); - eo->toData(output); - } - - uint32_t objectSize( ) const - { - return ( sizeof(char) * ( name.size() + 1 ) ) + - sizeof(User) + eo->objectSize(); - } - - Serializable* fromData( DataInput& input ) - { - char *readbuf; - input.readASCII( &readbuf ); - name = std::string(readbuf); - input.freeUTFMemory( readbuf ); - input.readInt( &userId ); - eo->fromData(input); - return this; - } -}; - -typedef SharedPtr<User> UserPtr; -#endif http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/buildit.bat ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/buildit.bat b/examples/dist/cacheRunner/buildit.bat deleted file mode 100755 index c2988b9..0000000 --- a/examples/dist/cacheRunner/buildit.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off - -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed with -rem this work for additional information regarding copyright ownership. -rem The ASF licenses this file to You under the Apache License, Version 2.0 -rem (the "License"); you may not use this file except in compliance with -rem the License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, software -rem distributed under the License is distributed on an "AS IS" BASIS, -rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -rem See the License for the specific language governing permissions and -rem limitations under the License. - -rem GFCPP must be set - -cl /MD /Zc:wchar_t /EHsc /GR /wd4996 /D_EXAMPLE /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NON_CONFORMING_SWPRINTFS /DWINVER=0x0500 /DBUILD_TESTOBJECT /I%GFCPP%/include /Fecacherunner.exe *.cpp %GFCPP%/lib/apache-geode.lib - -del *.obj http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/buildit.sh ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/buildit.sh b/examples/dist/cacheRunner/buildit.sh deleted file mode 100755 index 0060daa..0000000 --- a/examples/dist/cacheRunner/buildit.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - - -if [ -z ${GFCPP:-} ]; then - echo set GFCPP... - exit 1 -fi - -OPT=-O3 -LIBDIR=lib -platform=`uname` -is64bit=__IS_64_BIT__ -if [ "$platform" == "SunOS" ]; then - if [ $is64bit -eq 1 ]; then - ARCH="-xarch=v9" - else - ARCH="-xarch=v8plus" - fi - CC \ - -mt -D_RWSTD_MULTI_THREAD -DTHREAD=MULTI \ - -D_REENTRANT -D_EXAMPLE $OPT $ARCH \ - -I$GFCPP/include \ - -L$GFCPP/$LIBDIR \ - -R$GFCPP/$LIBDIR \ - -lapache-geode -lrt -lpthread -lkstat \ - CacheRunner.cpp CommandReader.cpp Test*.cpp Po*.cpp -o cacheRunner -elif [ "$platform" == "Linux" ]; then - if [ $is64bit -eq 1 ]; then - ARCH="-m64" - else - ARCH="-m32" - fi - g++ \ - -D_REENTRANT -D_EXAMPLE $OPT -Wall $ARCH \ - -I$GFCPP/include \ - -Wl,-rpath,$GFCPP/$LIBDIR -L$GFCPP/$LIBDIR -lapache-geode \ - CacheRunner.cpp CommandReader.cpp Test*.cpp Po*.cpp -o cacheRunner -else - echo "This script is not supported on this platform." - exit 1 -fi http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/cacherunner.xml ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/cacherunner.xml b/examples/dist/cacheRunner/cacherunner.xml deleted file mode 100644 index 4ce722e..0000000 --- a/examples/dist/cacheRunner/cacherunner.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0"?> - -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - - -<!-- Initializes a cache to serve the bridge_region region, - waiting for bridge client communication on port 50505 --> - -<cache xmlns="http://geode.apache.org/schema/cache" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd" - version="1.0"> - <cache-server port="50505" /> - <region name="root"> - <region-attributes scope="distributed-no-ack"/> - <entry> - <key><string>entry3</string></key> - <value><string>3.0</string></value> - </entry> - </region> - <region name="listenerWriterLoader"> - <region-attributes scope="distributed-ack" data-policy="replicate"> - <!--cache-loader> - <class-name>cacheRunner.StringLoader</class-name> - </cache-loader--> - </region-attributes> - <entry> - <key><string>entry1</string></key> - <value><string>1.0</string></value> - </entry> - </region> -</cache> http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/cacherunner2.xml ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/cacherunner2.xml b/examples/dist/cacheRunner/cacherunner2.xml deleted file mode 100644 index 54eb002..0000000 --- a/examples/dist/cacheRunner/cacherunner2.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0"?> - -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - - -<!-- Initializes a cache to serve the bridge_region region, - waiting for bridge client communication on port 50506 --> - -<cache xmlns="http://geode.apache.org/schema/cache" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd" - version="1.0"> - <cache-server port="50506" /> - <region name="root"> - <region-attributes scope="distributed-no-ack"/> - <entry> - <key><string>entry3</string></key> - <value><string>3.0</string></value> - </entry> - </region> - <region name="listenerWriterLoader"> - <region-attributes scope="distributed-ack" data-policy="replicate"> - <!--cache-loader> - <class-name>cacheRunner.StringLoader</class-name> - </cache-loader--> - </region-attributes> - <entry> - <key><string>entry1</string></key> - <value><string>1.0</string></value> - </entry> - </region> -</cache> http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/csQueryPortfolios.xml ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/csQueryPortfolios.xml b/examples/dist/cacheRunner/csQueryPortfolios.xml deleted file mode 100644 index ef30f93..0000000 --- a/examples/dist/cacheRunner/csQueryPortfolios.xml +++ /dev/null @@ -1,372 +0,0 @@ -<?xml version="1.0"?> - -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<cache xmlns="http://geode.apache.org/schema/cache" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd" - version="1.0"> - <cache-server port="50505" /> - <region name="root"> - <region-attributes scope="distributed-no-ack"/> - </region> - <region name="listenerWriterLoader"> - <region-attributes scope="distributed-ack" data-policy="replicate"/> - </region> - <region name="Portfolios"> - <region-attributes scope="distributed-ack" data-policy="replicate"> - <value-constraint>javaobject.Portfolio</value-constraint> - </region-attributes> - <entry> - <key><string>1</string></key> - <value> - <declarable> - <class-name>javaobject.Portfolio</class-name> - <parameter name="ID"> - <string>1</string> - </parameter> - <parameter name="pkid"> - <string>1</string> - </parameter> - <parameter name="type"> - <string>type1</string> - </parameter> - <parameter name="status"> - <string>active</string> - </parameter> - <parameter name="newVal"> - <string>CCCCC</string> - </parameter> - <parameter name="position1"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>SUN</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>3400</string> - </parameter> - <parameter name="secType"> - <string>r</string> - </parameter> - <parameter name="pid"> - <string>345</string> - </parameter> - </declarable> - </parameter> - <parameter name="position2"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>IBM</string> - </parameter> - <parameter name="qty"> - <string>4600</string> - </parameter> - <parameter name="mktValue"> - <string>9900.884732</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>8765</string> - </parameter> - <parameter name="secType"> - <string>p</string> - </parameter> - <parameter name="pid"> - <string>123</string> - </parameter> - </declarable> - </parameter> - </declarable> - </value> - </entry> - <entry> - <key><string>2</string></key> - <value> - <declarable> - <class-name>javaobject.Portfolio</class-name> - <parameter name="ID"> - <string>2</string> - </parameter> - <parameter name="pkid"> - <string>2</string> - </parameter> - <parameter name="type"> - <string>type2</string> - </parameter> - <parameter name="status"> - <string>inactive</string> - </parameter> - <parameter name="position1"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>YHOO</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>9834</string> - </parameter> - <parameter name="secType"> - <string>y</string> - </parameter> - <parameter name="pid"> - <string>129</string> - </parameter> - </declarable> - </parameter> - <parameter name="position2"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>GOOG</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>834</string> - </parameter> - <parameter name="secType"> - <string>t</string> - </parameter> - <parameter name="pid"> - <string>569</string> - </parameter> - </declarable> - </parameter> - </declarable> - </value> - </entry> - - <entry> - <key><string>3</string></key> - <value> - <declarable> - <class-name>javaobject.Portfolio</class-name> - <parameter name="ID"> - <string>3</string> - </parameter> - <parameter name="pkid"> - <string>3</string> - </parameter> - <parameter name="type"> - <string>type3</string> - </parameter> - <parameter name="status"> - <string>active</string> - </parameter> - <parameter name="position1"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>MSFT</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>1834</string> - </parameter> - <parameter name="secType"> - <string>o</string> - </parameter> - <parameter name="pid"> - <string>545</string> - </parameter> - </declarable> - </parameter> - <parameter name="position2"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>AOL</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>8354</string> - </parameter> - <parameter name="secType"> - <string>t</string> - </parameter> - <parameter name="pid"> - <string>987</string> - </parameter> - </declarable> - </parameter> - </declarable> - </value> - </entry> - - <entry> - <key><string>4</string></key> - <value> - <declarable> - <class-name>javaobject.Portfolio</class-name> - <parameter name="ID"> - <string>4</string> - </parameter> - <parameter name="pkid"> - <string>4</string> - </parameter> - <parameter name="type"> - <string>type1</string> - </parameter> - <parameter name="status"> - <string>inactive</string> - </parameter> - <parameter name="position1"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>APPL</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>3654</string> - </parameter> - <parameter name="secType"> - <string>d</string> - </parameter> - <parameter name="pid"> - <string>287</string> - </parameter> - </declarable> - </parameter> - <parameter name="position2"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>ORCL</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>5344</string> - </parameter> - <parameter name="secType"> - <string>k</string> - </parameter> - <parameter name="pid"> - <string>567</string> - </parameter> - </declarable> - </parameter> - </declarable> - </value> - </entry> - - <entry> - <key><string>5</string></key> - <value> - <declarable> - <class-name>javaobject.Portfolio</class-name> - <parameter name="ID"> - <string>5</string> - </parameter> - <parameter name="pkid"> - <string>5</string> - </parameter> - <parameter name="type"> - <string>type2</string> - </parameter> - <parameter name="status"> - <string>active</string> - </parameter> - <parameter name="position1"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>SAP</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>3344</string> - </parameter> - <parameter name="secType"> - <string>k</string> - </parameter> - <parameter name="pid"> - <string>432</string> - </parameter> - </declarable> - </parameter> - <parameter name="position2"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>DELL</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>5354</string> - </parameter> - <parameter name="secType"> - <string>u</string> - </parameter> - <parameter name="pid"> - <string>467</string> - </parameter> - </declarable> - </parameter> - </declarable> - </value> - </entry> - </region> -</cache> http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/csQueryPortfolios2.xml ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/csQueryPortfolios2.xml b/examples/dist/cacheRunner/csQueryPortfolios2.xml deleted file mode 100644 index 8e97894..0000000 --- a/examples/dist/cacheRunner/csQueryPortfolios2.xml +++ /dev/null @@ -1,372 +0,0 @@ -<?xml version="1.0"?> - -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<cache xmlns="http://geode.apache.org/schema/cache" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd" - version="1.0"> - <cache-server port="50506" /> - <region name="root"> - <region-attributes scope="distributed-no-ack"/> - </region> - <region name="listenerWriterLoader"> - <region-attributes scope="distributed-ack" data-policy="replicate"/> - </region> - <region name="Portfolios"> - <region-attributes scope="distributed-ack" data-policy="replicate"> - <value-constraint>javaobject.Portfolio</value-constraint> - </region-attributes> - <entry> - <key><string>1</string></key> - <value> - <declarable> - <class-name>javaobject.Portfolio</class-name> - <parameter name="ID"> - <string>1</string> - </parameter> - <parameter name="pkid"> - <string>1</string> - </parameter> - <parameter name="type"> - <string>type1</string> - </parameter> - <parameter name="status"> - <string>active</string> - </parameter> - <parameter name="newVal"> - <string>CCCCC</string> - </parameter> - <parameter name="position1"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>SUN</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>3400</string> - </parameter> - <parameter name="secType"> - <string>r</string> - </parameter> - <parameter name="pid"> - <string>345</string> - </parameter> - </declarable> - </parameter> - <parameter name="position2"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>IBM</string> - </parameter> - <parameter name="qty"> - <string>4600</string> - </parameter> - <parameter name="mktValue"> - <string>9900.884732</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>8765</string> - </parameter> - <parameter name="secType"> - <string>p</string> - </parameter> - <parameter name="pid"> - <string>123</string> - </parameter> - </declarable> - </parameter> - </declarable> - </value> - </entry> - <entry> - <key><string>2</string></key> - <value> - <declarable> - <class-name>javaobject.Portfolio</class-name> - <parameter name="ID"> - <string>2</string> - </parameter> - <parameter name="pkid"> - <string>2</string> - </parameter> - <parameter name="type"> - <string>type2</string> - </parameter> - <parameter name="status"> - <string>inactive</string> - </parameter> - <parameter name="position1"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>YHOO</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>9834</string> - </parameter> - <parameter name="secType"> - <string>y</string> - </parameter> - <parameter name="pid"> - <string>129</string> - </parameter> - </declarable> - </parameter> - <parameter name="position2"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>GOOG</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>834</string> - </parameter> - <parameter name="secType"> - <string>t</string> - </parameter> - <parameter name="pid"> - <string>569</string> - </parameter> - </declarable> - </parameter> - </declarable> - </value> - </entry> - - <entry> - <key><string>3</string></key> - <value> - <declarable> - <class-name>javaobject.Portfolio</class-name> - <parameter name="ID"> - <string>3</string> - </parameter> - <parameter name="pkid"> - <string>3</string> - </parameter> - <parameter name="type"> - <string>type3</string> - </parameter> - <parameter name="status"> - <string>active</string> - </parameter> - <parameter name="position1"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>MSFT</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>1834</string> - </parameter> - <parameter name="secType"> - <string>o</string> - </parameter> - <parameter name="pid"> - <string>545</string> - </parameter> - </declarable> - </parameter> - <parameter name="position2"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>AOL</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>8354</string> - </parameter> - <parameter name="secType"> - <string>t</string> - </parameter> - <parameter name="pid"> - <string>987</string> - </parameter> - </declarable> - </parameter> - </declarable> - </value> - </entry> - - <entry> - <key><string>4</string></key> - <value> - <declarable> - <class-name>javaobject.Portfolio</class-name> - <parameter name="ID"> - <string>4</string> - </parameter> - <parameter name="pkid"> - <string>4</string> - </parameter> - <parameter name="type"> - <string>type1</string> - </parameter> - <parameter name="status"> - <string>inactive</string> - </parameter> - <parameter name="position1"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>APPL</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>3654</string> - </parameter> - <parameter name="secType"> - <string>d</string> - </parameter> - <parameter name="pid"> - <string>287</string> - </parameter> - </declarable> - </parameter> - <parameter name="position2"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>ORCL</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>5344</string> - </parameter> - <parameter name="secType"> - <string>k</string> - </parameter> - <parameter name="pid"> - <string>567</string> - </parameter> - </declarable> - </parameter> - </declarable> - </value> - </entry> - - <entry> - <key><string>5</string></key> - <value> - <declarable> - <class-name>javaobject.Portfolio</class-name> - <parameter name="ID"> - <string>5</string> - </parameter> - <parameter name="pkid"> - <string>5</string> - </parameter> - <parameter name="type"> - <string>type2</string> - </parameter> - <parameter name="status"> - <string>active</string> - </parameter> - <parameter name="position1"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>SAP</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>3344</string> - </parameter> - <parameter name="secType"> - <string>k</string> - </parameter> - <parameter name="pid"> - <string>432</string> - </parameter> - </declarable> - </parameter> - <parameter name="position2"> - <declarable> - <class-name>javaobject.Position</class-name> - <parameter name="secId"> - <string>DELL</string> - </parameter> - <parameter name="qty"> - <string>3900</string> - </parameter> - <parameter name="mktValue"> - <string>3400.893475</string> - </parameter> - <parameter name="sharesOutstanding"> - <string>5354</string> - </parameter> - <parameter name="secType"> - <string>u</string> - </parameter> - <parameter name="pid"> - <string>467</string> - </parameter> - </declarable> - </parameter> - </declarable> - </value> - </entry> - </region> -</cache> http://git-wip-us.apache.org/repos/asf/geode-native/blob/b2edccfc/examples/dist/cacheRunner/gfecs1/cacherunner.xml ---------------------------------------------------------------------- diff --git a/examples/dist/cacheRunner/gfecs1/cacherunner.xml b/examples/dist/cacheRunner/gfecs1/cacherunner.xml deleted file mode 100644 index 4ce722e..0000000 --- a/examples/dist/cacheRunner/gfecs1/cacherunner.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0"?> - -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - - -<!-- Initializes a cache to serve the bridge_region region, - waiting for bridge client communication on port 50505 --> - -<cache xmlns="http://geode.apache.org/schema/cache" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd" - version="1.0"> - <cache-server port="50505" /> - <region name="root"> - <region-attributes scope="distributed-no-ack"/> - <entry> - <key><string>entry3</string></key> - <value><string>3.0</string></value> - </entry> - </region> - <region name="listenerWriterLoader"> - <region-attributes scope="distributed-ack" data-policy="replicate"> - <!--cache-loader> - <class-name>cacheRunner.StringLoader</class-name> - </cache-loader--> - </region-attributes> - <entry> - <key><string>entry1</string></key> - <value><string>1.0</string></value> - </entry> - </region> -</cache>
