00001 #ifndef __GEMFIRE_CACHELOADER_H__ 00002 #define __GEMFIRE_CACHELOADER_H__ 00003 /*========================================================================= 00004 * (c) Copyright 2002-2007, GemStone Systems, Inc. All Rights Reserved. 00005 * 1260 NW Waterhouse Ave., Suite 200, Beaverton, OR 97006 00006 *======================================================================== 00007 */ 00008 00013 #include "gfcpp_globals.hpp" 00014 #include "gf_types.hpp" 00015 #include "CacheableKey.hpp" 00016 #include "Cacheable.hpp" 00017 #include "UserData.hpp" 00018 00019 00020 namespace gemfire { 00021 00043 class CPPCACHE_EXPORT CacheLoader 00044 : public SharedBase 00045 { 00046 public: 00063 virtual CacheablePtr load(const RegionPtr& rp, 00064 const CacheableKeyPtr& key, 00065 UserDataPtr& helper) = 0; 00066 00090 static CacheablePtr netSearch(const RegionPtr& rp, const CacheableKeyPtr& keyPtr, 00091 bool netLoad,UserDataPtr& cacheLoaderParam); 00092 00108 virtual void close( const RegionPtr& rp ); 00109 00110 virtual ~CacheLoader( ); 00111 00112 protected: 00113 00114 CacheLoader( ); 00115 00116 protected: 00117 // never implemented. 00118 CacheLoader( const CacheLoader& other ); 00119 void operator = ( const CacheLoader& other ); 00120 00121 }; 00122 00123 } //namespace 00124 #endif //ifndef __GEMFIRE_CACHELOADER_H__